|  |  |  | LibGlabels 3.0 Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
#include <libglabels/lgl-category.h> struct lglCategory; lglCategory * lgl_category_new (gchar *id,gchar *name); lglCategory * lgl_category_dup (const lglCategory *orig); void lgl_category_free (lglCategory *category);
This section describes a structure for representing a category of stationary and related functions.
struct lglCategory {
        gchar               *id;     /* Unique ID of category */
        gchar               *name;   /* Localized name of category */
};
This structure defines a category.
lglCategory * lgl_category_new (gchar *id,gchar *name);
Allocates and constructs a new lglCategory structure.
| 
 | Id of category definition. (E.g. label, card, etc.) Should be unique. | 
| 
 | Localized name of category. | 
| Returns : | a pointer to a newly allocated lglCategory structure. | 
lglCategory *       lgl_category_dup                    (const lglCategory *orig);
Duplicates an existing lglCategory structure.
| 
 | lglCategory structure to be duplicated. | 
| Returns : | a pointer to a newly allocated lglCategory structure. | 
void                lgl_category_free                   (lglCategory *category);
Free all memory associated with an existing lglCategory structure.
| 
 | pointer to lglCategory structure to be freed. |