The lglCategory Structure

## The lglCategory Structure The lglCategory Structure — Template category definitions |

## Synopsis

    #include <libglabels/category.h>

                        lglCategory;
    lglCategory *       lgl_category_new                    (gchar *id,
                                                             gchar *name);
    lglCategory *       lgl_category_dup                    (const lglCategory *orig);
    void                lgl_category_free                   (lglCategory *category);

## Description

This section describes a structure for representing a category of stationary and related functions.

## Details

### lglCategory

    typedef struct {
    	gchar               *id;     /* Unique ID of category */
    	gchar               *name;   /* Localized name of category */
    } lglCategory;

This structure defines a category.

gchar *`id`; | Category ID.
gchar *`name`; | Localized category name.

### lgl_category_new ()

    lglCategory *       lgl_category_new                    (gchar *id,
                                                             gchar *name);

Allocates and constructs a new lglCategory structure.

`id` : | Id of category definition. (E.g. label, card, etc.) Should be unique.
`name` : | Localized name of category.
Returns : | a pointer to a newly allocated lglCategory structure.

### lgl_category_dup ()

    lglCategory *       lgl_category_dup                    (const lglCategory *orig);

Duplicates an existing lglCategory structure.

`orig` : | lglCategory structure to be duplicated.
Returns : | a pointer to a newly allocated lglCategory structure.

### lgl_category_free ()

    void                lgl_category_free                   (lglCategory *category);

Free all memory associated with an existing lglCategory structure.

`category` : | pointer to lglCategory structure to be freed.