![]() |
![]() |
![]() |
LibGlabels Reference Manual | ![]() |
---|---|---|---|---|
#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);
This section describes a structure for representing a category of stationary and related functions.
typedef struct { gchar *id; /* Unique ID of category */ gchar *name; /* Localized name of category */ } lglCategory;
This structure defines a category.
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. |
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. |
void lgl_category_free (lglCategory *category);
Free all memory associated with an existing lglCategory structure.
category : |
pointer to lglCategory structure to be freed. |