1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
4 * (LIBGLABELS) Template library for GLABELS
6 * category.h: template category module header file
8 * Copyright (C) 2006 Jim Evins <evins@snaught.com>.
10 * This file is part of the LIBGLABELS library.
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
28 #ifndef __CATEGORY_H__
29 #define __CATEGORY_H__
31 #include <glib/gtypes.h>
32 #include <glib/glist.h>
39 typedef struct _lglCategory lglCategory;
42 gchar *id; /* Unique ID of category */
43 gchar *name; /* Localized name of category */
48 * Category construction
50 lglCategory *lgl_category_new (gchar *id,
53 lglCategory *lgl_category_dup (const lglCategory *orig);
54 void lgl_category_free (lglCategory *category);
58 * Known category name lists
60 GList *lgl_category_get_name_list (void);
61 void lgl_category_free_name_list (GList *names);
67 lglCategory *lgl_category_from_name (const gchar *name);
68 lglCategory *lgl_category_from_id (const gchar *id);
69 gchar *lgl_category_lookup_id_from_name (const gchar *name);
70 gchar *lgl_category_lookup_name_from_id (const gchar *id);