1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2006-2007 Async Open Source,
3 * Johan Dahlin <jdahlin@async.com.br>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22 #error "Only <gtk/gtk.h> can be included directly."
25 #ifndef __GTK_BUILDABLE_H__
26 #define __GTK_BUILDABLE_H__
29 #include <gtk/gtkbuilder.h>
30 #include <gtk/gtktypeutils.h>
34 #define GTK_TYPE_BUILDABLE (gtk_buildable_get_type ())
35 #define GTK_BUILDABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BUILDABLE, GtkBuildable))
36 #define GTK_BUILDABLE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GTK_TYPE_BUILDABLE, GtkBuildableIface))
37 #define GTK_IS_BUILDABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BUILDABLE))
38 #define GTK_BUILDABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_BUILDABLE, GtkBuildableIface))
41 typedef struct _GtkBuildable GtkBuildable; /* Dummy typedef */
42 typedef struct _GtkBuildableIface GtkBuildableIface;
44 struct _GtkBuildableIface
46 GTypeInterface g_iface;
49 void (* set_name) (GtkBuildable *buildable,
51 const gchar * (* get_name) (GtkBuildable *buildable);
52 void (* add_child) (GtkBuildable *buildable,
56 void (* set_buildable_property) (GtkBuildable *buildable,
60 GObject * (* construct_child) (GtkBuildable *buildable,
63 gboolean (* custom_tag_start) (GtkBuildable *buildable,
67 GMarkupParser *parser,
69 void (* custom_tag_end) (GtkBuildable *buildable,
74 void (* custom_finished) (GtkBuildable *buildable,
79 void (* parser_finished) (GtkBuildable *buildable,
82 GObject * (* get_internal_child) (GtkBuildable *buildable,
84 const gchar *childname);
88 GType gtk_buildable_get_type (void) G_GNUC_CONST;
90 void gtk_buildable_set_name (GtkBuildable *buildable,
92 const gchar * gtk_buildable_get_name (GtkBuildable *buildable);
93 void gtk_buildable_add_child (GtkBuildable *buildable,
97 void gtk_buildable_set_buildable_property (GtkBuildable *buildable,
100 const GValue *value);
101 GObject * gtk_buildable_construct_child (GtkBuildable *buildable,
104 gboolean gtk_buildable_custom_tag_start (GtkBuildable *buildable,
107 const gchar *tagname,
108 GMarkupParser *parser,
110 void gtk_buildable_custom_tag_end (GtkBuildable *buildable,
113 const gchar *tagname,
115 void gtk_buildable_custom_finished (GtkBuildable *buildable,
118 const gchar *tagname,
120 void gtk_buildable_parser_finished (GtkBuildable *buildable,
121 GtkBuilder *builder);
122 GObject * gtk_buildable_get_internal_child (GtkBuildable *buildable,
124 const gchar *childname);
128 #endif /* __GTK_BUILDABLE_H__ */