Updated copyright text/header in most source files.
[geda-gaf/peter-b.git] / libgeda / include / libgeda / geda_list.h
bloba849606e886df127ee3b64ca363679aa3635a468
1 /* gEDA - GPL Electronic Design Automation
2 * libgeda - gEDA's library
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 2007-2010 Peter Clifton
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef __GEDA_LIST_H__
23 #define __GEDA_LIST_H__
25 #define GEDA_TYPE_LIST (geda_list_get_type())
26 #define GEDA_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GEDA_TYPE_LIST, GedaList))
27 #define GEDA_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GEDA_TYPE_LIST, GedaListClass))
28 #define GEDA_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GEDA_TYPE_LIST))
29 #define GEDA_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GEDA_TYPE_LIST))
30 #define GEDA_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GEDA_TYPE_LIST, GedaListClass))
33 typedef struct _GedaList GedaList;
34 typedef struct _GedaListClass GedaListClass;
36 struct _GedaList {
37 GObject parent;
38 GList *glist;
41 struct _GedaListClass {
42 GObjectClass parent;
45 GType geda_list_get_type (void);
47 /* It would be nice to add const qualifiers to some of these, but GLib
48 * is buggy in this respect, and doesn't have const where necessary. */
49 GedaList *geda_list_new( void );
50 void geda_list_add( GedaList *list, gpointer item );
51 void geda_list_add_glist( GedaList *list, GList *items );
52 void geda_list_remove( GedaList *list, gpointer item );
53 /*void geda_list_remove_glist( GedaList *list, GList *items ); */ /* Undemanded as yet */
54 void geda_list_remove_all( GedaList *list );
56 /*const GList *geda_list_get_glist( GedaList *list ); */
57 #define geda_list_get_glist(list) (list->glist)
59 #endif /* __GEDA_LIST_H__ */