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 _glCategory glCategory;
42 gchar *id; /* Unique ID of paper definition */
43 gchar *name; /* Localized name of paper */
48 * Module initialization
50 void gl_category_init (void);
54 * Category construction
56 glCategory *gl_category_new (gchar *id,
59 glCategory *gl_category_dup (const glCategory *orig);
60 void gl_category_free (glCategory *category);
64 * Known category name lists
66 GList *gl_category_get_name_list (void);
67 void gl_category_free_name_list (GList *names);
73 glCategory *gl_category_from_name (const gchar *name);
74 glCategory *gl_category_from_id (const gchar *id);
75 gchar *gl_category_lookup_id_from_name (const gchar *name);
76 gchar *gl_category_lookup_name_from_id (const gchar *id);