/* 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 */ #include #include #include "pspp-object.h" /* --- prototypes --- */ static void pspp_object_class_init (PSPP_ObjectClass *class); static void pspp_object_init (PSPP_Object *accel_group); static void pspp_object_finalize (GObject *object); /* --- variables --- */ static GObjectClass *parent_class = NULL; /* --- functions --- */ /** * pspp_object_get_type: * @returns: the type ID for accelerator groups. */ GType pspp_object_get_type (void) { static GType object_type = 0; if (!object_type) { static const GTypeInfo object_info = { sizeof (PSPP_ObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pspp_object_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (PSPP_Object), 0, /* n_preallocs */ (GInstanceInitFunc) pspp_object_init, }; object_type = g_type_register_static (G_TYPE_OBJECT, "PSPP_Object", &object_info, G_TYPE_FLAG_ABSTRACT); } return object_type; } static guint signal_changed = 0 ; static void pspp_object_class_init (PSPP_ObjectClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); parent_class = g_type_class_peek_parent (class); object_class->finalize = pspp_object_finalize; signal_changed = g_signal_new ("changed", G_OBJECT_CLASS_TYPE (class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void pspp_object_finalize (GObject *object) { PSPP_Object *accel_group = PSPP_OBJECT (object); guint i; /* g_free (accel_group->priv_accels); */ G_OBJECT_CLASS (parent_class)->finalize (object); } static void pspp_object_init (PSPP_Object *pspp_object) { pspp_object->array = g_ptr_array_new(); } /** * pspp_object_new: * @returns: a new #PSPP_Object object * * Creates a new #PSPP_Object. */ PSPP_Object* pspp_object_new (void) { return g_object_new (G_TYPE_PSPP_OBJECT, NULL); }