2 PSPPIRE --- A Graphical User Interface for PSPP
3 Copyright (C) 2004 Free Software Foundation
4 Written by John Darrington
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program 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
14 GNU 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., 51 Franklin Street, Fifth Floor, Boston, MA
25 #include "psppire-object.h"
28 /* --- prototypes --- */
29 static void psppire_object_class_init (PsppireObjectClass *class);
30 static void psppire_object_init (PsppireObject *accel_group);
31 static void psppire_object_finalize (GObject *object);
34 /* --- variables --- */
35 static GObjectClass *parent_class = NULL;
38 /* --- functions --- */
40 * psppire_object_get_type:
41 * @returns: the type ID for accelerator groups.
44 psppire_object_get_type (void)
46 static GType object_type = 0;
50 static const GTypeInfo object_info = {
51 sizeof (PsppireObjectClass),
53 (GBaseFinalizeFunc) NULL,
54 (GClassInitFunc) psppire_object_class_init,
55 NULL, /* class_finalize */
56 NULL, /* class_data */
57 sizeof (PsppireObject),
59 (GInstanceInitFunc) psppire_object_init,
62 object_type = g_type_register_static (G_TYPE_OBJECT, "PsppireObject",
63 &object_info, G_TYPE_FLAG_ABSTRACT);
69 static guint signal_changed = 0 ;
72 psppire_object_class_init (PsppireObjectClass *class)
74 GObjectClass *object_class = G_OBJECT_CLASS (class);
76 parent_class = g_type_class_peek_parent (class);
78 object_class->finalize = psppire_object_finalize;
81 g_signal_new ("changed",
82 G_OBJECT_CLASS_TYPE (class),
86 g_cclosure_marshal_VOID__VOID,
92 psppire_object_finalize (GObject *object)
94 G_OBJECT_CLASS (parent_class)->finalize (object);
98 psppire_object_init (PsppireObject *psppire_object)
104 * psppire_object_new:
105 * @returns: a new #PsppireObject object
107 * Creates a new #PsppireObject.
110 psppire_object_new (void)
112 return g_object_new (G_TYPE_PSPPIRE_OBJECT, NULL);