|
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>Signals</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="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="prev" href="gtk-Feature-Test-Macros.html" title="Version Information">
<link rel="next" href="gtk-Types.html" title="Types">
<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="gtk-Feature-Test-Macros.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gtkbase.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="gtk-Types.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="#id2746206" class="shortcut">Top</a>
 | 
<a href="#id2746919" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gtk-Signals"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2746206"></a><span class="refentrytitle">Signals</span>
</h2>
<p>Signals — Object methods and callbacks</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <gtk/gtk.h>
#define <a href="gtk-Signals.html#GTK-SIGNAL-OFFSET:CAPS">GTK_SIGNAL_OFFSET</a>
enum <a href="gtk-Signals.html#GtkSignalRunType">GtkSignalRunType</a>;
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <a href="gtk-Signals.html#gtk-signal-new">gtk_signal_new</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Signals.html#GtkSignalRunType">GtkSignalRunType</a> signal_flags,
<a href="gtk-Types.html#GtkType">GtkType</a> object_type,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> function_offset,
<a href="gtk-Types.html#GtkSignalMarshaller">GtkSignalMarshaller</a> marshaller,
<a href="gtk-Types.html#GtkType">GtkType</a> return_val,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> n_args,
...);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <a href="gtk-Signals.html#gtk-signal-newv">gtk_signal_newv</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Signals.html#GtkSignalRunType">GtkSignalRunType</a> signal_flags,
<a href="gtk-Types.html#GtkType">GtkType</a> object_type,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> function_offset,
<a href="gtk-Types.html#GtkSignalMarshaller">GtkSignalMarshaller</a> marshaller,
<a href="gtk-Types.html#GtkType">GtkType</a> return_val,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> n_args,
<a href="gtk-Types.html#GtkType">GtkType</a> *args);
#define <a href="gtk-Signals.html#gtk-signal-lookup">gtk_signal_lookup</a> (name,object_type)
#define <a href="gtk-Signals.html#gtk-signal-name">gtk_signal_name</a> (signal_id)
void <a href="gtk-Signals.html#gtk-signal-emit">gtk_signal_emit</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> signal_id,
...);
void <a href="gtk-Signals.html#gtk-signal-emit-by-name">gtk_signal_emit_by_name</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
...);
void <a href="gtk-Signals.html#gtk-signal-emitv">gtk_signal_emitv</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> signal_id,
<a href="gtk-Types.html#GtkArg">GtkArg</a> *args);
void <a href="gtk-Signals.html#gtk-signal-emitv-by-name">gtk_signal_emitv_by_name</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkArg">GtkArg</a> *args);
#define <a href="gtk-Signals.html#gtk-signal-emit-stop">gtk_signal_emit_stop</a> (object,signal_id)
void <a href="gtk-Signals.html#gtk-signal-emit-stop-by-name">gtk_signal_emit_stop_by_name</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);
#define <a href="gtk-Signals.html#gtk-signal-connect">gtk_signal_connect</a> (object,name,func,func_data)
#define <a href="gtk-Signals.html#gtk-signal-connect-after">gtk_signal_connect_after</a> (object,name,func,func_data)
#define <a href="gtk-Signals.html#gtk-signal-connect-object">gtk_signal_connect_object</a> (object,name,func,slot_object)
#define <a href="gtk-Signals.html#gtk-signal-connect-object-after">gtk_signal_connect_object_after</a> (object,name,func,slot_object)
<a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> <a href="gtk-Signals.html#gtk-signal-connect-full">gtk_signal_connect_full</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkSignalFunc">GtkSignalFunc</a> func,
<a href="gtk-Types.html#GtkCallbackMarshal">GtkCallbackMarshal</a> unsupported,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> destroy_func,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> object_signal,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> after);
void <a href="gtk-Signals.html#gtk-signal-connect-while-alive">gtk_signal_connect_while_alive</a> (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkSignalFunc">GtkSignalFunc</a> func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> func_data,
<a href="GtkObject.html" title="GtkObject">GtkObject</a> *alive_object);
void <a href="gtk-Signals.html#gtk-signal-connect-object-while-alive">gtk_signal_connect_object_while_alive</a>
(<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkSignalFunc">GtkSignalFunc</a> func,
<a href="GtkObject.html" title="GtkObject">GtkObject</a> *alive_object);
#define <a href="gtk-Signals.html#gtk-signal-disconnect">gtk_signal_disconnect</a> (object,handler_id)
#define <a href="gtk-Signals.html#gtk-signal-disconnect-by-func">gtk_signal_disconnect_by_func</a> (object,func,data)
#define <a href="gtk-Signals.html#gtk-signal-disconnect-by-data">gtk_signal_disconnect_by_data</a> (object,data)
#define <a href="gtk-Signals.html#gtk-signal-handler-block">gtk_signal_handler_block</a> (object,handler_id)
#define <a href="gtk-Signals.html#gtk-signal-handler-block-by-func">gtk_signal_handler_block_by_func</a>(object,func,data)
#define <a href="gtk-Signals.html#gtk-signal-handler-block-by-data">gtk_signal_handler_block_by_data</a>(object,data)
#define <a href="gtk-Signals.html#gtk-signal-handler-unblock">gtk_signal_handler_unblock</a> (object,handler_id)
#define <a href="gtk-Signals.html#gtk-signal-handler-unblock-by-func">gtk_signal_handler_unblock_by_func</a>(object,func,data)
#define <a href="gtk-Signals.html#gtk-signal-handler-unblock-by-data">gtk_signal_handler_unblock_by_data</a>(object,data)
#define <a href="gtk-Signals.html#gtk-signal-handler-pending">gtk_signal_handler_pending</a> (object,signal_id,may_be_blocked)
#define <a href="gtk-Signals.html#gtk-signal-handler-pending-by-func">gtk_signal_handler_pending_by_func</a>(object,signal_id,may_be_blocked,func,data)
#define <a href="gtk-Signals.html#gtk-signal-default-marshaller">gtk_signal_default_marshaller</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2746919"></a><h2>Description</h2>
<p>
The GTK+ signal system merely proxies the GLib signal system now. For future
usage, direct use of the <a
href="../gobject/gobject-Signals.html"
>GSignal</a> API is recommended, this avoids significant
performance hits where <a href="gtk-Types.html#GtkArg"><span class="type">GtkArg</span></a> structures have to be converted into <a
href="../gobject/gobject-Generic-values.html#GValue"
><span class="type">GValue</span></a>s.
</p>
<div class="refsect2" lang="en">
<a name="id2746962"></a><h3>What are signals?</h3>
<p>
Signals are a way to get notification when something happens
and to customize object behavior according to the
user's needs.
Every <em class="wordasword">signal</em> is uniquely identified by a name,
"class_name::signal_name", where signal_name might be something like
"clicked" and class_name might be "GtkButton". Note that some other class
may also define a "clicked" callback, so long as it doesn't derive from
<a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<p>
When they are created, they are also assigned a unique positive integer,
the signal id (1 is the first signal id- 0 is used to flag an error).
Each is also tied to an array of types that describes
the prototype of the function pointer(s) (handlers) you may
connect to the signal. Finally, every signal has
a default handler that is given by a function pointer
in its class structure: it is run by default whenever the
signal is emitted. (It is possible that a signal will
be emitted and a user-defined handler will prevent the default handler
from being run.)
</p>
<p>
Signals are used by everyone, but they are only
created on a per class basis -- so you should not call
call <a href="gtk-Signals.html#gtk-signal-new"><code class="function">gtk_signal_new()</code></a> unless you are writing
a new <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> type. However, if you want to make a new signal
for an existing type, you may use <code class="function">gtk_object_class_user_signal_new()</code>
to create a signal that doesn't correspond to a class's builtin
methods.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2747042"></a><h3>How are signals used?</h3>
<p>
There are two basic actions in the signal handling game.
If you want notification of an event, you must <span class="emphasis"><em>connect</em></span>
a function pointer and a data pointer to that signal; the data pointer
will be passed as the last argument to the function (so long as you
are using the default marshalling functions).
You will receive a connection id, a unique positive integer
corresponding to that attachment.
</p>
<p>
Functions that want to notify the user of certain actions,
<span class="emphasis"><em>emit</em></span> signals.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2747070"></a><h3>Basic Terminology</h3>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">signal</span></td>
<td><p>A class method, e.g. GtkButton::clicked.
More precisely it is a unique class-branch/signal-name pair.
This means you may not define a signal handler for a class which
derives from <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> that is called clicked,
but it is okay to share signals names if they are separate in
the class tree.
</p></td>
</tr>
<tr>
<td>
<span class="term">default handler</span></td>
<td><p>The object's internal method which is invoked
when the signal is emitted.</p></td>
</tr>
<tr>
<td>
<span class="term">user-defined handler</span></td>
<td>
<p>A function pointer and data connected
to a signal (for a particular object).</p>
<p>There are really two types: those which are connected
normally, and those which are connected by one
of the connect_after functions. The connect_after handlers
are always run after the default handler.</p>
<p>Many toolkits refer to these as <em class="wordasword">callbacks</em>.</p>
</td>
</tr>
<tr>
<td>
<span class="term">emission</span></td>
<td><p>the whole process of emitting a signal,
including the invocation of all
the different handler types mentioned above.</p></td>
</tr>
<tr>
<td>
<span class="term">signal id</span></td>
<td><p>The unique positive (nonzero) integer
used to identify a signal. It can be used instead of
a name to many functions for a slight performance
improvement.</p></td>
</tr>
<tr>
<td>
<span class="term">connection id</span></td>
<td><p>The unique positive (nonzero) integer
used to identify the connection of a user-defined handler
to a signal. Notice that it is allowed to connect the
same function-pointer/user-data pair twice, so
there is no guarantee that a function-pointer/user-data
maps to a unique connection id.
</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2747191"></a><h3>A brief note on how they work.</h3>
<p>
The functions responsible for translating an array of <span class="type">GtkArgs</span>
to your C compiler's normal semantics are called Marshallers.
They are identified by
gtk_marshal_<em class="replaceable"><code>return_value</code></em>__<em class="replaceable"><code>parameter_list</code></em>()
for example a C function returning a gboolean and taking a gint
can be invoked by using <code class="function">gtk_marshal_BOOL__INT()</code>.
Not all possibly combinations of return/params are available,
of course, so if you are writing a <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> with parameters
you might have to write a marshaller.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2747244"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2747254"></a><h3>
<a name="GTK-SIGNAL-OFFSET:CAPS"></a>GTK_SIGNAL_OFFSET</h3>
<a class="indexterm" name="id2747270"></a><pre class="programlisting">#define GTK_SIGNAL_OFFSET GTK_STRUCT_OFFSET
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GTK_SIGNAL_OFFSET</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Use in place of <code class="function"><code class="function">offsetof()</code></code>, which is used if it exists.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2747314"></a><h3>
<a name="GtkSignalRunType"></a>enum GtkSignalRunType</h3>
<a class="indexterm" name="id2747329"></a><pre class="programlisting">typedef enum /*< flags >*/
{
GTK_RUN_FIRST = G_SIGNAL_RUN_FIRST,
GTK_RUN_LAST = G_SIGNAL_RUN_LAST,
GTK_RUN_BOTH = (GTK_RUN_FIRST | GTK_RUN_LAST),
GTK_RUN_NO_RECURSE = G_SIGNAL_NO_RECURSE,
GTK_RUN_ACTION = G_SIGNAL_ACTION,
GTK_RUN_NO_HOOKS = G_SIGNAL_NO_HOOKS
} GtkSignalRunType;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GtkSignalRunType</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
These configure the signal's emission. They control
whether the signal can be emitted recursively on an object
and
whether to run the default method before or after the user-defined handlers.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">GTK_RUN_FIRST</span></td>
<td><p>Run the default handler before the connected user-defined
handlers.
</p></td>
</tr>
<tr>
<td>
<span class="term">GTK_RUN_LAST</span></td>
<td><p>Run the default handler after the connected
user-defined handlers.
(Handlers registered as "after" always run after the default handler though)
</p></td>
</tr>
<tr>
<td>
<span class="term">GTK_RUN_BOTH</span></td>
<td><p>Run the default handler twice,
once before the user-defined handlers,
and
once after.
</p></td>
</tr>
<tr>
<td>
<span class="term">GTK_RUN_NO_RECURSE</span></td>
<td>
<p>Whether to prevent a handler or hook
from reemitting the signal from within itself.
Attempts to
emit the signal while it is running will result in the signal
emission being restarted once it is done with the current processing.
</p>
<p>
You must be
careful to avoid having two handlers endlessly reemitting signals,
<code class="function">gtk_signal_n_emissions()</code> can be helpful.
</p>
</td>
</tr>
<tr>
<td>
<span class="term">GTK_RUN_ACTION</span></td>
<td><p>The signal is an action you can
invoke without any particular setup or cleanup.
The signal is treated no differently, but some
other code can determine if the signal is appropriate to
delegate to user control. For example, key binding sets
only allow bindings of ACTION signals to keystrokes.
</p></td>
</tr>
<tr>
<td>
<span class="term">GTK_RUN_NO_HOOKS</span></td>
<td><p>This prevents the connection of emission hooks
to the signal.
</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2747472"></a><h3>
<a name="gtk-signal-new"></a>gtk_signal_new ()</h3>
<a class="indexterm" name="id2747487"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> gtk_signal_new (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Signals.html#GtkSignalRunType">GtkSignalRunType</a> signal_flags,
<a href="gtk-Types.html#GtkType">GtkType</a> object_type,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> function_offset,
<a href="gtk-Types.html#GtkSignalMarshaller">GtkSignalMarshaller</a> marshaller,
<a href="gtk-Types.html#GtkType">GtkType</a> return_val,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> n_args,
...);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_new</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-new"
><code class="function">g_signal_new()</code></a> instead.</p>
</div>
<p>
Creates a new signal type. (This is usually done in the
class initializer.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the event name for the signal, e.g. "clicked".
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_flags</code></em> :</span></td>
<td>a combination of <span class="type">GTK_RUN</span> flags
specifying detail of when the default handler is to be invoked.
You should at least specify <span class="type">GTK_RUN_FIRST</span>
or <span class="type">GTK_RUN_LAST</span>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>object_type</code></em> :</span></td>
<td>the type of object this signal pertains to.
It will also pertain to derivers of this type automatically.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>function_offset</code></em> :</span></td>
<td>How many bytes the function pointer is in
the class structure for this type. Used to invoke a class
method generically.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshaller</code></em> :</span></td>
<td>the function to translate between an array
of GtkArgs and the native calling convention. Usually they
are identified just by the type of arguments they take:
for example, <code class="function">gtk_marshal_BOOL__STRING()</code> describes a marshaller
which takes a string and returns a boolean value.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>return_val</code></em> :</span></td>
<td>the type of return value, or <span class="type">GTK_TYPE_NONE</span> for a signal
without a return value.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_args</code></em> :</span></td>
<td>the number of parameter the handlers may take.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td>a list of <span class="type">GTK_TYPE_</span>*, one for each parameter.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the signal id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2747782"></a><h3>
<a name="gtk-signal-newv"></a>gtk_signal_newv ()</h3>
<a class="indexterm" name="id2747798"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> gtk_signal_newv (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Signals.html#GtkSignalRunType">GtkSignalRunType</a> signal_flags,
<a href="gtk-Types.html#GtkType">GtkType</a> object_type,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> function_offset,
<a href="gtk-Types.html#GtkSignalMarshaller">GtkSignalMarshaller</a> marshaller,
<a href="gtk-Types.html#GtkType">GtkType</a> return_val,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> n_args,
<a href="gtk-Types.html#GtkType">GtkType</a> *args);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_newv</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-newv"
><code class="function">g_signal_newv()</code></a> instead.</p>
</div>
<p>
Creates a new signal type. (This is usually done in a
class initializer.)
</p>
<p>
This function take the types as an array, instead of a list
following the arguments. Otherwise the same as <a href="gtk-Signals.html#gtk-signal-new"><code class="function">gtk_signal_new()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the name of the signal to create.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_flags</code></em> :</span></td>
<td>see <a href="gtk-Signals.html#gtk-signal-new"><code class="function">gtk_signal_new()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>object_type</code></em> :</span></td>
<td>the type of <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> to associate the signal with.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>function_offset</code></em> :</span></td>
<td>how many bytes the function pointer is in
the class structure for this type.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshaller</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>return_val</code></em> :</span></td>
<td>the type of the return value, or <span class="type">GTK_TYPE_NONE</span> if
you don't want a return value.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_args</code></em> :</span></td>
<td>the number of parameters to the user-defined handlers.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>args</code></em> :</span></td>
<td>an array of <a href="gtk-Types.html#GtkType"><span class="type">GtkType</span></a>s, describing the prototype to
the callbacks.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the signal id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2748089"></a><h3>
<a name="gtk-signal-lookup"></a>gtk_signal_lookup()</h3>
<a class="indexterm" name="id2748104"></a><pre class="programlisting">#define gtk_signal_lookup(name,object_type)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_lookup</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-lookup"
><code class="function">g_signal_lookup()</code></a> instead.</p>
</div>
<p>
Given the name of the signal and the type of object it connects
to, get the signal's identifying integer. Emitting the signal
by number is somewhat faster than using the name each time.
</p>
<p>
It also tries the ancestors of the given type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the signal's name, e.g. clicked.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>object_type</code></em> :</span></td>
<td>the type that the signal operates on, e.g. <span class="type">GTK_TYPE_BUTTON</span>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the signal's identifying number, or 0 if no signal was found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2748206"></a><h3>
<a name="gtk-signal-name"></a>gtk_signal_name()</h3>
<a class="indexterm" name="id2748221"></a><pre class="programlisting">#define gtk_signal_name(signal_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_name</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-name"
><code class="function">g_signal_name()</code></a> instead.</p>
</div>
<p>
Given the signal's identifier, finds its name.
</p>
<p>
Two different signals may have the same name, if they have differing types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_id</code></em> :</span></td>
<td>the signal's identifying number.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the signal name, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the signal number was invalid.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2748306"></a><h3>
<a name="gtk-signal-emit"></a>gtk_signal_emit ()</h3>
<a class="indexterm" name="id2748322"></a><pre class="programlisting">void gtk_signal_emit (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> signal_id,
...);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-emit"
><code class="function">g_signal_emit()</code></a> instead.</p>
</div>
<p>
Emits a signal. This causes the default handler and user-defined
handlers to be run.
</p>
<p>
Here is what <a href="gtk-Signals.html#gtk-signal-emit"><code class="function">gtk_signal_emit()</code></a> does:
</p>
<p>
1. Calls the default handler and the user-connected handlers.
The default handler will be called first if
<span class="type">GTK_RUN_FIRST</span> is set, and last if <span class="type">GTK_RUN_LAST</span> is set.
</p>
<p>
2. Calls all handlers connected with the "after" flag set.
</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 that emits the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_id</code></em> :</span></td>
<td>the signal identifier.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td>the parameters to the function, followed
by a pointer to the return type, if any.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2748472"></a><h3>
<a name="gtk-signal-emit-by-name"></a>gtk_signal_emit_by_name ()</h3>
<a class="indexterm" name="id2748488"></a><pre class="programlisting">void gtk_signal_emit_by_name (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
...);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit_by_name</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-emit-by-name"
><code class="function">g_signal_emit_by_name()</code></a> instead.</p>
</div>
<p>
Emits a signal. This causes the default handler and user-connected
handlers to be run.
</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 that emits the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
<td>the parameters to the function, followed
by a pointer to the return type, if any.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2748599"></a><h3>
<a name="gtk-signal-emitv"></a>gtk_signal_emitv ()</h3>
<a class="indexterm" name="id2748615"></a><pre class="programlisting">void gtk_signal_emitv (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> signal_id,
<a href="gtk-Types.html#GtkArg">GtkArg</a> *args);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emitv</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-emitv"
><code class="function">g_signal_emitv()</code></a> instead.</p>
</div>
<p>
Emits a signal. This causes the default handler and user-connected
handlers to be run. This differs from <a href="gtk-Signals.html#gtk-signal-emit"><code class="function">gtk_signal_emit()</code></a> by taking
an array of GtkArgs instead of using C's varargs mechanism.
</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 emit the signal to.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_id</code></em> :</span></td>
<td>the signal identifier.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>args</code></em> :</span></td>
<td>an array of GtkArgs, one for each parameter,
followed by one which is a pointer to the return type.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2748744"></a><h3>
<a name="gtk-signal-emitv-by-name"></a>gtk_signal_emitv_by_name ()</h3>
<a class="indexterm" name="id2748761"></a><pre class="programlisting">void gtk_signal_emitv_by_name (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkArg">GtkArg</a> *args);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emitv_by_name</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-emitv"
><code class="function">g_signal_emitv()</code></a> and <a
href="../gobject/gobject-Signals.html#g-signal-lookup"
><code class="function">g_signal_lookup()</code></a> instead.</p>
</div>
<p>
Emits a signal by name. This causes the default handler and user-connected
handlers to be run. This differs from <a href="gtk-Signals.html#gtk-signal-emit"><code class="function">gtk_signal_emit()</code></a> by taking
an array of GtkArgs instead of using C's varargs mechanism.
</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 emit the signal to.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>args</code></em> :</span></td>
<td>an array of GtkArgs, one for each parameter,
followed by one which is a pointer to the return type.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2748900"></a><h3>
<a name="gtk-signal-emit-stop"></a>gtk_signal_emit_stop()</h3>
<a class="indexterm" name="id2748916"></a><pre class="programlisting">#define gtk_signal_emit_stop(object,signal_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit_stop</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-stop-emission"
><code class="function">g_signal_stop_emission()</code></a> instead.</p>
</div>
<p>
This function aborts a signal's current emission.
</p>
<p>
It will prevent the default method from running,
if the signal was <span class="type">GTK_RUN_LAST</span> and you connected
normally (i.e. without the "after" flag).
</p>
<p>
It will print a warning if used on a signal which
isn't being emitted.
</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 signal handlers you wish to stop.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_id</code></em> :</span></td>
<td>the signal identifier, as returned by <a
href="../gobject/gobject-Signals.html#g-signal-lookup"
><code class="function">g_signal_lookup()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2749020"></a><h3>
<a name="gtk-signal-emit-stop-by-name"></a>gtk_signal_emit_stop_by_name ()</h3>
<a class="indexterm" name="id2749036"></a><pre class="programlisting">void gtk_signal_emit_stop_by_name (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit_stop_by_name</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-stop-emission-by-name"
><code class="function">g_signal_stop_emission_by_name()</code></a> instead.</p>
</div>
<p>
This function aborts a signal's current emission.
</p>
<p>
It is just like <a href="gtk-Signals.html#gtk-signal-emit-stop"><code class="function">gtk_signal_emit_stop()</code></a>
except it will lookup the signal id for you.
</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 signal handlers you wish to stop.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the name of the signal you wish to stop.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2749147"></a><h3>
<a name="gtk-signal-connect"></a>gtk_signal_connect()</h3>
<a class="indexterm" name="id2749163"></a><pre class="programlisting">#define gtk_signal_connect(object,name,func,func_data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-connect"
><code class="function">g_signal_connect()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and user data to a signal for
a particular object.
</p>
<p>
The <span class="type">GtkSignalFunction</span> takes a <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> as its first parameter.
It will be the same object as the one you're connecting
the hook to. The <em class="parameter"><code>func_data</code></em> will be passed as the last parameter
to the hook.
</p>
<p>
All else being equal, signal handlers are invoked in the order
connected (see <a href="gtk-Signals.html#gtk-signal-emit"><code class="function">gtk_signal_emit()</code></a> for the other details of
which order things are called in).
</p>
<p>
Here is how one passes an integer as user data,
for when you just want to specify a constant int
as parameter to your function:
</p>
<div class="informalexample"><pre class="programlisting">
static void button_clicked_int (GtkButton* button, gpointer func_data)
{
g_print ("button pressed: %d\n", GPOINTER_TO_INT (func_data));
}
/* By calling this function, you will make the g_print above
* execute, printing the number passed as `to_print'. */
static void attach_print_signal (GtkButton* button, gint to_print)
{
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (button_clicked_int),
GINT_TO_POINTER (to_print));
}
</pre></div>
<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 associated with the signal, e.g. if a button
is getting pressed, this is that button.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>function pointer to attach to the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func_data</code></em> :</span></td>
<td>value to pass as to your function (through the marshaller).
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the connection id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2749344"></a><h3>
<a name="gtk-signal-connect-after"></a>gtk_signal_connect_after()</h3>
<a class="indexterm" name="id2749360"></a><pre class="programlisting">#define gtk_signal_connect_after(object,name,func,func_data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_after</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-connect-after"
><code class="function">g_signal_connect_after()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and user data to a signal
so that this handler will be called after the other handlers.
</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 associated with the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>function pointer to attach to the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func_data</code></em> :</span></td>
<td>value to pass as to your function (through the marshaller).
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the unique identifier for this attachment: the connection id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2749476"></a><h3>
<a name="gtk-signal-connect-object"></a>gtk_signal_connect_object()</h3>
<a class="indexterm" name="id2749492"></a><pre class="programlisting">#define gtk_signal_connect_object(object,name,func,slot_object)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_object</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-connect-swapped"
><code class="function">g_signal_connect_swapped()</code></a> instead.</p>
</div>
<p>
This function is for registering a callback that will
call another object's callback. That is,
instead of passing the object which is responsible
for the event as the first parameter of the callback,
it is switched with the user data (so the object which emits
the signal will be the last parameter, which is where the
user data usually is).
</p>
<p>
This is useful for passing a standard function in as a callback.
For example, if you wanted a button's press to <a href="GtkWidget.html#gtk-widget-show"><code class="function">gtk_widget_show()</code></a>
some widget, you could write:
</p>
<div class="informalexample"><pre class="programlisting">
gtk_signal_connect_object (button, "clicked", gtk_widget_show, window);
</pre></div>
<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 emits the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function to callback.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>slot_object</code></em> :</span></td>
<td>the object to pass as the first parameter to func.
(Though it pretends to take an object, you can
really pass any gpointer as the <span class="type">slot_object</span> .)
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the connection id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2749649"></a><h3>
<a name="gtk-signal-connect-object-after"></a>gtk_signal_connect_object_after()</h3>
<a class="indexterm" name="id2749665"></a><pre class="programlisting">#define gtk_signal_connect_object_after(object,name,func,slot_object)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_object_after</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-connect-data"
><code class="function">g_signal_connect_data()</code></a> instead, passing
<code class="literal">G_CONNECT_AFTER|G_CONNECT_SWAPPED</code> as <em class="parameter"><code>connect_flags</code></em>.</p>
</div>
<p>
Attaches a signal hook to a signal, passing in an alternate
object as the first parameter, and guaranteeing
that the default handler and all normal
handlers are called first.
</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 associated with the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>function pointer to attach to the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>slot_object</code></em> :</span></td>
<td>the object to pass as the first parameter to <span class="type">func</span>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the connection id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2749802"></a><h3>
<a name="gtk-signal-connect-full"></a>gtk_signal_connect_full ()</h3>
<a class="indexterm" name="id2749818"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> gtk_signal_connect_full (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkSignalFunc">GtkSignalFunc</a> func,
<a href="gtk-Types.html#GtkCallbackMarshal">GtkCallbackMarshal</a> unsupported,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
<a href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> destroy_func,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> object_signal,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> after);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_full</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-connect-data"
><code class="function">g_signal_connect_data()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and user data to a signal with
more control.
</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 emits the signal. For example, a button
in the button press signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>the name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>function pointer to attach to the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>unsupported</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data associated with the function.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>destroy_func</code></em> :</span></td>
<td>function to call when this particular hook is
disconnected.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>object_signal</code></em> :</span></td>
<td>whether this is an object signal-- basically an "object
signal" is one that wants its user_data and object fields switched,
which is useful for calling functions which operate on another
object primarily.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>after</code></em> :</span></td>
<td>whether to invoke the user-defined handler after the signal, or to let
the signal's default behavior preside (i.e. depending on <span class="type">GTK_RUN_FIRST</span>
and <span class="type">GTK_RUN_LAST</span>).
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the connection id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750077"></a><h3>
<a name="gtk-signal-connect-while-alive"></a>gtk_signal_connect_while_alive ()</h3>
<a class="indexterm" name="id2750094"></a><pre class="programlisting">void gtk_signal_connect_while_alive (<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkSignalFunc">GtkSignalFunc</a> func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> func_data,
<a href="GtkObject.html" title="GtkObject">GtkObject</a> *alive_object);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_while_alive</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-connect-object"
><code class="function">g_signal_connect_object()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and another <a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> to a signal.
</p>
<p>
This function takes an object whose "destroy" signal
should be trapped.
That way, you don't have to clean up the
signal handler when you destroy the object.
It is a little less efficient though.
</p>
<p>
(Instead you may call <a href="gtk-Signals.html#gtk-signal-disconnect-by-data"><code class="function">gtk_signal_disconnect_by_data()</code></a>, if you want
to explicitly delete all attachments to this object. This
is perhaps not recommended since it could be confused
with an integer masquerading as a pointer (through <a
href="../glib/glib-Type-Conversion-Macros.html#GINT-TO-POINTER:CAPS"
><code class="function">GINT_TO_POINTER()</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 that emits the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>function pointer to attach to the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func_data</code></em> :</span></td>
<td>pointer to pass to func.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>alive_object</code></em> :</span></td>
<td>object whose death should cause the handler connection
to be destroyed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750300"></a><h3>
<a name="gtk-signal-connect-object-while-alive"></a>gtk_signal_connect_object_while_alive ()</h3>
<a class="indexterm" name="id2750316"></a><pre class="programlisting">void gtk_signal_connect_object_while_alive
(<a href="GtkObject.html" title="GtkObject">GtkObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a href="gtk-Types.html#GtkSignalFunc">GtkSignalFunc</a> func,
<a href="GtkObject.html" title="GtkObject">GtkObject</a> *alive_object);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_object_while_alive</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-connect-object"
><code class="function">g_signal_connect_object()</code></a> instead, passing
<code class="literal">G_CONNECT_SWAPPED</code> as <em class="parameter"><code>connect_flags</code></em>.</p>
</div>
<p>
These signal connectors are for signals which refer to objects,
so they must not be called after the object is deleted.
</p>
<p>
Unlike <a href="gtk-Signals.html#gtk-signal-connect-while-alive"><code class="function">gtk_signal_connect_while_alive()</code></a>,
this swaps the object and user data, making it suitable for
use with functions which primarily operate on the user data.
</p>
<p>
This function acts just like <a href="gtk-Signals.html#gtk-signal-connect-object"><code class="function">gtk_signal_connect_object()</code></a> except
it traps the "destroy" signal to prevent you from having to
clean up the handler.
</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 associated with the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td>name of the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>function pointer to attach to the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>alive_object</code></em> :</span></td>
<td>the user data, which must be an object, whose destruction
should signal the removal of this signal.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750503"></a><h3>
<a name="gtk-signal-disconnect"></a>gtk_signal_disconnect()</h3>
<a class="indexterm" name="id2750520"></a><pre class="programlisting">#define gtk_signal_disconnect(object,handler_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_disconnect</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handler-disconnect"
><code class="function">g_signal_handler_disconnect()</code></a> instead.</p>
</div>
<p>
Destroys a user-defined handler connection.
</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 the handler pertains to.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>handler_id</code></em> :</span></td>
<td>the connection id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750594"></a><h3>
<a name="gtk-signal-disconnect-by-func"></a>gtk_signal_disconnect_by_func()</h3>
<a class="indexterm" name="id2750611"></a><pre class="programlisting">#define gtk_signal_disconnect_by_func(object,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_disconnect_by_func</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handlers-disconnect-by-func"
><code class="function">g_signal_handlers_disconnect_by_func()</code></a> instead.</p>
</div>
<p>
Destroys all connections for a particular object, with
the given function-pointer and user-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 which emits the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function pointer to search for.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data to search for.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750701"></a><h3>
<a name="gtk-signal-disconnect-by-data"></a>gtk_signal_disconnect_by_data()</h3>
<a class="indexterm" name="id2750718"></a><pre class="programlisting">#define gtk_signal_disconnect_by_data(object,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_disconnect_by_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handlers-disconnect-matched"
><code class="function">g_signal_handlers_disconnect_matched()</code></a> instead.</p>
</div>
<p>
Destroys all connections for a particular object, with
the given user-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 which emits the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data to search for.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750794"></a><h3>
<a name="gtk-signal-handler-block"></a>gtk_signal_handler_block()</h3>
<a class="indexterm" name="id2750810"></a><pre class="programlisting">#define gtk_signal_handler_block(object,handler_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_block</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handler-block"
><code class="function">g_signal_handler_block()</code></a> instead.</p>
</div>
<p>
Prevents a user-defined handler from being invoked. All other
signal processing will go on as normal, but this particular
handler will ignore 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 which emits the signal to block.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>handler_id</code></em> :</span></td>
<td>the connection id.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750886"></a><h3>
<a name="gtk-signal-handler-block-by-func"></a>gtk_signal_handler_block_by_func()</h3>
<a class="indexterm" name="id2750902"></a><pre class="programlisting">#define gtk_signal_handler_block_by_func(object,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_block_by_func</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handlers-block-by-func"
><code class="function">g_signal_handlers_block_by_func()</code></a> instead.</p>
</div>
<p>
Prevents a user-defined handler from being invoked, by reference to
the user-defined handler's function pointer and user data. (It may result in
multiple hooks being blocked, if you've called connect multiple times.)
</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 emits the signal to block.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function pointer of the handler to block.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data of the handler to block.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2750995"></a><h3>
<a name="gtk-signal-handler-block-by-data"></a>gtk_signal_handler_block_by_data()</h3>
<a class="indexterm" name="id2751012"></a><pre class="programlisting">#define gtk_signal_handler_block_by_data(object,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_block_by_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handlers-block-matched"
><code class="function">g_signal_handlers_block_matched()</code></a> instead.</p>
</div>
<p>
Prevents all user-defined handlers with a certain user data from being 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 which emits the signal we want to block.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data of the handlers to block.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2751088"></a><h3>
<a name="gtk-signal-handler-unblock"></a>gtk_signal_handler_unblock()</h3>
<a class="indexterm" name="id2751105"></a><pre class="programlisting">#define gtk_signal_handler_unblock(object,handler_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_unblock</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handler-unblock"
><code class="function">g_signal_handler_unblock()</code></a> instead.</p>
</div>
<p>
Undoes a block, by connection id. Note that undoing a block doesn't
necessarily make the hook callable, because if you block a
hook twice, you must unblock it twice.
</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 emits the signal we want to unblock.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>handler_id</code></em> :</span></td>
<td>the emission handler identifier, as returned by
<a href="gtk-Signals.html#gtk-signal-connect"><code class="function">gtk_signal_connect()</code></a>, etc.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2751193"></a><h3>
<a name="gtk-signal-handler-unblock-by-func"></a>gtk_signal_handler_unblock_by_func()</h3>
<a class="indexterm" name="id2751210"></a><pre class="programlisting">#define gtk_signal_handler_unblock_by_func(object,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_unblock_by_func</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handlers-unblock-by-func"
><code class="function">g_signal_handlers_unblock_by_func()</code></a> instead.</p>
</div>
<p>
Undoes a block, by function pointer and data.
Note that undoing a block doesn't
necessarily make the hook callable, because if you block a
hook twice, you must unblock it twice.
</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 emits the signal we want to unblock.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function pointer to search for.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data to search for.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2751301"></a><h3>
<a name="gtk-signal-handler-unblock-by-data"></a>gtk_signal_handler_unblock_by_data()</h3>
<a class="indexterm" name="id2751318"></a><pre class="programlisting">#define gtk_signal_handler_unblock_by_data(object,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_unblock_by_data</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-handlers-unblock-matched"
><code class="function">g_signal_handlers_unblock_matched()</code></a> instead.</p>
</div>
<p>
Undoes block(s), to all signals for a particular object
with a particular user-data pointer
</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 emits the signal we want to unblock.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data to search for.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2751394"></a><h3>
<a name="gtk-signal-handler-pending"></a>gtk_signal_handler_pending()</h3>
<a class="indexterm" name="id2751411"></a><pre class="programlisting">#define gtk_signal_handler_pending(object,signal_id,may_be_blocked)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_pending</code> is deprecated and should not be used in newly-written code. Use <a
href="../gobject/gobject-Signals.html#g-signal-has-handler-pending"
><code class="function">g_signal_has_handler_pending()</code></a> instead.</p>
</div>
<p>
Returns a connection id corresponding to a given signal id and object.
</p>
<p>
One example of when you might use this is when the arguments
to the signal are difficult to compute. A class implementor
may opt to not emit the signal if no one is attached anyway,
thus saving the cost of building the arguments.
</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 search for the desired user-defined handler.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_id</code></em> :</span></td>
<td>the number of the signal to search for.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_be_blocked</code></em> :</span></td>
<td>whether it is acceptable to return a blocked
handler.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the connection id, if a connection was found. 0 otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2751520"></a><h3>
<a name="gtk-signal-handler-pending-by-func"></a>gtk_signal_handler_pending_by_func()</h3>
<a class="indexterm" name="id2751537"></a><pre class="programlisting">#define gtk_signal_handler_pending_by_func(object,signal_id,may_be_blocked,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_pending_by_func</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Returns a connection id corresponding to a given signal id, object, function
pointer and user 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 to search for the desired handler.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>signal_id</code></em> :</span></td>
<td>the number of the signal to search for.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_be_blocked</code></em> :</span></td>
<td>whether it is acceptable to return a blocked
handler.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function pointer to search for.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the user data to search for.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the connection id, if a handler was found. 0 otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2751654"></a><h3>
<a name="gtk-signal-default-marshaller"></a>gtk_signal_default_marshaller</h3>
<a class="indexterm" name="id2751670"></a><pre class="programlisting">#define gtk_signal_default_marshaller g_cclosure_marshal_VOID__VOID
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_default_marshaller</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
A marshaller that returns void and takes no extra parameters.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2751702"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a></span></td>
<td><p>The base class for things which emit signals.</p></td>
</tr>
<tr>
<td>
<span class="term"><a
href="../gobject/gobject-Signals.html"
>GSignal</a></span></td>
<td><p>The GLib signal system.</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
</div>
</div>
</body>
</html>