/* PSPPIRE --- A Graphical User Interface for PSPP Copyright (C) 2004 Free Software Foundation Written by John Darrington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __PSPP_DICT_H__ #define __PSPP_DICT_H__ #include #include G_BEGIN_DECLS /* --- type macros --- */ #define G_TYPE_PSPP_DICT (pspp_dict_get_type ()) #define PSPP_DICT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_PSPP_DICT, PSPP_Dict)) #define PSPP_DICT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_PSPP_DICT, PSPP_DictClass)) #define G_IS_PSPP_DICT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_PSPP_DICT)) #define G_IS_PSPP_DICT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_PSPP_DICT)) #define PSPP_DICT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_PSPP_DICT, PSPP_DictClass)) /* --- typedefs & structures --- */ typedef struct _PSPP_Dict PSPP_Dict; typedef struct _PSPP_DictClass PSPP_DictClass; /* Pinched from the pspp code */ struct variable { char name[9]; int type; int width; }; struct _PSPP_Dict { GObject parent; GPtrArray *array; }; struct _PSPP_DictClass { GObjectClass parent_class; }; /* -- PSPP_Dict --- */ GType pspp_dict_get_type(void); PSPP_Dict* pspp_dict_new(void); void pspp_dict_set_name(PSPP_Dict* s, gint idx, const gchar *name); void pspp_dict_delete_var(PSPP_Dict *s, gint idx); G_END_DECLS #endif /* __PSPP_DICT_H__ */