diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2018-08-20 21:12:06 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2018-08-20 21:12:06 -0400 |
commit | 63e87c2d0c9d263f14c77b68f85c67d46ece82a9 (patch) | |
tree | 6260365cbf7d24f37d27669e8538227fcb72e243 /gtk+-mingw/share/gtk-doc/html/gtk3/GtkBuilder.html | |
parent | a4460f6d9453bbd7e584937686449cef3e19f052 (diff) |
Diffstat (limited to 'gtk+-mingw/share/gtk-doc/html/gtk3/GtkBuilder.html')
-rw-r--r-- | gtk+-mingw/share/gtk-doc/html/gtk3/GtkBuilder.html | 1232 |
1 files changed, 0 insertions, 1232 deletions
diff --git a/gtk+-mingw/share/gtk-doc/html/gtk3/GtkBuilder.html b/gtk+-mingw/share/gtk-doc/html/gtk3/GtkBuilder.html deleted file mode 100644 index c3105d3..0000000 --- a/gtk+-mingw/share/gtk-doc/html/gtk3/GtkBuilder.html +++ /dev/null @@ -1,1232 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>GtkBuilder</title> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> -<link rel="home" href="index.html" title="GTK+ 3 Reference Manual"> -<link rel="up" href="Builder.html" title="Interface builder"> -<link rel="prev" href="GtkBuildable.html" title="GtkBuildable"> -<link rel="next" href="Application.html" title="Application support"> -<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)"> -<link rel="stylesheet" href="style.css" type="text/css"> -</head> -<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> -<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> -<tr valign="middle"> -<td><a accesskey="p" href="GtkBuildable.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> -<td><a accesskey="u" href="Builder.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> -<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> -<th width="100%" align="center">GTK+ 3 Reference Manual</th> -<td><a accesskey="n" href="Application.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> -</tr> -<tr><td colspan="5" class="shortcuts"> -<a href="#GtkBuilder.synopsis" class="shortcut">Top</a> - | - <a href="#GtkBuilder.description" class="shortcut">Description</a> - | - <a href="#GtkBuilder.object-hierarchy" class="shortcut">Object Hierarchy</a> - | - <a href="#GtkBuilder.properties" class="shortcut">Properties</a> -</td></tr> -</table> -<div class="refentry"> -<a name="GtkBuilder"></a><div class="titlepage"></div> -<div class="refnamediv"><table width="100%"><tr> -<td valign="top"> -<h2><span class="refentrytitle"><a name="GtkBuilder.top_of_page"></a>GtkBuilder</span></h2> -<p>GtkBuilder — Build an interface from an XML UI definition</p> -</td> -<td valign="top" align="right"></td> -</tr></table></div> -<div class="refsynopsisdiv"> -<a name="GtkBuilder.synopsis"></a><h2>Synopsis</h2> -<pre class="synopsis"> -#include <gtk/gtk.h> - -struct <a class="link" href="GtkBuilder.html#GtkBuilder-struct" title="struct GtkBuilder">GtkBuilder</a>; -<span class="returnvalue">void</span> (<a class="link" href="GtkBuilder.html#GtkBuilderConnectFunc" title="GtkBuilderConnectFunc ()">*GtkBuilderConnectFunc</a>) (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *handler_name</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *connect_object</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#GConnectFlags"><span class="type">GConnectFlags</span></a> flags</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); -enum <a class="link" href="GtkBuilder.html#GtkBuilderError" title="enum GtkBuilderError">GtkBuilderError</a>; -<a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="returnvalue">GtkBuilder</span></a> * <a class="link" href="GtkBuilder.html#gtk-builder-new" title="gtk_builder_new ()">gtk_builder_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-add-from-file" title="gtk_builder_add_from_file ()">gtk_builder_add_from_file</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-add-from-resource" title="gtk_builder_add_from_resource ()">gtk_builder_add_from_resource</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *resource_path</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-add-from-string" title="gtk_builder_add_from_string ()">gtk_builder_add_from_string</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-add-objects-from-file" title="gtk_builder_add_objects_from_file ()">gtk_builder_add_objects_from_file</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **object_ids</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-add-objects-from-string" title="gtk_builder_add_objects_from_string ()">gtk_builder_add_objects_from_string</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **object_ids</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * <a class="link" href="GtkBuilder.html#gtk-builder-get-object" title="gtk_builder_get_object ()">gtk_builder_get_object</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="GtkBuilder.html#gtk-builder-get-objects" title="gtk_builder_get_objects ()">gtk_builder_get_objects</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>); -<span class="returnvalue">void</span> <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals" title="gtk_builder_connect_signals ()">gtk_builder_connect_signals</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); -<span class="returnvalue">void</span> <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals-full" title="gtk_builder_connect_signals_full ()">gtk_builder_connect_signals_full</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a class="link" href="GtkBuilder.html#GtkBuilderConnectFunc" title="GtkBuilderConnectFunc ()"><span class="type">GtkBuilderConnectFunc</span></a> func</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); -<span class="returnvalue">void</span> <a class="link" href="GtkBuilder.html#gtk-builder-set-translation-domain" title="gtk_builder_set_translation_domain ()">gtk_builder_set_translation_domain</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>); -const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GtkBuilder.html#gtk-builder-get-translation-domain" title="gtk_builder_get_translation_domain ()">gtk_builder_get_translation_domain</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>); -<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-get-type-from-name" title="gtk_builder_get_type_from_name ()">gtk_builder_get_type_from_name</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *type_name</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-value-from-string" title="gtk_builder_value_from_string ()">gtk_builder_value_from_string</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkBuilder.html#gtk-builder-value-from-string-type" title="gtk_builder_value_from_string_type ()">gtk_builder_value_from_string_type</a> (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); -#define <a class="link" href="GtkBuilder.html#GTK-BUILDER-WARN-INVALID-CHILD-TYPE:CAPS" title="GTK_BUILDER_WARN_INVALID_CHILD_TYPE()">GTK_BUILDER_WARN_INVALID_CHILD_TYPE</a> (object, - type) -#define <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR">GTK_BUILDER_ERROR</a> -</pre> -</div> -<div class="refsect1"> -<a name="GtkBuilder.object-hierarchy"></a><h2>Object Hierarchy</h2> -<pre class="synopsis"> - <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> - +----GtkBuilder -</pre> -</div> -<div class="refsect1"> -<a name="GtkBuilder.properties"></a><h2>Properties</h2> -<pre class="synopsis"> - "<a class="link" href="GtkBuilder.html#GtkBuilder--translation-domain" title='The "translation-domain" property'>translation-domain</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write -</pre> -</div> -<div class="refsect1"> -<a name="GtkBuilder.description"></a><h2>Description</h2> -<p> -A GtkBuilder is an auxiliary object that reads textual descriptions -of a user interface and instantiates the described objects. To pass a -description to a GtkBuilder, call <a class="link" href="GtkBuilder.html#gtk-builder-add-from-file" title="gtk_builder_add_from_file ()"><code class="function">gtk_builder_add_from_file()</code></a> or -<a class="link" href="GtkBuilder.html#gtk-builder-add-from-string" title="gtk_builder_add_from_string ()"><code class="function">gtk_builder_add_from_string()</code></a>. These functions can be called multiple -times; the builder merges the content of all descriptions. -</p> -<p> -A GtkBuilder holds a reference to all objects that it has constructed -and drops these references when it is finalized. This finalization can -cause the destruction of non-widget objects or widgets which are not -contained in a toplevel window. For toplevel windows constructed by a -builder, it is the responsibility of the user to call <a class="link" href="GtkWidget.html#gtk-widget-destroy" title="gtk_widget_destroy ()"><code class="function">gtk_widget_destroy()</code></a> -to get rid of them and all the widgets they contain. -</p> -<p> -The functions <a class="link" href="GtkBuilder.html#gtk-builder-get-object" title="gtk_builder_get_object ()"><code class="function">gtk_builder_get_object()</code></a> and <a class="link" href="GtkBuilder.html#gtk-builder-get-objects" title="gtk_builder_get_objects ()"><code class="function">gtk_builder_get_objects()</code></a> -can be used to access the widgets in the interface by the names assigned -to them inside the UI description. Toplevel windows returned by these -functions will stay around until the user explicitly destroys them -with <a class="link" href="GtkWidget.html#gtk-widget-destroy" title="gtk_widget_destroy ()"><code class="function">gtk_widget_destroy()</code></a>. Other widgets will either be part of a -larger hierarchy constructed by the builder (in which case you should -not have to worry about their lifecycle), or without a parent, in which -case they have to be added to some container to make use of them. -Non-widget objects need to be reffed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> to keep them -beyond the lifespan of the builder. -</p> -<p> -The function <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals" title="gtk_builder_connect_signals ()"><code class="function">gtk_builder_connect_signals()</code></a> and variants thereof can be -used to connect handlers to the named signals in the description. -</p> -<p> -</p> -<div class="refsect2"> -<a name="BUILDER-UI"></a><h3>GtkBuilder UI Definitions</h3> -<p> -GtkBuilder parses textual descriptions of user interfaces which are specified -in an XML format which can be roughly described by the RELAX NG schema below. -We refer to these descriptions as <em class="firstterm">GtkBuilder UI definitions</em> -or just <em class="firstterm">UI definitions</em> if the context is clear. Do not -confuse GtkBuilder UI Definitions with -<a class="link" href="GtkUIManager.html#XML-UI" title="UI Definitions">GtkUIManager UI Definitions</a>, which are more -limited in scope. -</p> -<pre class="programlisting"> -start = element interface { - attribute domain { text } ?, - ( requires | object | menu ) * -} - -requires = element requires { - attribute lib { text }, - attribute version { text } -} - -object = element object { - attribute id { xsd:ID }, - attribute class { text }, - attribute type-func { text } ?, - attribute constructor { text } ?, - (property | signal | child | ANY) * -} - -property = element property { - attribute name { text }, - attribute translatable { "yes" | "no" } ?, - attribute comments { text } ?, - attribute context { text } ?, - text ? -} - -signal = element signal { - attribute name { text }, - attribute handler { text }, - attribute after { text } ?, - attribute swapped { text } ?, - attribute object { text } ?, - attribute last_modification_time { text } ?, - empty -} - -child = element child { - attribute type { text } ?, - attribute internal-child { text } ?, - (object | ANY)* -} - -menu = element menu { - attribute id { xsd:ID }, - attribute domain { text } ?, - (item | submenu | section) * -} - -item = element item { - attribute id { xsd:ID } ?, - (attribute_ | link) * -} - -attribute_ = element attribute { - attribute name { text }, - attribute type { text } ?, - attribute translatable { "yes" | "no" } ?, - attribute context { text } ?, - attribute comments { text } ?, - text ? -} - -link = element link { - attribute id { xsd:ID } ?, - attribute name { text }, - item * -} - -submenu = element submenu { - attribute id { xsd:ID } ?, - (attribute_ | item | submenu | section) * -} - -section = element section { - attribute id { xsd:ID } ?, - (attribute_ | item | submenu | section) * -} - -ANY = element * - (interface | requires | object | property | signal | child | menu | item | attribute | link | submenu | section) { - attribute * { text } *, - (ALL * & text ?) -} -ALL = element * { - attribute * { text } *, - (ALL * & text ?) -} - -</pre> -<p> -The toplevel element is <interface>. It optionally takes a "domain" -attribute, which will make the builder look for translated strings using -<code class="function">dgettext()</code> in the domain specified. This can also be done by calling -<a class="link" href="GtkBuilder.html#gtk-builder-set-translation-domain" title="gtk_builder_set_translation_domain ()"><code class="function">gtk_builder_set_translation_domain()</code></a> on the builder. Objects are described by -<object> elements, which can contain <property> elements to set -properties, <signal> elements which connect signals to handlers, and -<child> elements, which describe child objects (most often widgets -inside a container, but also e.g. actions in an action group, or columns in a -tree model). A <child> element contains an <object> element which -describes the child object. The target toolkit version(s) are described by -<requires> elements, the "lib" attribute specifies the widget library -in question (currently the only supported value is "gtk+") and the "version" -attribute specifies the target version in the form -"<major>.<minor>". The builder will error out if the version -requirements are not met. -</p> -<p> -Typically, the specific kind of object represented by an <object> -element is specified by the "class" attribute. If the type has not been -loaded yet, GTK+ tries to find the <code class="function"><code class="function">_get_type()</code></code> from the -class name by applying heuristics. This works in most cases, but if -necessary, it is possible to specify the name of the -<code class="function"><code class="function">_get_type()</code></code> explictly with the "type-func" attribute. -As a special case, GtkBuilder allows to use an object that has been -constructed by a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> in another part of the UI definition by -specifying the id of the <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> in the "constructor" attribute and the -name of the object in the "id" attribute. -</p> -<p> -Objects must be given a name with the "id" attribute, which allows the -application to retrieve them from the builder with <a class="link" href="GtkBuilder.html#gtk-builder-get-object" title="gtk_builder_get_object ()"><code class="function">gtk_builder_get_object()</code></a>. -An id is also necessary to use the object as property value in other parts of -the UI definition. -</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> -<h3 class="title">Note</h3> -<p> -Prior to 2.20, GtkBuilder was setting the "name" property of constructed widgets to the -"id" attribute. In GTK+ 2.20 or newer, you have to use <a class="link" href="GtkBuildable.html#gtk-buildable-get-name" title="gtk_buildable_get_name ()"><code class="function">gtk_buildable_get_name()</code></a> instead -of <a class="link" href="GtkWidget.html#gtk-widget-get-name" title="gtk_widget_get_name ()"><code class="function">gtk_widget_get_name()</code></a> to obtain the "id", or set the "name" property in your UI -definition. -</p> -</div> -<p> -Setting properties of objects is pretty straightforward with the -<property> element: the "name" attribute specifies the name of the -property, and the content of the element specifies the value. If the -"translatable" attribute is set to a true value, GTK+ uses <code class="function">gettext()</code> (or -<code class="function">dgettext()</code> if the builder has a translation domain set) to find a translation -for the value. This happens before the value is parsed, so it can be used for -properties of any type, but it is probably most useful for string properties. -It is also possible to specify a context to disambiguate short strings, and -comments which may help the translators. -</p> -<p> -GtkBuilder can parse textual representations for the most common property -types: characters, strings, integers, floating-point numbers, booleans -(strings like "TRUE", "t", "yes", "y", "1" are interpreted as <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, strings -like "FALSE, "f", "no", "n", "0" are interpreted as <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>), enumerations -(can be specified by their name, nick or integer value), flags (can be -specified by their name, nick, integer value, optionally combined with "|", -e.g. "GTK_VISIBLE|GTK_REALIZED") and colors (in a format understood by -<a href="http://developer.gnome.org/gdk/gdk3-Colors.html#gdk-color-parse"><code class="function">gdk_color_parse()</code></a>). Objects can be referred to by their name. Pixbufs can be -specified as a filename of an image file to load. In general, GtkBuilder -allows forward references to objects — an object doesn't have to be -constructed before it can be referred to. The exception to this rule is that -an object has to be constructed before it can be used as the value of a -construct-only property. -</p> -<p> -Signal handlers are set up with the <signal> element. The "name" -attribute specifies the name of the signal, and the "handler" attribute -specifies the function to connect to the signal. By default, GTK+ tries to -find the handler using <a href="http://library.gnome.org/devel/glib/unstable/glib-Dynamic-Loading-of-Modules.html#g-module-symbol"><code class="function">g_module_symbol()</code></a>, but this can be changed by passing -a custom <a class="link" href="GtkBuilder.html#GtkBuilderConnectFunc" title="GtkBuilderConnectFunc ()"><span class="type">GtkBuilderConnectFunc</span></a> to <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals-full" title="gtk_builder_connect_signals_full ()"><code class="function">gtk_builder_connect_signals_full()</code></a>. The -remaining attributes, "after", "swapped" and "object", have the same meaning -as the corresponding parameters of the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-object"><code class="function">g_signal_connect_object()</code></a> or -<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-data"><code class="function">g_signal_connect_data()</code></a> functions. A "last_modification_time" attribute -is also allowed, but it does not have a meaning to the builder. -</p> -<p> -Sometimes it is necessary to refer to widgets which have implicitly been -constructed by GTK+ as part of a composite widget, to set properties on them -or to add further children (e.g. the <em class="parameter"><code>vbox</code></em> of a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>). This can be -achieved by setting the "internal-child" propery of the <child> element -to a true value. Note that GtkBuilder still requires an <object> -element for the internal child, even if it has already been constructed. -</p> -<p> -A number of widgets have different places where a child can be added (e.g. -tabs vs. page content in notebooks). This can be reflected in a UI definition -by specifying the "type" attribute on a <child>. The possible values -for the "type" attribute are described in the sections describing the -widget-specific portions of UI definitions. -</p> -<div class="example"> -<a name="id1368522"></a><p class="title"><b>Example 109. A GtkBuilder UI Definition</b></p> -<div class="example-contents"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="symbol"><</span><span class="normal">interface</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkDialog"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"dialog1"</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">child</span><span class="normal"> internal</span><span class="symbol">-</span><span class="normal">child</span><span class="symbol">=</span><span class="string">"vbox"</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkVBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"vbox1"</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"border-width"</span><span class="symbol">></span><span class="number">10</span><span class="symbol"></</span><span class="normal">property</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">child</span><span class="normal"> internal</span><span class="symbol">-</span><span class="normal">child</span><span class="symbol">=</span><span class="string">"action_area"</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkHButtonBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"hbuttonbox1"</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"border-width"</span><span class="symbol">></span><span class="number">20</span><span class="symbol"></</span><span class="normal">property</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="normal">child</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkButton"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"ok_button"</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="symbol">></span><span class="normal">gtk</span><span class="symbol">-</span><span class="normal">ok</span><span class="symbol"></</span><span class="normal">property</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"use-stock"</span><span class="symbol">></span><span class="normal"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol"></</span><span class="normal">property</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"><</span><span class="usertype">signal</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"clicked"</span><span class="normal"> handler</span><span class="symbol">=</span><span class="string">"ok_button_clicked"</span><span class="symbol">/></span> -<span class="normal"> </span><span class="symbol"></</span><span class="normal">object</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"></</span><span class="normal">child</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"></</span><span class="normal">object</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"></</span><span class="normal">child</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"></</span><span class="normal">object</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"></</span><span class="normal">child</span><span class="symbol">></span> -<span class="normal"> </span><span class="symbol"></</span><span class="normal">object</span><span class="symbol">></span> -<span class="symbol"></</span><span class="normal">interface</span><span class="symbol">></span></pre></td> - </tr> - </tbody> - </table> -</div> - -</div> -<br class="example-break"><p> -Beyond this general structure, several object classes define their own XML -DTD fragments for filling in the ANY placeholders in the DTD above. Note that -a custom element in a <child> element gets parsed by the custom tag -handler of the parent object, while a custom element in an <object> -element gets parsed by the custom tag handler of the object. -</p> -<p> -These XML fragments are explained in the documentation of the respective -objects, see -<a class="link" href="GtkWidget.html#GtkWidget-BUILDER-UI" title="GtkWidget as GtkBuildable">GtkWidget</a>, -<a class="link" href="GtkLabel.html#GtkLabel-BUILDER-UI" title="GtkLabel as GtkBuildable">GtkLabel</a>, -<a class="link" href="GtkWindow.html#GtkWindow-BUILDER-UI" title="GtkWindow as GtkBuildable">GtkWindow</a>, -<a class="link" href="GtkContainer.html#GtkContainer-BUILDER-UI" title="GtkContainer as GtkBuildable">GtkContainer</a>, -<a class="link" href="GtkDialog.html#GtkDialog-BUILDER-UI" title="GtkDialog as GtkBuildable">GtkDialog</a>, -<a class="link" href="GtkCellLayout.html#GtkCellLayout-BUILDER-UI" title="GtkCellLayouts as GtkBuildable">GtkCellLayout</a>, -<a class="link" href="GtkColorSelectionDialog.html#GtkColorSelectionDialog-BUILDER-UI" title="GtkColorSelectionDialog as GtkBuildable">GtkColorSelectionDialog</a>, -<a class="link" href="GtkFontSelectionDialog.html#GtkFontSelectionDialog-BUILDER-UI" title="GtkFontSelectionDialog as GtkBuildable">GtkFontSelectionDialog</a>, -<a class="link" href="GtkExpander.html#GtkExpander-BUILDER-UI" title="GtkExpander as GtkBuildable">GtkExpander</a>, -<a class="link" href="GtkFrame.html#GtkFrame-BUILDER-UI" title="GtkFrame as GtkBuildable">GtkFrame</a>, -<a class="link" href="GtkListStore.html#GtkListStore-BUILDER-UI" title="GtkListStore as GtkBuildable">GtkListStore</a>, -<a class="link" href="GtkTreeStore.html#GtkTreeStore-BUILDER-UI" title="GtkTreeStore as GtkBuildable">GtkTreeStore</a>, -<a class="link" href="GtkNotebook.html#GtkNotebook-BUILDER-UI" title="GtkNotebook as GtkBuildable">GtkNotebook</a>, -<a class="link" href="GtkSizeGroup.html#GtkSizeGroup-BUILDER-UI" title="GtkSizeGroup as GtkBuildable">GtkSizeGroup</a>, -<a class="link" href="GtkTreeView.html#GtkTreeView-BUILDER-UI" title="GtkTreeView as GtkBuildable">GtkTreeView</a>, -<a class="link" href="GtkUIManager.html#GtkUIManager-BUILDER-UI" title="GtkUIManager as GtkBuildable">GtkUIManager</a>, -<a class="link" href="GtkActionGroup.html#GtkActionGroup-BUILDER-UI" title="GtkActionGroup as GtkBuildable">GtkActionGroup</a>. -<a class="link" href="GtkMenuItem.html#GtkMenuItem-BUILDER-UI" title="GtkMenuItem as GtkBuildable">GtkMenuItem</a>, -<a class="link" href="GtkMenuToolButton.html#GtkMenuToolButton-BUILDER-UI" title="GtkMenuToolButton as GtkBuildable">GtkMenuToolButton</a>, -<a class="link" href="GtkAssistant.html#GtkAssistant-BUILDER-UI" title="GtkAssistant as GtkBuildable">GtkAssistant</a>, -<a class="link" href="GtkScale.html#GtkScale-BUILDER-UI" title="GtkScale as GtkBuildable">GtkScale</a>, -<a class="link" href="GtkComboBoxText.html#GtkComboBoxText-BUILDER-UI" title="GtkComboBoxText as GtkBuildable">GtkComboBoxText</a>, -<a class="link" href="GtkRecentFilter.html#GtkRecentFilter-BUILDER-UI" title="GtkRecentFilter as GtkBuildable">GtkRecentFilter</a>, -<a class="link" href="GtkFileFilter.html#GtkFileFilter-BUILDER-UI" title="GtkFileFilter as GtkBuildable">GtkFileFilter</a>, -<a class="link" href="GtkTextTagTable.html#GtkTextTagTable-BUILDER-UI" title="GtkTextTagTables as GtkBuildable">GtkTextTagTable</a>. -</p> -</div> -<p> -</p> -<hr> -<div class="refsect2"> -<a name="id1368705"></a><h3>Embedding other XML</h3> -<p> -Apart from the language for UI descriptions that has been explained -in the previous section, GtkBuilder can also parse XML fragments -of GMenu markup. The resulting -<a href="http://library.gnome.org/devel/gio/unstable/GMenu.html"><span class="type">GMenu</span></a> object and its named submenus are available via -<a class="link" href="GtkBuilder.html#gtk-builder-get-object" title="gtk_builder_get_object ()"><code class="function">gtk_builder_get_object()</code></a> like other constructed objects. -</p> -</div> -<p> -</p> -</div> -<div class="refsect1"> -<a name="GtkBuilder.details"></a><h2>Details</h2> -<div class="refsect2"> -<a name="GtkBuilder-struct"></a><h3>struct GtkBuilder</h3> -<pre class="programlisting">struct GtkBuilder;</pre> -</div> -<hr> -<div class="refsect2"> -<a name="GtkBuilderConnectFunc"></a><h3>GtkBuilderConnectFunc ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> (*GtkBuilderConnectFunc) (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *handler_name</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *connect_object</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#GConnectFlags"><span class="type">GConnectFlags</span></a> flags</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> -<p> -This is the signature of a function used to connect signals. It is used -by the <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals" title="gtk_builder_connect_signals ()"><code class="function">gtk_builder_connect_signals()</code></a> and <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals-full" title="gtk_builder_connect_signals_full ()"><code class="function">gtk_builder_connect_signals_full()</code></a> -methods. It is mainly intended for interpreted language bindings, but -could be useful where the programmer wants more control over the signal -connection process. Note that this function can only be called once, -subsequent calls will do nothing. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td> -<td>object to connect a signal to</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>signal_name</code></em> :</span></p></td> -<td>name of the signal</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>handler_name</code></em> :</span></p></td> -<td>name of the handler</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>connect_object</code></em> :</span></p></td> -<td>a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-object"><code class="function">g_signal_connect_object()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#GConnectFlags"><span class="type">GConnectFlags</span></a> to use</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="GtkBuilderError"></a><h3>enum GtkBuilderError</h3> -<pre class="programlisting">typedef enum { - 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_VERSION_MISMATCH, - GTK_BUILDER_ERROR_DUPLICATE_ID -} GtkBuilderError; -</pre> -<p> -Error codes that identify various errors that can occur while using -<a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-INVALID-TYPE-FUNCTION:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION</code></span></p></td> -<td>A type-func attribute didn't name - a function that returns a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a>. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-UNHANDLED-TAG:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_UNHANDLED_TAG</code></span></p></td> -<td>The input contained a tag that <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> - can't handle. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-MISSING-ATTRIBUTE:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_MISSING_ATTRIBUTE</code></span></p></td> -<td>An attribute that is required by - <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> was missing. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-INVALID-ATTRIBUTE:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_INVALID_ATTRIBUTE</code></span></p></td> -<td> -<a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> found an attribute that - it doesn't understand. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-INVALID-TAG:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_INVALID_TAG</code></span></p></td> -<td> -<a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> found a tag that - it doesn't understand. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-MISSING-PROPERTY-VALUE:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE</code></span></p></td> -<td>A required property value was - missing. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-INVALID-VALUE:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_INVALID_VALUE</code></span></p></td> -<td> -<a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> couldn't parse - some attribute value. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-VERSION-MISMATCH:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_VERSION_MISMATCH</code></span></p></td> -<td>The input file requires a newer version - of GTK+. -</td> -</tr> -<tr> -<td><p><a name="GTK-BUILDER-ERROR-DUPLICATE-ID:CAPS"></a><span class="term"><code class="literal">GTK_BUILDER_ERROR_DUPLICATE_ID</code></span></p></td> -<td>An object id occurred twice. -</td> -</tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-new"></a><h3>gtk_builder_new ()</h3> -<pre class="programlisting"><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="returnvalue">GtkBuilder</span></a> * gtk_builder_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> -<p> -Creates a new builder object. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody><tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> object</td> -</tr></tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-add-from-file"></a><h3>gtk_builder_add_from_file ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gtk_builder_add_from_file (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -Parses a file containing a <a class="link" href="GtkBuilder.html#BUILDER-UI" title="GtkBuilder UI Definitions">GtkBuilder -UI definition</a> and merges it with the current contents of <em class="parameter"><code>builder</code></em>. -</p> -<p> -Upon errors 0 will be returned and <em class="parameter"><code>error</code></em> will be assigned a -<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> from the <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR"><span class="type">GTK_BUILDER_ERROR</span></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Simple-XML-Subset-Parser.html#G-MARKUP-ERROR:CAPS"><span class="type">G_MARKUP_ERROR</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> -domain. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td> -<td>the name of the file to parse</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>return location for an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A positive value on success, 0 if an error occurred</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-add-from-resource"></a><h3>gtk_builder_add_from_resource ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gtk_builder_add_from_resource (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *resource_path</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -Parses a resource file containing a <a class="link" href="GtkBuilder.html#BUILDER-UI" title="GtkBuilder UI Definitions">GtkBuilder -UI definition</a> and merges it with the current contents of <em class="parameter"><code>builder</code></em>. -</p> -<p> -Upon errors 0 will be returned and <em class="parameter"><code>error</code></em> will be assigned a -<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> from the <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR"><span class="type">GTK_BUILDER_ERROR</span></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Simple-XML-Subset-Parser.html#G-MARKUP-ERROR:CAPS"><span class="type">G_MARKUP_ERROR</span></a> or <a href="http://library.gnome.org/devel/gio/unstable/gio-GResource.html#G-RESOURCE-ERROR:CAPS"><span class="type">G_RESOURCE_ERROR</span></a> -domain. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>resource_path</code></em> :</span></p></td> -<td>the path of the resource file to parse</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>return location for an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A positive value on success, 0 if an error occurred</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 3.4</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-add-from-string"></a><h3>gtk_builder_add_from_string ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gtk_builder_add_from_string (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -Parses a string containing a <a class="link" href="GtkBuilder.html#BUILDER-UI" title="GtkBuilder UI Definitions">GtkBuilder -UI definition</a> and merges it with the current contents of <em class="parameter"><code>builder</code></em>. -</p> -<p> -Upon errors 0 will be returned and <em class="parameter"><code>error</code></em> will be assigned a -<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> from the <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR"><span class="type">GTK_BUILDER_ERROR</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Simple-XML-Subset-Parser.html#G-MARKUP-ERROR:CAPS"><span class="type">G_MARKUP_ERROR</span></a> domain. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> -<td>the string to parse</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> -<td>the length of <em class="parameter"><code>buffer</code></em> (may be -1 if <em class="parameter"><code>buffer</code></em> is nul-terminated)</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>return location for an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A positive value on success, 0 if an error occurred</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-add-objects-from-file"></a><h3>gtk_builder_add_objects_from_file ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gtk_builder_add_objects_from_file (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **object_ids</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -Parses a file containing a <a class="link" href="GtkBuilder.html#BUILDER-UI" title="GtkBuilder UI Definitions">GtkBuilder -UI definition</a> building only the requested objects and merges -them with the current contents of <em class="parameter"><code>builder</code></em>. -</p> -<p> -Upon errors 0 will be returned and <em class="parameter"><code>error</code></em> will be assigned a -<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> from the <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR"><span class="type">GTK_BUILDER_ERROR</span></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Simple-XML-Subset-Parser.html#G-MARKUP-ERROR:CAPS"><span class="type">G_MARKUP_ERROR</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#G-FILE-ERROR:CAPS"><span class="type">G_FILE_ERROR</span></a> -domain. -</p> -<p> -</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> -<h3 class="title">Note</h3> -<p> -If you are adding an object that depends on an object that is not -its child (for instance a <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a> that depends on its -<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>), you have to explicitely list all of them in <em class="parameter"><code>object_ids</code></em>. -</p> -</div> -<p> -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td> -<td>the name of the file to parse</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>object_ids</code></em> :</span></p></td> -<td>nul-terminated array of objects to build. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>return location for an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A positive value on success, 0 if an error occurred</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.14</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-add-objects-from-string"></a><h3>gtk_builder_add_objects_from_string ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gtk_builder_add_objects_from_string (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **object_ids</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -Parses a string containing a <a class="link" href="GtkBuilder.html#BUILDER-UI" title="GtkBuilder UI Definitions">GtkBuilder -UI definition</a> building only the requested objects and merges -them with the current contents of <em class="parameter"><code>builder</code></em>. -</p> -<p> -Upon errors 0 will be returned and <em class="parameter"><code>error</code></em> will be assigned a -<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> from the <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR"><span class="type">GTK_BUILDER_ERROR</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Simple-XML-Subset-Parser.html#G-MARKUP-ERROR:CAPS"><span class="type">G_MARKUP_ERROR</span></a> domain. -</p> -<p> -</p> -<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> -<h3 class="title">Note</h3> -<p> -If you are adding an object that depends on an object that is not -its child (for instance a <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a> that depends on its -<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>), you have to explicitely list all of them in <em class="parameter"><code>object_ids</code></em>. -</p> -</div> -<p> -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> -<td>the string to parse</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> -<td>the length of <em class="parameter"><code>buffer</code></em> (may be -1 if <em class="parameter"><code>buffer</code></em> is nul-terminated)</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>object_ids</code></em> :</span></p></td> -<td>nul-terminated array of objects to build. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>return location for an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A positive value on success, 0 if an error occurred</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.14</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-get-object"></a><h3>gtk_builder_get_object ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * gtk_builder_get_object (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre> -<p> -Gets the object named <em class="parameter"><code>name</code></em>. Note that this function does not -increment the reference count of the returned object. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> -<td>name of object to get</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the object named <em class="parameter"><code>name</code></em> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if -it could not be found in the object tree. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-get-objects"></a><h3>gtk_builder_get_objects ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * gtk_builder_get_objects (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>);</pre> -<p> -Gets all objects that have been constructed by <em class="parameter"><code>builder</code></em>. Note that -this function does not increment the reference counts of the returned -objects. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a newly-allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> containing all the objects -constructed by the <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> instance. It should be freed by -<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#g-slist-free"><code class="function">g_slist_free()</code></a>. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GObject][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-connect-signals"></a><h3>gtk_builder_connect_signals ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> gtk_builder_connect_signals (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> -<p> -This method is a simpler variation of <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals-full" title="gtk_builder_connect_signals_full ()"><code class="function">gtk_builder_connect_signals_full()</code></a>. -It uses <a href="http://library.gnome.org/devel/glib/unstable/glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a>'s introspective features (by opening the module <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) -to look at the application's symbol table. From here it tries to match -the signal handler names given in the interface description with -symbols in the application and connects the signals. Note that this -function can only be called once, subsequent calls will do nothing. -</p> -<p> -Note that this function will not work correctly if <a href="http://library.gnome.org/devel/glib/unstable/glib-Dynamic-Loading-of-Modules.html#GModule"><span class="type">GModule</span></a> is not -supported on the platform. -</p> -<p> -When compiling applications for Windows, you must declare signal callbacks -with <a href="http://library.gnome.org/devel/glib/unstable/glib-Dynamic-Loading-of-Modules.html#G-MODULE-EXPORT:CAPS"><span class="type">G_MODULE_EXPORT</span></a>, or they will not be put in the symbol table. -On Linux and Unices, this is not necessary; applications should instead -be compiled with the -Wl,--export-dynamic CFLAGS, and linked against -gmodule-export-2.0. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>a pointer to a structure sent in as user data to all signals</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-connect-signals-full"></a><h3>gtk_builder_connect_signals_full ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> gtk_builder_connect_signals_full (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a class="link" href="GtkBuilder.html#GtkBuilderConnectFunc" title="GtkBuilderConnectFunc ()"><span class="type">GtkBuilderConnectFunc</span></a> func</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> -<p> -This function can be thought of the interpreted language binding -version of <a class="link" href="GtkBuilder.html#gtk-builder-connect-signals" title="gtk_builder_connect_signals ()"><code class="function">gtk_builder_connect_signals()</code></a>, except that it does not -require GModule to function correctly. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td> -<td>the function used to connect the signals. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>arbitrary data that will be passed to the connection function</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-set-translation-domain"></a><h3>gtk_builder_set_translation_domain ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> gtk_builder_set_translation_domain (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>);</pre> -<p> -Sets the translation domain of <em class="parameter"><code>builder</code></em>. -See <a class="link" href="GtkBuilder.html#GtkBuilder--translation-domain" title='The "translation-domain" property'><span class="type">"translation-domain"</span></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td> -<td>the translation domain or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-get-translation-domain"></a><h3>gtk_builder_get_translation_domain ()</h3> -<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gtk_builder_get_translation_domain (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>);</pre> -<p> -Gets the translation domain of <em class="parameter"><code>builder</code></em>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the translation domain. This string is owned -by the builder object and must not be modified or freed.</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-get-type-from-name"></a><h3>gtk_builder_get_type_from_name ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> gtk_builder_get_type_from_name (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *type_name</code></em>);</pre> -<p> -Looks up a type by name, using the virtual function that -<a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> has for that purpose. This is mainly used when -implementing the <a class="link" href="GtkBuildable.html" title="GtkBuildable"><span class="type">GtkBuildable</span></a> interface on a type. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td> -<td>type name to lookup</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> found for <em class="parameter"><code>type_name</code></em> or <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-TYPE-INVALID:CAPS"><span class="type">G_TYPE_INVALID</span></a> -if no type was found</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-value-from-string"></a><h3>gtk_builder_value_from_string ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_builder_value_from_string (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -This function demarshals a value from a string. This function -calls <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#g-value-init"><code class="function">g_value_init()</code></a> on the <em class="parameter"><code>value</code></em> argument, so it need not be -initialised beforehand. -</p> -<p> -This function can handle char, uchar, boolean, int, uint, long, -ulong, enum, flags, float, double, string, <a href="http://developer.gnome.org/gdk/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a>, <a href="http://developer.gnome.org/gdk/gdk3-RGBA-Colors.html#GdkRGBA"><span class="type">GdkRGBA</span></a> and -<a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> type values. Support for <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> type values is -still to come. -</p> -<p> -Upon errors <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned and <em class="parameter"><code>error</code></em> will be assigned a -<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> from the <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR"><span class="type">GTK_BUILDER_ERROR</span></a> domain. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td> -<td>the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> for the property</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td> -<td>the string representation of the value</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> to store the result in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>return location for an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="gtk-builder-value-from-string-type"></a><h3>gtk_builder_value_from_string_type ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_builder_value_from_string_type (<em class="parameter"><code><a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> *builder</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> -<p> -Like <a class="link" href="GtkBuilder.html#gtk-builder-value-from-string" title="gtk_builder_value_from_string ()"><code class="function">gtk_builder_value_from_string()</code></a>, this function demarshals -a value from a string, but takes a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> instead of <a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a>. -This function calls <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#g-value-init"><code class="function">g_value_init()</code></a> on the <em class="parameter"><code>value</code></em> argument, so it -need not be initialised beforehand. -</p> -<p> -Upon errors <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned and <em class="parameter"><code>error</code></em> will be assigned a -<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> from the <a class="link" href="GtkBuilder.html#GTK-BUILDER-ERROR:CAPS" title="GTK_BUILDER_ERROR"><span class="type">GTK_BUILDER_ERROR</span></a> domain. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>builder</code></em> :</span></p></td> -<td>a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> -<td>the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the value</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td> -<td>the string representation of the value</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> to store the result in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>return location for an error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.12</p> -</div> -<hr> -<div class="refsect2"> -<a name="GTK-BUILDER-WARN-INVALID-CHILD-TYPE:CAPS"></a><h3>GTK_BUILDER_WARN_INVALID_CHILD_TYPE()</h3> -<pre class="programlisting">#define GTK_BUILDER_WARN_INVALID_CHILD_TYPE(object, type)</pre> -<p> -This macro should be used to emit a warning about and unexpected <em class="parameter"><code>type</code></em> value -in a <a class="link" href="GtkBuildable.html" title="GtkBuildable"><span class="type">GtkBuildable</span></a> add_child implementation. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td> -<td>the <a class="link" href="GtkBuildable.html" title="GtkBuildable"><span class="type">GtkBuildable</span></a> on which the warning ocurred</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> -<td>the unexpected type value</td> -</tr> -</tbody> -</table></div> -</div> -<hr> -<div class="refsect2"> -<a name="GTK-BUILDER-ERROR:CAPS"></a><h3>GTK_BUILDER_ERROR</h3> -<pre class="programlisting">#define GTK_BUILDER_ERROR (gtk_builder_error_quark ()) -</pre> -</div> -</div> -<div class="refsect1"> -<a name="GtkBuilder.property-details"></a><h2>Property Details</h2> -<div class="refsect2"> -<a name="GtkBuilder--translation-domain"></a><h3>The <code class="literal">"translation-domain"</code> property</h3> -<pre class="programlisting"> "translation-domain" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> -<p> -The translation domain used when translating property values that -have been marked as translatable in interface descriptions. -If the translation domain is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> uses <code class="function">gettext()</code>, -otherwise <a href="http://library.gnome.org/devel/glib/unstable/glib-I18N.html#g-dgettext"><code class="function">g_dgettext()</code></a>. -</p> -<p>Default value: NULL</p> -<p class="since">Since 2.12</p> -</div> -</div> -</div> -<div class="footer"> -<hr> - Generated by GTK-Doc V1.18.1</div> -</body> -</html>
\ No newline at end of file |