## pim-categories

pim-categories

## Synopsis

    struct              gpe_pim_category;
    gboolean            gpe_pim_categories_init             (void);
    GSList*             gpe_pim_categories_list             (void);
    gboolean            gpe_pim_category_new                (const gchar *title,
                                                             gint *id);
    const gchar*        gpe_pim_category_name               (gint id);
    gboolean            gpe_pim_category_rename             (gint id,
                                                             gchar *new_name);
    gboolean            gpe_pim_category_set_colour         (gint id,
                                                             const gchar *new_colour);
    const gchar*        gpe_pim_category_colour             (gint id);

## Description

## Details

### struct gpe_pim_category

    struct gpe_pim_category {
      const gchar *name;
      guint id;
      const gchar *colour;
    };

### gpe_pim_categories_init ()

    gboolean            gpe_pim_categories_init             (void);

Returns : |

### gpe_pim_categories_list ()

    GSList*             gpe_pim_categories_list             (void);

Returns : |

### gpe_pim_category_new ()

    gboolean            gpe_pim_category_new                (const gchar *title,
                                                             gint *id);

`title` : |
`id` : |
Returns : |

### gpe_pim_category_name ()

    const gchar*        gpe_pim_category_name               (gint id);

`id` : |
Returns : |

### gpe_pim_category_rename ()

    gboolean            gpe_pim_category_rename             (gint id,
                                                             gchar *new_name);

Rename an existing category.

`id` : |
`new_name` : |
Returns : |

### gpe_pim_category_set_colour ()

    gboolean            gpe_pim_category_set_colour         (gint id,
                                                             const gchar *new_colour);

Set the colour descrition for a category. Valid strings are symbolic names like 'green' or HTML-like RGB values e.g. “11FF11”

`id` : |
`new_colour` : |
Returns : |

### gpe_pim_category_colour ()

    const gchar*        gpe_pim_category_colour             (gint id);

Get the colour assigned to the given category.

`id` : |
Returns : |