Add Composite Child machinery and APIs to GtkWidget
This commit implements the needed machinery for GtkWidget
to build it's composite content from GtkBuilder XML and
adds the following API:
o gtk_widget_init_template()
An api to be called in instance initializers of any
GtkWidget subclass that uses template XML to build it's components.
o gtk_widget_class_set_template()
API to associate GtkBuilder XML to a given GtkWidget subclass
o gtk_widget_class_automate_child()
API to declare an object built by GtkBuilder to be associated
with an instance structure offset and automatically set.
o gtk_widget_get_automated_child()
API for bindings to fetch a child declared to be automated by
gtk_widget_class_automate_child(), for the case where bindings
do not generate GObjects under the hood and cannot use structure
offsets to resolve composite object pointers.
o gtk_widget_class_declare_callback[s]()
Declare static functions to be used in signal callbacks from
a given class's template XML
o gtk_widget_class_set_connect_func()
API for bindings to override the signal connection machinery
for a given GtkWidget derived class.
This commit is contained in:
@ -36,7 +36,6 @@ G_BEGIN_DECLS
|
||||
|
||||
#define GTK_BUILDER_ERROR (gtk_builder_error_quark ())
|
||||
|
||||
typedef struct _GtkBuilder GtkBuilder;
|
||||
typedef struct _GtkBuilderClass GtkBuilderClass;
|
||||
typedef struct _GtkBuilderPrivate GtkBuilderPrivate;
|
||||
|
||||
@ -108,14 +107,6 @@ struct _GtkBuilderClass
|
||||
void (*_gtk_reserved8) (void);
|
||||
};
|
||||
|
||||
typedef void (*GtkBuilderConnectFunc) (GtkBuilder *builder,
|
||||
GObject *object,
|
||||
const gchar *signal_name,
|
||||
const gchar *handler_name,
|
||||
GObject *connect_object,
|
||||
GConnectFlags flags,
|
||||
gpointer user_data);
|
||||
|
||||
GType gtk_builder_get_type (void) G_GNUC_CONST;
|
||||
GtkBuilder* gtk_builder_new (void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user