* Boston, MA 02111-1307, USA.
*/
-#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
typedef struct _GtkBuilderClass GtkBuilderClass;
typedef struct _GtkBuilderPrivate GtkBuilderPrivate;
+/**
+ * GtkBuilderError:
+ * @GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION: A type-func attribute didn't name
+ * a function that returns a #GType.
+ * @GTK_BUILDER_ERROR_UNHANDLED_TAG: The input contained a tag that #GtkBuilder
+ * can't handle.
+ * @GTK_BUILDER_ERROR_MISSING_ATTRIBUTE: An attribute that is required by
+ * #GtkBuilder was missing.
+ * @GTK_BUILDER_ERROR_INVALID_ATTRIBUTE: #GtkBuilder found an attribute that
+ * it doesn't understand.
+ * @GTK_BUILDER_ERROR_INVALID_TAG: #GtkBuilder found a tag that
+ * it doesn't understand.
+ * @GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE: A required property value was
+ * missing.
+ * @GTK_BUILDER_ERROR_INVALID_VALUE: #GtkBuilder couldn't parse
+ * some attribute value.
+ * @GTK_BUILDER_ERROR_VERSION_MISMATCH: The input file requires a newer version
+ * of GTK+.
+ * @GTK_BUILDER_ERROR_DUPLICATE_ID: An object id occurred twice.
+ *
+ * Error codes that identify various errors that can occur while using
+ * #GtkBuilder.
+ */
typedef enum
{
- GTK_BUILDER_ERROR_VERSION_MISMATCH,
GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION,
GTK_BUILDER_ERROR_UNHANDLED_TAG,
GTK_BUILDER_ERROR_MISSING_ATTRIBUTE,
GTK_BUILDER_ERROR_INVALID_ATTRIBUTE,
GTK_BUILDER_ERROR_INVALID_TAG,
GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE,
- GTK_BUILDER_ERROR_INVALID_VALUE
+ GTK_BUILDER_ERROR_INVALID_VALUE,
+ GTK_BUILDER_ERROR_VERSION_MISMATCH,
+ GTK_BUILDER_ERROR_DUPLICATE_ID
} GtkBuilderError;
GQuark gtk_builder_error_quark (void);
const gchar *buffer,
gsize length,
GError **error);
+guint gtk_builder_add_objects_from_file (GtkBuilder *builder,
+ const gchar *filename,
+ gchar **object_ids,
+ GError **error);
+guint gtk_builder_add_objects_from_string (GtkBuilder *builder,
+ const gchar *buffer,
+ gsize length,
+ gchar **object_ids,
+ GError **error);
GObject* gtk_builder_get_object (GtkBuilder *builder,
const gchar *name);
GSList* gtk_builder_get_objects (GtkBuilder *builder);
GValue *value,
GError **error);
+/**
+ * GTK_BUILDER_WARN_INVALID_CHILD_TYPE:
+ * @object: the #GtkBuildable on which the warning ocurred
+ * @type: the unexpected type value
+ *
+ * This macro should be used to emit a warning about and unexpected @type value
+ * in a #GtkBuildable add_child implementation.
+ */
#define GTK_BUILDER_WARN_INVALID_CHILD_TYPE(object, type) \
- g_warning ("'%s' is not a valid child type of '%s'", type, g_type_name (G_OBJECT_TYPE (type)))
+ g_warning ("'%s' is not a valid child type of '%s'", type, g_type_name (G_OBJECT_TYPE (object)))
G_END_DECLS