The lglCategory Structure: LibGlabels 3.0 Reference Manual

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

## Functions

lglCategory * | lgl_category_new ()
lglCategory * | lgl_category_dup ()
void | lgl_category_free ()

## Types and Values

struct | lglCategory

## Includes

    #include <libglabels/lgl-category.h>

## Description

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

## Functions

### lgl_category_new ()

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

Allocates and constructs a new lglCategory structure.

#### Parameters

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.

#### Parameters

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.

#### Parameters

category | pointer to lglCategory structure to be freed. |

## Types and Values

### struct lglCategory

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

This structure defines a category.

#### Members

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