Gtk4-tutorial/src/class_gobject.c

50 lines
1.6 KiB
C
Raw Normal View History

2020-12-21 13:12:05 +01:00
typedef struct _GObjectClass GObjectClass;
typedef struct _GObjectClass GInitiallyUnownedClass;
2021-06-17 13:04:16 +02:00
struct _GObjectClass
{
2020-12-21 13:12:05 +01:00
GTypeClass g_type_class;
2020-12-21 13:12:05 +01:00
/*< private >*/
GSList *construct_properties;
2020-12-21 13:12:05 +01:00
/*< public >*/
2021-06-17 13:04:16 +02:00
/* seldom overridden */
2020-12-21 13:12:05 +01:00
GObject* (*constructor) (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties);
/* overridable methods */
void (*set_property) (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
void (*get_property) (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
void (*dispose) (GObject *object);
void (*finalize) (GObject *object);
2021-06-17 13:04:16 +02:00
/* seldom overridden */
2020-12-21 13:12:05 +01:00
void (*dispatch_properties_changed) (GObject *object,
guint n_pspecs,
GParamSpec **pspecs);
2020-12-21 13:12:05 +01:00
/* signals */
void (*notify) (GObject *object,
GParamSpec *pspec);
2020-12-21 13:12:05 +01:00
/* called when done constructing */
void (*constructed) (GObject *object);
2020-12-21 13:12:05 +01:00
/*< private >*/
gsize flags;
gsize n_construct_properties;
gpointer pspecs;
gsize n_pspecs;
2020-12-21 13:12:05 +01:00
/* padding */
gpointer pdummy[3];
2020-12-21 13:12:05 +01:00
};
2021-06-17 13:04:16 +02:00