|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/gtk/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkObject</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="prev" href="GtkMisc.html" title="GtkMisc">
<link rel="next" href="GtkPaned.html" title="GtkPaned">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and
GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</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="GtkMisc.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="AbstractObjects.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+ Reference Manual</th>
<td><a accesskey="n" href="GtkPaned.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3654493" class="shortcut">Top</a>
 | 
<a href="#id3655496" class="shortcut">Description</a>
 | 
<a href="#id3655299" class="shortcut">Object Hierarchy</a>
 | 
<a href="#id3655391" class="shortcut">Known Derived Interfaces</a>
 | 
<a href="#id3655414" class="shortcut">Properties</a>
 | 
<a href="#id3655448" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkObject"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3654493"></a><span class="refentrytitle">GtkObject</span>
</h2>
<p>GtkObject — The base class of the GTK+ type hierarchy</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <gtk/gtk.h>
<a href="GtkObject.html#GtkObject-struct">GtkObject</a>;
#define <a href="GtkObject.html#GTK-OBJECT-TYPE:CAPS">GTK_OBJECT_TYPE</a> (object)
#define <a href="GtkObject.html#GTK-OBJECT-TYPE-NAME:CAPS">GTK_OBJECT_TYPE_NAME</a> (object)
enum <a href="GtkObject.html#GtkObjectFlags">GtkObjectFlags</a>;
#define <a href="GtkObject.html#GTK-OBJECT-FLAGS:CAPS">GTK_OBJECT_FLAGS</a> (obj)
#define <a href="GtkObject.html#GTK-OBJECT-FLOATING:CAPS">GTK_OBJECT_FLOATING</a> (obj)
enum <a href="GtkObject.html#GtkArgFlags">GtkArgFlags</a>;
<a href="GtkObject.html" title="GtkObject">GtkObject</a>* <a href="GtkObject.html#gtk-object-new">gtk_object_new</a> (<a href="gtk-Types.html#GtkType">GtkType</a> type,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_property_name,
...);
void <a href="GtkObject.html#gtk-object-sink">gtk_object_sink</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);
<a href="GtkObject.html" title="GtkObject">GtkObject</a>* <a href="GtkObject.html#gtk-object-ref">gtk_object_ref</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);
void <a href="GtkObject.html#gtk-object-unref">gtk_object_unref</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);
void <a href="GtkObject.html#gtk-object-weakref">gtk_object_weakref</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> notify,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
void <a href="GtkObject.html#gtk-object-weakunref">gtk_object_weakunref</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> notify,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
void <a href="GtkObject.html#gtk-object-destroy">gtk_object_destroy</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);
void <a href="GtkObject.html#gtk-object-get">gtk_object_get</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_property_name,
...);
void <a href="GtkObject.html#gtk-object-set">gtk_object_set</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_property_name,
...);
void <a href="GtkObject.html#gtk-object-set-data">gtk_object_set_data</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
void <a href="GtkObject.html#gtk-object-set-data-full">gtk_object_set_data_full</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> destroy);
void <a href="GtkObject.html#gtk-object-remove-data">gtk_object_remove_data</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> <a href="GtkObject.html#gtk-object-get-data">gtk_object_get_data</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key);
void <a href="GtkObject.html#gtk-object-remove-no-notify">gtk_object_remove_no_notify</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key);
void <a href="GtkObject.html#gtk-object-set-user-data">gtk_object_set_user_data</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> <a href="GtkObject.html#gtk-object-get-user-data">gtk_object_get_user_data</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);
void <a href="GtkObject.html#gtk-object-add-arg-type">gtk_object_add_arg_type</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *arg_name,
<a href="gtk-Types.html#GtkType">GtkType</a> arg_type,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> arg_flags,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> arg_id);
void <a href="GtkObject.html#gtk-object-set-data-by-id">gtk_object_set_data_by_id</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
void <a href="GtkObject.html#gtk-object-set-data-by-id-full">gtk_object_set_data_by_id_full</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> destroy);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> <a href="GtkObject.html#gtk-object-get-data-by-id">gtk_object_get_data_by_id</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id);
void <a href="GtkObject.html#gtk-object-remove-data-by-id">gtk_object_remove_data_by_id</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id);
void <a href="GtkObject.html#gtk-object-remove-no-notify-by-id">gtk_object_remove_no_notify_by_id</a>
(<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> key_id);
#define <a href="GtkObject.html#gtk-object-data-try-key">gtk_object_data_try_key</a>
#define <a href="GtkObject.html#gtk-object-data-force-id">gtk_object_data_force_id</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3655299"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----<a
href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
+----GtkObject
+----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
+----<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a>
+----<a href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a>
+----<a href="gtk-gtkfilefilter.html#GtkFileFilter">GtkFileFilter</a>
+----<a href="GtkItemFactory.html" title="GtkItemFactory">GtkItemFactory</a>
+----<a href="GtkTooltips.html" title="GtkTooltips">GtkTooltips</a>
+----<a href="GtkTreeViewColumn.html" title="GtkTreeViewColumn">GtkTreeViewColumn</a>
+----<a href="GtkRecentFilter.html" title="GtkRecentFilter">GtkRecentFilter</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3655391"></a><h2>Known Derived Interfaces</h2>
<p>
GtkObject is required by
<a href="GtkRecentChooser.html" title="GtkRecentChooser">GtkRecentChooser</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="id3655414"></a><h2>Properties</h2>
<pre class="synopsis">
"<a href="GtkObject.html#GtkObject--user-data">user-data</a>" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3655448"></a><h2>Signals</h2>
<pre class="synopsis">
"<a href="GtkObject.html#GtkObject-destroy">destroy</a>" void user_function (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Cleanup / No recursion / No hooks
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3655496"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id3655506"></a><h3>Description</h3>
<p>
<a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> is the base class for all widgets, and for a few
non-widget objects such as <a href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>. <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> predates
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>; non-widgets that derive from <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> rather than
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> do so for backward compatibility reasons.
</p>
<p>
<a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>s are created with a "floating" reference count.
This means that the initial reference is not owned by anyone. Calling
<a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> on a newly-created <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> is incorrect, the floating
reference has to be removed first. This can be done by anyone at any time,
by calling <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref-sink"
><code class="function">g_object_ref_sink()</code></a> to convert the floating reference into a
regular reference. <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref-sink"
><code class="function">g_object_ref_sink()</code></a> returns a new reference if an object
is already sunk (has no floating reference).
</p>
<p>
When you add a widget to its parent container, the parent container
will do this:
</p>
<div class="informalexample"><pre class="programlisting">
g_object_ref_sink (G_OBJECT (child_widget));
</pre></div>
<p>
This means that the container now owns a reference to the child widget
and the child widget has no floating reference.
</p>
<p>
The purpose of the floating reference is to keep the child widget alive
until you add it to a parent container:
</p>
<div class="informalexample"><pre class="programlisting">
button = gtk_button_new ();
/* button has one floating reference to keep it alive */
gtk_container_add (GTK_CONTAINER (container), button);
/* button has one non-floating reference owned by the container */
</pre></div>
<p>
</p>
<p>
<a href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> is a special case, because GTK+ itself will ref/sink it on creation.
That is, after calling <a href="GtkWindow.html#gtk-window-new"><code class="function">gtk_window_new()</code></a>, the <a href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> will have one
reference which is owned by GTK+, and no floating references.
</p>
<p>
One more factor comes into play: the "destroy" signal, emitted by the
<a href="GtkObject.html#gtk-object-destroy"><code class="function">gtk_object_destroy()</code></a> method. The "destroy" signal asks all code owning a
reference to an object to release said reference. So, for example, if you call
<a href="GtkObject.html#gtk-object-destroy"><code class="function">gtk_object_destroy()</code></a> on a <a href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>, GTK+ will release the reference count that
it owns; if you call <a href="GtkObject.html#gtk-object-destroy"><code class="function">gtk_object_destroy()</code></a> on a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>, then the button will
be removed from its parent container and the parent container will release its
reference to the button. Because these references are released, calling
<a href="GtkObject.html#gtk-object-destroy"><code class="function">gtk_object_destroy()</code></a> should result in freeing all memory associated with an
object, unless some buggy code fails to release its references in response to
the "destroy" signal. Freeing memory (referred to as
<em class="firstterm">finalization</em> only happens if the reference count reaches
zero.
</p>
<p>
Some simple rules for handling <span class="type">GtkObject:</span>
</p>
<div class="itemizedlist"><ul type="disc">
<li><p>
Never call <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> unless you have previously called <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a>,
even if you created the <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>. (Note: this is <span class="emphasis"><em>not</em></span>
true for <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>; for <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>, the creator of the object owns a reference.)
</p></li>
<li><p>
Call <a href="GtkObject.html#gtk-object-destroy"><code class="function">gtk_object_destroy()</code></a> to get rid of most objects in most cases.
In particular, widgets are almost always destroyed in this way.
</p></li>
<li><p> Because of the floating reference count, you don't need to
worry about reference counting for widgets and toplevel windows, unless you
explicitly call <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a> yourself.</p></li>
</ul></div>
<p>
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3655876"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3655886"></a><h3>
<a name="GtkObject-struct"></a>GtkObject</h3>
<a class="indexterm" name="id3655899"></a><pre class="programlisting">typedef struct _GtkObject GtkObject;</pre>
<p>
The object itself. You should never use these members directly -
use the accessing macros instead.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3655916"></a><h3>
<a name="GTK-OBJECT-TYPE:CAPS"></a>GTK_OBJECT_TYPE()</h3>
<a class="indexterm" name="id3655930"></a><pre class="programlisting">#define GTK_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object))
</pre>
<p>
Gets the type of an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>a <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3655972"></a><h3>
<a name="GTK-OBJECT-TYPE-NAME:CAPS"></a>GTK_OBJECT_TYPE_NAME()</h3>
<a class="indexterm" name="id3655985"></a><pre class="programlisting">#define GTK_OBJECT_TYPE_NAME(object) (g_type_name (GTK_OBJECT_TYPE (object)))
</pre>
<p>
Gets the name of an objects type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>a <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656028"></a><h3>
<a name="GtkObjectFlags"></a>enum GtkObjectFlags</h3>
<a class="indexterm" name="id3656041"></a><pre class="programlisting">typedef enum
{
GTK_IN_DESTRUCTION = 1 << 0, /* Used internally during dispose */
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
GTK_FLOATING = 1 << 1,
#endif
GTK_RESERVED_1 = 1 << 2,
GTK_RESERVED_2 = 1 << 3
} GtkObjectFlags;
</pre>
<p>
Tells about the state of the object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GTK-IN-DESTRUCTION:CAPS"></a><code class="literal">GTK_IN_DESTRUCTION</code></span></td>
<td>the object is currently being destroyed. This is used
internally by GTK+ to prevent reinvokations during destruction.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-RESERVED-2:CAPS"></a><code class="literal">GTK_RESERVED_2</code></span></td>
<td>reserved for future use
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656114"></a><h3>
<a name="GTK-OBJECT-FLAGS:CAPS"></a>GTK_OBJECT_FLAGS()</h3>
<a class="indexterm" name="id3656127"></a><pre class="programlisting">#define GTK_OBJECT_FLAGS(obj) (GTK_OBJECT (obj)->flags)
</pre>
<p>
Gets the <a href="GtkObject.html#GtkObjectFlags"><span class="type">GtkObjectFlags</span></a> for an object without directly
accessing its members.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>obj</code></em> :</span></td>
<td>the object whose flags are returned.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656172"></a><h3>
<a name="GTK-OBJECT-FLOATING:CAPS"></a>GTK_OBJECT_FLOATING()</h3>
<a class="indexterm" name="id3656187"></a><pre class="programlisting">#define GTK_OBJECT_FLOATING(obj) (g_object_is_floating (obj))
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GTK_OBJECT_FLOATING</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Evaluates to <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the object still has its floating reference count.
See the overview documentation for <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>obj</code></em> :</span></td>
<td>the object to examine.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656254"></a><h3>
<a name="GtkArgFlags"></a>enum GtkArgFlags</h3>
<a class="indexterm" name="id3656269"></a><pre class="programlisting">typedef enum
{
GTK_ARG_READABLE = G_PARAM_READABLE,
GTK_ARG_WRITABLE = G_PARAM_WRITABLE,
GTK_ARG_CONSTRUCT = G_PARAM_CONSTRUCT,
GTK_ARG_CONSTRUCT_ONLY = G_PARAM_CONSTRUCT_ONLY,
GTK_ARG_CHILD_ARG = 1 << 4
} GtkArgFlags;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GtkArgFlags</code> is deprecated and should not be used in newly-written code. Use corresponding <a
href="../gobject/gobject-GParamSpec.html#GParamSpec"
><span class="type">GParamSpec</span></a> features instead</p>
</div>
<p>
Possible flags indicating how an argument should be treated.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GTK-ARG-READABLE:CAPS"></a><code class="literal">GTK_ARG_READABLE</code></span></td>
<td>the argument is readable. (i.e. can be queried)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-ARG-WRITABLE:CAPS"></a><code class="literal">GTK_ARG_WRITABLE</code></span></td>
<td>the argument is writable. (i.e. settable)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-ARG-CONSTRUCT:CAPS"></a><code class="literal">GTK_ARG_CONSTRUCT</code></span></td>
<td>the argument needs construction.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-ARG-CONSTRUCT-ONLY:CAPS"></a><code class="literal">GTK_ARG_CONSTRUCT_ONLY</code></span></td>
<td>the argument needs construction (and will
be set once during object creation), but is otherwise cannot be
set. Hence this flag is not allowed with <a href="GtkObject.html#GTK-ARG-WRITABLE:CAPS"><span class="type">GTK_ARG_WRITABLE</span></a>,
and is redundant with <a href="GtkObject.html#GTK-ARG-CONSTRUCT:CAPS"><span class="type">GTK_ARG_CONSTRUCT</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-ARG-CHILD-ARG:CAPS"></a><code class="literal">GTK_ARG_CHILD_ARG</code></span></td>
<td>an argument type that applies to (and may be different for)
each child. Used by <a href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656463"></a><h3>
<a name="gtk-object-new"></a>gtk_object_new ()</h3>
<a class="indexterm" name="id3656478"></a><pre class="programlisting"><a href="GtkObject.html" title="GtkObject">GtkObject</a>* gtk_object_new (<a href="gtk-Types.html#GtkType">GtkType</a> type,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_property_name,
...);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_new</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-new"
><code class="function">g_object_new()</code></a> instead.</p>
</div>
<p>
Constructs an object given its arguments, enumerated in the call to the
function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td>the type identifying this object. Returned by <a href="gtk-Types.html#gtk-type-unique"><code class="function">gtk_type_unique()</code></a>
(although for a properly-written object it should be accessible through
a <span class="type">GTK_TYPE_FOO</span> macro.)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></td>
<td>name of the first property to set when constructing
the object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td>the first argument's value, followed by any number of
name/argument-value pairs, terminated with <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the new <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656639"></a><h3>
<a name="gtk-object-sink"></a>gtk_object_sink ()</h3>
<a class="indexterm" name="id3656654"></a><pre class="programlisting">void gtk_object_sink (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_sink</code> has been deprecated since version 2.10 and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref-sink"
><code class="function">g_object_ref_sink()</code></a> instead</p>
</div>
<p>
Removes the floating reference from a <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>, if it exists;
otherwise does nothing. See the <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> overview documentation at
the top of the page.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object to sink.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656743"></a><h3>
<a name="gtk-object-ref"></a>gtk_object_ref ()</h3>
<a class="indexterm" name="id3656758"></a><pre class="programlisting"><a href="GtkObject.html" title="GtkObject">GtkObject</a>* gtk_object_ref (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_ref</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a> instead.</p>
</div>
<p>
Increases the reference count of the object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object to reference.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<em class="parameter"><code>object</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656843"></a><h3>
<a name="gtk-object-unref"></a>gtk_object_unref ()</h3>
<a class="indexterm" name="id3656858"></a><pre class="programlisting">void gtk_object_unref (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_unref</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> instead.</p>
</div>
<p>
Decreases the reference count of an object. When its reference count drops
to 0, the object is finalized (i.e. its memory is freed).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object to dereference.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3656930"></a><h3>
<a name="gtk-object-weakref"></a>gtk_object_weakref ()</h3>
<a class="indexterm" name="id3656947"></a><pre class="programlisting">void gtk_object_weakref (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> notify,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_weakref</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-weak-ref"
><code class="function">g_object_weak_ref()</code></a> instead.</p>
</div>
<p>
Adds a weak reference callback to an object. Weak references are used for notification when an object is
finalized. They are called "weak references" because they allow you to safely
hold a pointer to an object without calling <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a> (<a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a> adds
a strong reference, that is, forces the object to stay alive).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object to weakly reference.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>notify</code></em> :</span></td>
<td>callback to invoke before the object is freed.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>extra data to pass to <span class="type">notify</span>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3657097"></a><h3>
<a name="gtk-object-weakunref"></a>gtk_object_weakunref ()</h3>
<a class="indexterm" name="id3657113"></a><pre class="programlisting">void gtk_object_weakunref (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> notify,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_weakunref</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-weak-unref"
><code class="function">g_object_weak_unref()</code></a> instead.</p>
</div>
<p>
Removes a weak reference callback to an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object stop weakly referencing.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>notify</code></em> :</span></td>
<td>callback to search for.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>data to search for.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3657230"></a><h3>
<a name="gtk-object-destroy"></a>gtk_object_destroy ()</h3>
<a class="indexterm" name="id3657243"></a><pre class="programlisting">void gtk_object_destroy (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);</pre>
<p>
Emits the "destroy" signal notifying all reference holders that they should
release the <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>. See the overview documentation at the top of the
page for more details.
</p>
<p>
The memory for the object itself won't be deleted until
its reference count actually drops to 0; <a href="GtkObject.html#gtk-object-destroy"><code class="function">gtk_object_destroy()</code></a> merely asks
reference holders to release their references, it does not free the object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object to destroy.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3657317"></a><h3>
<a name="gtk-object-get"></a>gtk_object_get ()</h3>
<a class="indexterm" name="id3657332"></a><pre class="programlisting">void gtk_object_get (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_property_name,
...);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_get</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-get"
><code class="function">g_object_get()</code></a> instead.</p>
</div>
<p>
Gets properties of an object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>a <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></td>
<td>name of first property to get the value for.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td>
<a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>-terminated list of name-return location pairs.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3657457"></a><h3>
<a name="gtk-object-set"></a>gtk_object_set ()</h3>
<a class="indexterm" name="id3657473"></a><pre class="programlisting">void gtk_object_set (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_property_name,
...);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_set</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set"
><code class="function">g_object_set()</code></a> instead.</p>
</div>
<p>
Sets properties on an object.
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
void set_box_properties (GtkBox* box)
{
gtk_object_set (GTK_OBJECT (box), "homogeneous", TRUE,
"spacing", 8,
NULL);
}
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>a <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></td>
<td>name of the first property to set
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td>the value of the first argument, followed optionally
by more name/value pairs, followed by <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3657613"></a><h3>
<a name="gtk-object-set-data"></a>gtk_object_set_data ()</h3>
<a class="indexterm" name="id3657629"></a><pre class="programlisting">void gtk_object_set_data (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_set_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-data"
><code class="function">g_object_set_data()</code></a> instead.</p>
</div>
<p>
Each object carries around a table of associations from
strings to pointers. This function lets you set an association.
</p>
<p>
If the object already had an association with that name,
the old association will be destroyed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object containing the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em> :</span></td>
<td>name of the key.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>data to associate with that key.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3657750"></a><h3>
<a name="gtk-object-set-data-full"></a>gtk_object_set_data_full ()</h3>
<a class="indexterm" name="id3657767"></a><pre class="programlisting">void gtk_object_set_data_full (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> destroy);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_set_data_full</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-data-full"
><code class="function">g_object_set_data_full()</code></a> instead.</p>
</div>
<p>
Like <a href="GtkObject.html#gtk-object-set-data"><code class="function">gtk_object_set_data()</code></a> except it adds notification
for when the association is destroyed, either by
<a href="GtkObject.html#gtk-object-remove-data"><code class="function">gtk_object_remove_data()</code></a> or when the object is destroyed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object containing the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em> :</span></td>
<td>name of the key.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>data to associate with that key.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>destroy</code></em> :</span></td>
<td>function to call when the association is destroyed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3657928"></a><h3>
<a name="gtk-object-remove-data"></a>gtk_object_remove_data ()</h3>
<a class="indexterm" name="id3657945"></a><pre class="programlisting">void gtk_object_remove_data (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_remove_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-data"
><code class="function">g_object_set_data()</code></a> to set the object data to <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> instead.</p>
</div>
<p>
Removes a specified datum from the object's data associations (the object_data).
Subsequent calls to <a href="GtkObject.html#gtk-object-get-data"><code class="function">gtk_object_get_data()</code></a> will return <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</p>
<p>
If you specified a destroy handler with <a href="GtkObject.html#gtk-object-set-data-full"><code class="function">gtk_object_set_data_full()</code></a>,
it will be invoked.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object maintaining the association.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em> :</span></td>
<td>name of the key for that association.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3658086"></a><h3>
<a name="gtk-object-get-data"></a>gtk_object_get_data ()</h3>
<a class="indexterm" name="id3658102"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> gtk_object_get_data (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_get_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-get-data"
><code class="function">g_object_get_data()</code></a> instead.</p>
</div>
<p>
Get a named field from the object's table of associations (the object_data).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object maintaining the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em> :</span></td>
<td>name of the key for that association.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the data if found, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no such data exists.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3658217"></a><h3>
<a name="gtk-object-remove-no-notify"></a>gtk_object_remove_no_notify ()</h3>
<a class="indexterm" name="id3658234"></a><pre class="programlisting">void gtk_object_remove_no_notify (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_remove_no_notify</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-steal-data"
><code class="function">g_object_steal_data()</code></a> instead.</p>
</div>
<p>
Remove a specified datum from the object's data associations (the object_data),
without invoking the association's destroy handler.
</p>
<p>
Just like <a href="GtkObject.html#gtk-object-remove-data"><code class="function">gtk_object_remove_data()</code></a> except that any destroy handler
will be ignored.
Therefore this only affects data set using <a href="GtkObject.html#gtk-object-set-data-full"><code class="function">gtk_object_set_data_full()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object maintaining the association.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em> :</span></td>
<td>name of the key for that association.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3658357"></a><h3>
<a name="gtk-object-set-user-data"></a>gtk_object_set_user_data ()</h3>
<a class="indexterm" name="id3658373"></a><pre class="programlisting">void gtk_object_set_user_data (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_set_user_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-data"
><code class="function">g_object_set_data()</code></a> instead.</p>
</div>
<p>
For convenience, every object offers a generic user data
pointer. This function sets it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object whose user data should be set.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the new value for the user data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3658466"></a><h3>
<a name="gtk-object-get-user-data"></a>gtk_object_get_user_data ()</h3>
<a class="indexterm" name="id3658482"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> gtk_object_get_user_data (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_get_user_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-get-data"
><code class="function">g_object_get_data()</code></a> instead.</p>
</div>
<p>
Get the object's user data pointer.
</p>
<p>
This is intended to be a pointer for your convenience in
writing applications.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the user data field for object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3658568"></a><h3>
<a name="gtk-object-add-arg-type"></a>gtk_object_add_arg_type ()</h3>
<a class="indexterm" name="id3658584"></a><pre class="programlisting">void gtk_object_add_arg_type (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *arg_name,
<a href="gtk-Types.html#GtkType">GtkType</a> arg_type,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> arg_flags,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> arg_id);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_add_arg_type</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated in favor of the <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> property system including <a
href="../gobject/gobject-GParamSpec.html#GParamSpec"
><span class="type">GParamSpec</span></a>.
Add a new type of argument to an object class.
Usually this is called when registering a new type of object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg_name</code></em> :</span></td>
<td>fully qualify object name, for example GtkObject::user_data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg_type</code></em> :</span></td>
<td>type of the argument.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg_flags</code></em> :</span></td>
<td>bitwise-OR of the <a href="GtkObject.html#GtkArgFlags"><span class="type">GtkArgFlags</span></a> enum. (Whether the argument is
settable or gettable, whether it is set when the object is constructed.)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg_id</code></em> :</span></td>
<td>an internal number, passed in from here to the "set_arg" and
"get_arg" handlers of the object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3658739"></a><h3>
<a name="gtk-object-set-data-by-id"></a>gtk_object_set_data_by_id ()</h3>
<a class="indexterm" name="id3658756"></a><pre class="programlisting">void gtk_object_set_data_by_id (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_set_data_by_id</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-qdata"
><code class="function">g_object_set_qdata()</code></a> instead.</p>
</div>
<p>
Just like <a href="GtkObject.html#gtk-object-set-data"><code class="function">gtk_object_set_data()</code></a> except that it takes
a <a
href="../glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> instead of a string, so it is slightly faster.
</p>
<p>
Use <a href="GtkObject.html#gtk-object-data-try-key"><code class="function">gtk_object_data_try_key()</code></a> and <a href="GtkObject.html#gtk-object-data-force-id"><code class="function">gtk_object_data_force_id()</code></a>
to get an id from a string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object containing the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data_id</code></em> :</span></td>
<td>quark of the key.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>data to associate with that key.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3658916"></a><h3>
<a name="gtk-object-set-data-by-id-full"></a>gtk_object_set_data_by_id_full ()</h3>
<a class="indexterm" name="id3658932"></a><pre class="programlisting">void gtk_object_set_data_by_id_full (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> destroy);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_set_data_by_id_full</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-qdata-full"
><code class="function">g_object_set_qdata_full()</code></a> instead.</p>
</div>
<p>
Just like <a href="GtkObject.html#gtk-object-set-data-full"><code class="function">gtk_object_set_data_full()</code></a> except that it takes
a <a
href="../glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> instead of a string, so it is slightly faster.
</p>
<p>
Use <a href="GtkObject.html#gtk-object-data-try-key"><code class="function">gtk_object_data_try_key()</code></a> and <a href="GtkObject.html#gtk-object-data-force-id"><code class="function">gtk_object_data_force_id()</code></a>
to get an id from a string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object containing the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data_id</code></em> :</span></td>
<td>quark of the key.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>data to associate with that key.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>destroy</code></em> :</span></td>
<td>function to call when the association is destroyed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3659117"></a><h3>
<a name="gtk-object-get-data-by-id"></a>gtk_object_get_data_by_id ()</h3>
<a class="indexterm" name="id3659134"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> gtk_object_get_data_by_id (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_get_data_by_id</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-get-qdata"
><code class="function">g_object_get_qdata()</code></a> instead.</p>
</div>
<p>
Just like <a href="GtkObject.html#gtk-object-get-data"><code class="function">gtk_object_get_data()</code></a> except that it takes
a <a
href="../glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> instead of a string, so it is slightly faster.
</p>
<p>
Use <a href="GtkObject.html#gtk-object-data-try-key"><code class="function">gtk_object_data_try_key()</code></a> and <a href="GtkObject.html#gtk-object-data-force-id"><code class="function">gtk_object_data_force_id()</code></a>
to get an id from a string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object containing the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data_id</code></em> :</span></td>
<td>quark of the key.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the data if found, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no such data exists.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3659294"></a><h3>
<a name="gtk-object-remove-data-by-id"></a>gtk_object_remove_data_by_id ()</h3>
<a class="indexterm" name="id3659311"></a><pre class="programlisting">void gtk_object_remove_data_by_id (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> data_id);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_remove_data_by_id</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-qdata"
><code class="function">g_object_set_qdata()</code></a> with data of <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> instead.</p>
</div>
<p>
Just like <a href="GtkObject.html#gtk-object-remove-data"><code class="function">gtk_object_remove_data()</code></a> except that it takes
a <a
href="../glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> instead of a string, so it is slightly faster.
</p>
<p>
Remove a specified datum from the object's data associations.
Subsequent calls to <a href="GtkObject.html#gtk-object-get-data"><code class="function">gtk_object_get_data()</code></a> will return <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</p>
<p>
Use <a href="GtkObject.html#gtk-object-data-try-key"><code class="function">gtk_object_data_try_key()</code></a> and <a href="GtkObject.html#gtk-object-data-force-id"><code class="function">gtk_object_data_force_id()</code></a>
to get an id from a string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object containing the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data_id</code></em> :</span></td>
<td>quark of the key.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3659485"></a><h3>
<a name="gtk-object-remove-no-notify-by-id"></a>gtk_object_remove_no_notify_by_id ()</h3>
<a class="indexterm" name="id3659503"></a><pre class="programlisting">void gtk_object_remove_no_notify_by_id
(<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> key_id);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_remove_no_notify_by_id</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-steal-qdata"
><code class="function">g_object_steal_qdata()</code></a> instead.</p>
</div>
<p>
Just like <a href="GtkObject.html#gtk-object-remove-no-notify"><code class="function">gtk_object_remove_no_notify()</code></a> except that it takes
a <a
href="../glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> instead of a string, so it is slightly faster.
</p>
<p>
Use <a href="GtkObject.html#gtk-object-data-try-key"><code class="function">gtk_object_data_try_key()</code></a> and <a href="GtkObject.html#gtk-object-data-force-id"><code class="function">gtk_object_data_force_id()</code></a>
to get an id from a string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>object containing the associations.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key_id</code></em> :</span></td>
<td>quark of the key.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3659643"></a><h3>
<a name="gtk-object-data-try-key"></a>gtk_object_data_try_key</h3>
<a class="indexterm" name="id3659659"></a><pre class="programlisting">#define gtk_object_data_try_key g_quark_try_string
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_data_try_key</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Useless deprecated macro. Ignore it.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3659688"></a><h3>
<a name="gtk-object-data-force-id"></a>gtk_object_data_force_id</h3>
<a class="indexterm" name="id3659704"></a><pre class="programlisting">#define gtk_object_data_force_id g_quark_from_string
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_object_data_force_id</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Useless deprecated macro. Ignore it.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3659734"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id3659745"></a><h3>
<a name="GtkObject--user-data"></a>The "<code class="literal">user-data</code>" property</h3>
<a class="indexterm" name="id3659761"></a><pre class="programlisting"> "user-data" <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> : Read / Write</pre>
<p>Anonymous User Data Pointer.</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3659786"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id3659796"></a><h3>
<a name="GtkObject-destroy"></a>The "destroy" signal</h3>
<a class="indexterm" name="id3659805"></a><pre class="programlisting">void user_function (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Cleanup / No recursion / No hooks</pre>
<p>
Signals that all holders of a reference to the <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> should release
the reference that they hold. May result in finalization of the object
if all references are released.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3659887"></a><h2>See Also</h2>
<p>
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</p>
</div>
</div>
</body>
</html>