![]() |
![]() |
![]() |
Glade UI Builder Reference Manual | ![]() |
---|---|---|---|---|
#include <glade.h> GladeWidgetClass; GladeSignalClass; enum GladeCreateReason; void (*GladePostCreateFunc) (GladeWidgetAdaptor *adaptor, GObject *object, GladeCreateReason reason); void (*GladeChildSetPropertyFunc) (GladeWidgetAdaptor *adaptor, GObject *container, GObject *child, const gchar *property_name, const GValue *value); void (*GladeChildGetPropertyFunc) (GladeWidgetAdaptor *adaptor, GObject *container, GObject *child, const gchar *property_name, GValue *value); GList* (*GladeGetChildrenFunc) (GladeWidgetAdaptor *adaptor, GObject *container); void (*GladeAddChildFunc) (GladeWidgetAdaptor *adaptor, GObject *parent, GObject *child); void (*GladeRemoveChildFunc) (GladeWidgetAdaptor *adaptor, GObject *parent, GObject *child); void (*GladeReplaceChildFunc) (GladeWidgetAdaptor *adaptor, GObject *container, GObject *old, GObject *new); GObject* (*GladeGetInternalFunc) (GladeWidgetAdaptor *adaptor, GObject *parent, const gchar *name); void (*GladeEditorLaunchFunc) (GladeWidgetAdaptor *adaptor, GObject *object);
GladeWidgetClass is a structure based on a GType and parameters from the Glade catalog files and is the central metadata for object classes; it also provides an abstraction later to container apis.
typedef struct { GObjectClass parent_class; void (*add_child) (GladeWidget *, GladeWidget *, gboolean); void (*remove_child) (GladeWidget *, GladeWidget *); void (*replace_child) (GladeWidget *, GObject *, GObject *); void (*add_signal_handler) (GladeWidget *, GladeSignal *); void (*remove_signal_handler) (GladeWidget *, GladeSignal *); void (*change_signal_handler) (GladeWidget *, GladeSignal *, GladeSignal *); gboolean (*action_activated) (GladeWidget *, const gchar *); gint (*button_press_event) (GladeWidget *, GdkEvent *); gint (*button_release_event) (GladeWidget *, GdkEvent *); gint (*motion_notify_event) (GladeWidget *, GdkEvent *); gint (*enter_notify_event) (GladeWidget *, GdkEvent *); void (*setup_events) (GladeWidget *, GtkWidget *); gboolean (*event) (GtkWidget *, GdkEvent *, GladeWidget *); } GladeWidgetClass;
typedef struct { GSignalQuery query; const gchar *name; /* Name of the signal, eg clicked */ gchar *type; /* Name of the object class that this signal belongs to * eg GtkButton */ } GladeSignalClass;
typedef enum _GladeCreateReason { GLADE_CREATE_USER = 0, GLADE_CREATE_COPY, GLADE_CREATE_LOAD, GLADE_CREATE_REBUILD, GLADE_CREATE_REASONS } GladeCreateReason;
These are the reasons your GladePostCreateFunc can be called.
void (*GladePostCreateFunc) (GladeWidgetAdaptor *adaptor, GObject *object, GladeCreateReason reason);
This function is called exactly once for any project object instance and can be for any GladeCreateReason.
adaptor : |
|
object : |
a GObject |
reason : |
a GladeCreateReason |
void (*GladeChildSetPropertyFunc) (GladeWidgetAdaptor *adaptor, GObject *container, GObject *child, const gchar *property_name, const GValue *value);
Called to set the packing property property_name
to value
on the child
object of container
.
adaptor : |
A GladeWidgetAdaptor |
container : |
The GObject container |
child : |
The GObject child |
property_name : |
The property name |
value : |
The GValue |
void (*GladeChildGetPropertyFunc) (GladeWidgetAdaptor *adaptor, GObject *container, GObject *child, const gchar *property_name, GValue *value);
Called to get the packing property property_name
on the child
object of container
into value
.
adaptor : |
A GladeWidgetAdaptor |
container : |
The GObject container |
child : |
The GObject child |
property_name : |
The property name |
value : |
The GValue |
GList* (*GladeGetChildrenFunc) (GladeWidgetAdaptor *adaptor, GObject *container);
A function called to get containers
children.
adaptor : |
|
container : |
A GObject container |
Returns : | A GList of GObject children. |
void (*GladeAddChildFunc) (GladeWidgetAdaptor *adaptor, GObject *parent, GObject *child);
Called to add child
to parent
.
adaptor : |
|
parent : |
A GObject container |
child : |
A GObject child |
void (*GladeRemoveChildFunc) (GladeWidgetAdaptor *adaptor, GObject *parent, GObject *child);
Called to remove child
from parent
.
adaptor : |
|
parent : |
A GObject container |
child : |
A GObject child |
void (*GladeReplaceChildFunc) (GladeWidgetAdaptor *adaptor, GObject *container, GObject *old, GObject *new);
Called to swap placeholders with project objects in containers.
adaptor : |
|
container : |
A GObject container |
old : |
The old GObject child |
new : |
The new GObject child to take its place |
GObject* (*GladeGetInternalFunc) (GladeWidgetAdaptor *adaptor, GObject *parent, const gchar *name);
Called to lookup child
in composite object parent
by name
.
adaptor : |
|
parent : |
A GObject composite object |
name : |
A string identifier |
Returns : |