blob: 4f8e796f4496cc2fa9259af25abcc6de0416f730 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Signals: GObject Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GObject Reference Manual">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="gobject-Varargs-Value-Collection.html" title="Varargs Value Collection">
<link rel="next" href="gobject-Closures.html" title="Closures">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#gobject-Signals.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gobject-Varargs-Value-Collection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gobject-Closures.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gobject-Signals"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gobject-Signals.top_of_page"></a>Signals</span></h2>
<p>Signals — A means for customization of object behaviour
and a general purpose notification mechanism</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gobject-Signals.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="gobject-Signals.html#GSignalAccumulator" title="GSignalAccumulator ()">*GSignalAccumulator</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="gobject-Signals.html#GSignalEmissionHook" title="GSignalEmissionHook ()">*GSignalEmissionHook</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-new" title="g_signal_new ()">g_signal_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-newv" title="g_signal_newv ()">g_signal_newv</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-new-valist" title="g_signal_new_valist ()">g_signal_new_valist</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-set-va-marshaller" title="g_signal_set_va_marshaller ()">g_signal_set_va_marshaller</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-query" title="g_signal_query ()">g_signal_query</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-lookup" title="g_signal_lookup ()">g_signal_lookup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-name" title="g_signal_name ()">g_signal_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-list-ids" title="g_signal_list_ids ()">g_signal_list_ids</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-emit" title="g_signal_emit ()">g_signal_emit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-emit-by-name" title="g_signal_emit_by_name ()">g_signal_emit_by_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-emitv" title="g_signal_emitv ()">g_signal_emitv</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-emit-valist" title="g_signal_emit_valist ()">g_signal_emit_valist</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-connect" title="g_signal_connect()">g_signal_connect</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-connect-after" title="g_signal_connect_after()">g_signal_connect_after</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-connect-swapped" title="g_signal_connect_swapped()">g_signal_connect_swapped</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-connect-object" title="g_signal_connect_object ()">g_signal_connect_object</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-connect-data" title="g_signal_connect_data ()">g_signal_connect_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-connect-closure" title="g_signal_connect_closure ()">g_signal_connect_closure</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-connect-closure-by-id" title="g_signal_connect_closure_by_id ()">g_signal_connect_closure_by_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handler-block" title="g_signal_handler_block ()">g_signal_handler_block</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handler-unblock" title="g_signal_handler_unblock ()">g_signal_handler_unblock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handler-disconnect" title="g_signal_handler_disconnect ()">g_signal_handler_disconnect</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handler-find" title="g_signal_handler_find ()">g_signal_handler_find</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handlers-block-matched" title="g_signal_handlers_block_matched ()">g_signal_handlers_block_matched</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handlers-unblock-matched" title="g_signal_handlers_unblock_matched ()">g_signal_handlers_unblock_matched</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handlers-disconnect-matched" title="g_signal_handlers_disconnect_matched ()">g_signal_handlers_disconnect_matched</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handler-is-connected" title="g_signal_handler_is_connected ()">g_signal_handler_is_connected</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handlers-block-by-func" title="g_signal_handlers_block_by_func()">g_signal_handlers_block_by_func</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handlers-unblock-by-func" title="g_signal_handlers_unblock_by_func()">g_signal_handlers_unblock_by_func</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handlers-disconnect-by-func" title="g_signal_handlers_disconnect_by_func()">g_signal_handlers_disconnect_by_func</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-handlers-disconnect-by-data" title="g_signal_handlers_disconnect_by_data()">g_signal_handlers_disconnect_by_data</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-has-handler-pending" title="g_signal_has_handler_pending ()">g_signal_has_handler_pending</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-stop-emission" title="g_signal_stop_emission ()">g_signal_stop_emission</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-stop-emission-by-name" title="g_signal_stop_emission_by_name ()">g_signal_stop_emission_by_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-override-class-closure" title="g_signal_override_class_closure ()">g_signal_override_class_closure</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-chain-from-overridden" title="g_signal_chain_from_overridden ()">g_signal_chain_from_overridden</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-new-class-handler" title="g_signal_new_class_handler ()">g_signal_new_class_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-override-class-handler" title="g_signal_override_class_handler ()">g_signal_override_class_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-chain-from-overridden-handler" title="g_signal_chain_from_overridden_handler ()">g_signal_chain_from_overridden_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-add-emission-hook" title="g_signal_add_emission_hook ()">g_signal_add_emission_hook</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-remove-emission-hook" title="g_signal_remove_emission_hook ()">g_signal_remove_emission_hook</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-parse-name" title="g_signal_parse_name ()">g_signal_parse_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Signals.html#GSignalInvocationHint" title="struct GSignalInvocationHint"><span class="returnvalue">GSignalInvocationHint</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-get-invocation-hint" title="g_signal_get_invocation_hint ()">g_signal_get_invocation_hint</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="returnvalue">GClosure</span></a> *
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-type-cclosure-new" title="g_signal_type_cclosure_new ()">g_signal_type_cclosure_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-accumulator-first-wins" title="g_signal_accumulator_first_wins ()">g_signal_accumulator_first_wins</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gobject-Signals.html#g-signal-accumulator-true-handled" title="g_signal_accumulator_true_handled ()">g_signal_accumulator_true_handled</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gobject-Signals.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#GSignalInvocationHint" title="struct GSignalInvocationHint">GSignalInvocationHint</a></td>
</tr>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#GSignalCMarshaller" title="GSignalCMarshaller">GSignalCMarshaller</a></td>
</tr>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#GSignalCVaMarshaller" title="GSignalCVaMarshaller">GSignalCVaMarshaller</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#GSignalFlags" title="enum GSignalFlags">GSignalFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#GSignalMatchType" title="enum GSignalMatchType">GSignalMatchType</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#GSignalQuery" title="struct GSignalQuery">GSignalQuery</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#G-SIGNAL-TYPE-STATIC-SCOPE:CAPS" title="G_SIGNAL_TYPE_STATIC_SCOPE">G_SIGNAL_TYPE_STATIC_SCOPE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#G-SIGNAL-MATCH-MASK:CAPS" title="G_SIGNAL_MATCH_MASK">G_SIGNAL_MATCH_MASK</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#G-SIGNAL-FLAGS-MASK:CAPS" title="G_SIGNAL_FLAGS_MASK">G_SIGNAL_FLAGS_MASK</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gobject-Signals.html#GConnectFlags" title="enum GConnectFlags">GConnectFlags</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gobject-Signals.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;glib-object.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gobject-Signals.description"></a><h2>Description</h2>
<p>The basic concept of the signal system is that of the emission
of a signal. Signals are introduced per-type and are identified
through strings. Signals introduced for a parent type are available
in derived types as well, so basically they are a per-type facility
that is inherited.</p>
<p>A signal emission mainly involves invocation of a certain set of
callbacks in precisely defined manner. There are two main categories
of such callbacks, per-object ones and user provided ones.
(Although signals can deal with any kind of instantiatable type, I'm
referring to those types as "object types" in the following, simply
because that is the context most users will encounter signals in.)
The per-object callbacks are most often referred to as "object method
handler" or "default (signal) handler", while user provided callbacks are
usually just called "signal handler".</p>
<p>The object method handler is provided at signal creation time (this most
frequently happens at the end of an object class' creation), while user
provided handlers are frequently connected and disconnected to/from a
certain signal on certain object instances.</p>
<p>A signal emission consists of five stages, unless prematurely stopped:</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><p>Invocation of the object method handler for <a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">G_SIGNAL_RUN_FIRST</code></a> signals</p></li>
<li class="listitem"><p>Invocation of normal user-provided signal handlers (where the <em class="parameter"><code>after</code></em>
flag is not set)</p></li>
<li class="listitem"><p>Invocation of the object method handler for <a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">G_SIGNAL_RUN_LAST</code></a> signals</p></li>
<li class="listitem"><p>Invocation of user provided signal handlers (where the <em class="parameter"><code>after</code></em>
flag is set)</p></li>
<li class="listitem"><p>Invocation of the object method handler for <a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-CLEANUP:CAPS"><code class="literal">G_SIGNAL_RUN_CLEANUP</code></a> signals</p></li>
</ol></div>
<p>The user-provided signal handlers are called in the order they were
connected in.</p>
<p>All handlers may prematurely stop a signal emission, and any number of
handlers may be connected, disconnected, blocked or unblocked during
a signal emission.</p>
<p>There are certain criteria for skipping user handlers in stages 2 and 4
of a signal emission.</p>
<p>First, user handlers may be blocked. Blocked handlers are omitted during
callback invocation, to return from the blocked state, a handler has to
get unblocked exactly the same amount of times it has been blocked before.</p>
<p>Second, upon emission of a <a class="link" href="gobject-Signals.html#G-SIGNAL-DETAILED:CAPS"><code class="literal">G_SIGNAL_DETAILED</code></a> signal, an additional
<em class="parameter"><code>detail</code></em>
argument passed in to <a class="link" href="gobject-Signals.html#g-signal-emit" title="g_signal_emit ()"><code class="function">g_signal_emit()</code></a> has to match the detail
argument of the signal handler currently subject to invocation.
Specification of no detail argument for signal handlers (omission of the
detail part of the signal specification upon connection) serves as a
wildcard and matches any detail argument passed in to emission.</p>
<div class="refsect3">
<a name="signal-memory-management"></a><h4>Memory management of signal handlers</h4>
<p>If you are connecting handlers to signals and using a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> instance as
your signal handler user data, you should remember to pair calls to
<a class="link" href="gobject-Signals.html#g-signal-connect" title="g_signal_connect()"><code class="function">g_signal_connect()</code></a> with calls to <a class="link" href="gobject-Signals.html#g-signal-handler-disconnect" title="g_signal_handler_disconnect ()"><code class="function">g_signal_handler_disconnect()</code></a> or
<a class="link" href="gobject-Signals.html#g-signal-handlers-disconnect-by-func" title="g_signal_handlers_disconnect_by_func()"><code class="function">g_signal_handlers_disconnect_by_func()</code></a>. While signal handlers are
automatically disconnected when the object emitting the signal is finalised,
they are not automatically disconnected when the signal handler user data is
destroyed. If this user data is a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> instance, using it from a
signal handler after it has been finalised is an error.</p>
<p>There are two strategies for managing such user data. The first is to
disconnect the signal handler (using <a class="link" href="gobject-Signals.html#g-signal-handler-disconnect" title="g_signal_handler_disconnect ()"><code class="function">g_signal_handler_disconnect()</code></a> or
<a class="link" href="gobject-Signals.html#g-signal-handlers-disconnect-by-func" title="g_signal_handlers_disconnect_by_func()"><code class="function">g_signal_handlers_disconnect_by_func()</code></a>) when the user data (object) is
finalised; this has to be implemented manually. For non-threaded programs,
<a class="link" href="gobject-Signals.html#g-signal-connect-object" title="g_signal_connect_object ()"><code class="function">g_signal_connect_object()</code></a> can be used to implement this automatically.
Currently, however, it is unsafe to use in threaded programs.</p>
<p>The second is to hold a strong reference on the user data until after the
signal is disconnected for other reasons. This can be implemented
automatically using <a class="link" href="gobject-Signals.html#g-signal-connect-data" title="g_signal_connect_data ()"><code class="function">g_signal_connect_data()</code></a>.</p>
<p>The first approach is recommended, as the second approach can result in
effective memory leaks of the user data if the signal handler is never
disconnected for some reason.</p>
</div>
</div>
<div class="refsect1">
<a name="gobject-Signals.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GSignalAccumulator"></a><h3>GSignalAccumulator ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GSignalAccumulator<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalInvocationHint" title="struct GSignalInvocationHint"><span class="type">GSignalInvocationHint</span></a> *ihint</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *return_accu</code></em>,
<em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *handler_return</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>The signal accumulator is a special callback function that can be used
to collect return values of the various callbacks that are called
during a signal emission. The signal accumulator is specified at signal
creation time, if it is left <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, no accumulation of callback return
values is performed. The return value of signal emissions is then the
value returned by the last callback.</p>
<div class="refsect3">
<a name="GSignalAccumulator.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ihint</p></td>
<td class="parameter_description"><p>Signal invocation hint, see <a class="link" href="gobject-Signals.html#GSignalInvocationHint" title="struct GSignalInvocationHint"><span class="type">GSignalInvocationHint</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>return_accu</p></td>
<td class="parameter_description"><p>Accumulator to collect callback return values in, this
is the return value of the current signal emission.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>handler_return</p></td>
<td class="parameter_description"><p>A <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> holding the return value of the signal handler.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>Callback data that was specified when creating the signal.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GSignalAccumulator.returns"></a><h4>Returns</h4>
<p> The accumulator function returns whether the signal emission
should be aborted. Returning <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> means to abort the
current emission and <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is returned for continuation.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GSignalEmissionHook"></a><h3>GSignalEmissionHook ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GSignalEmissionHook<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalInvocationHint" title="struct GSignalInvocationHint"><span class="type">GSignalInvocationHint</span></a> *ihint</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_param_values</code></em>,
<em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *param_values</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>A simple function pointer to get invoked when the signal is emitted. This
allows you to tie a hook to the signal type, so that it will trap all
emissions of that signal, from any object.</p>
<p>You may not attach these to signals created with the <a class="link" href="gobject-Signals.html#G-SIGNAL-NO-HOOKS:CAPS"><span class="type">G_SIGNAL_NO_HOOKS</span></a> flag.</p>
<div class="refsect3">
<a name="GSignalEmissionHook.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ihint</p></td>
<td class="parameter_description"><p>Signal invocation hint, see <a class="link" href="gobject-Signals.html#GSignalInvocationHint" title="struct GSignalInvocationHint"><span class="type">GSignalInvocationHint</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_param_values</p></td>
<td class="parameter_description"><p>the number of parameters to the function, including
the instance on which the signal was emitted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>param_values</p></td>
<td class="parameter_description"><p> the instance on which
the signal was emitted, followed by the parameters of the emission. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_param_values]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>user data associated with the hook.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GSignalEmissionHook.returns"></a><h4>Returns</h4>
<p> whether it wants to stay connected. If it returns <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the signal
hook is disconnected (and destroyed).</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-new"></a><h3>g_signal_new ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_signal_new (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> itype</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalFlags" title="enum GSignalFlags"><span class="type">GSignalFlags</span></a> signal_flags</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> class_offset</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalAccumulator" title="GSignalAccumulator ()"><span class="type">GSignalAccumulator</span></a> accumulator</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> accu_data</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalCMarshaller" title="GSignalCMarshaller"><span class="type">GSignalCMarshaller</span></a> c_marshaller</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_params</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Creates a new signal. (This is usually done in the class initializer.)</p>
<p>A signal name consists of segments consisting of ASCII letters and
digits, separated by either the '-' or '_' character. The first
character of a signal name must be a letter. Names which violate these
rules lead to undefined behaviour of the GSignal system.</p>
<p>When registering a signal and looking up a signal, either separator can
be used, but they cannot be mixed.</p>
<p>If 0 is used for <em class="parameter"><code>class_offset</code></em>
subclasses cannot override the class handler
in their class_init method by doing super_class-&gt;signal_handler = my_signal_handler.
Instead they will have to use <a class="link" href="gobject-Signals.html#g-signal-override-class-handler" title="g_signal_override_class_handler ()"><code class="function">g_signal_override_class_handler()</code></a>.</p>
<p>If c_marshaller is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a class="link" href="gobject-Closures.html#g-cclosure-marshal-generic" title="g_cclosure_marshal_generic ()"><code class="function">g_cclosure_marshal_generic()</code></a> will be used as
the marshaller for this signal.</p>
<div class="refsect3">
<a name="g-signal-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>signal_name</p></td>
<td class="parameter_description"><p>the name for the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>itype</p></td>
<td class="parameter_description"><p>the type this signal pertains to. It will also pertain to
types which are derived from this type.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_flags</p></td>
<td class="parameter_description"><p>a combination of <a class="link" href="gobject-Signals.html#GSignalFlags" title="enum GSignalFlags"><span class="type">GSignalFlags</span></a> specifying detail of when
the default handler is to be invoked. You should at least specify
<a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">G_SIGNAL_RUN_FIRST</code></a> or <a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">G_SIGNAL_RUN_LAST</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>class_offset</p></td>
<td class="parameter_description"><p>The offset of the function pointer in the class structure
for this type. Used to invoke a class method generically. Pass 0 to
not associate a class method slot with this signal.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accumulator</p></td>
<td class="parameter_description"><p>the accumulator for this signal; may be <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accu_data</p></td>
<td class="parameter_description"><p>user data for the <em class="parameter"><code>accumulator</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_marshaller</p></td>
<td class="parameter_description"><p> the function to translate arrays of parameter
values to signal emissions into C language callback invocations or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>return_type</p></td>
<td class="parameter_description"><p>the type of return value, or <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS" title="G_TYPE_NONE"><span class="type">G_TYPE_NONE</span></a> for a signal
without a return value.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_params</p></td>
<td class="parameter_description"><p>the number of parameter types to follow.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a list of types, one for each parameter.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-new.returns"></a><h4>Returns</h4>
<p> the signal id</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-newv"></a><h3>g_signal_newv ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_signal_newv (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> itype</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalFlags" title="enum GSignalFlags"><span class="type">GSignalFlags</span></a> signal_flags</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *class_closure</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalAccumulator" title="GSignalAccumulator ()"><span class="type">GSignalAccumulator</span></a> accumulator</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> accu_data</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalCMarshaller" title="GSignalCMarshaller"><span class="type">GSignalCMarshaller</span></a> c_marshaller</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_params</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> *param_types</code></em>);</pre>
<p>Creates a new signal. (This is usually done in the class initializer.)</p>
<p>See <a class="link" href="gobject-Signals.html#g-signal-new" title="g_signal_new ()"><code class="function">g_signal_new()</code></a> for details on allowed signal names.</p>
<p>If c_marshaller is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a class="link" href="gobject-Closures.html#g-cclosure-marshal-generic" title="g_cclosure_marshal_generic ()"><code class="function">g_cclosure_marshal_generic()</code></a> will be used as
the marshaller for this signal.</p>
<div class="refsect3">
<a name="g-signal-newv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>signal_name</p></td>
<td class="parameter_description"><p>the name for the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>itype</p></td>
<td class="parameter_description"><p>the type this signal pertains to. It will also pertain to
types which are derived from this type</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_flags</p></td>
<td class="parameter_description"><p>a combination of <a class="link" href="gobject-Signals.html#GSignalFlags" title="enum GSignalFlags"><span class="type">GSignalFlags</span></a> specifying detail of when
the default handler is to be invoked. You should at least specify
<a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">G_SIGNAL_RUN_FIRST</code></a> or <a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">G_SIGNAL_RUN_LAST</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>class_closure</p></td>
<td class="parameter_description"><p> The closure to invoke on signal emission;
may be <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>accumulator</p></td>
<td class="parameter_description"><p> the accumulator for this signal; may be <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>accu_data</p></td>
<td class="parameter_description"><p>user data for the <em class="parameter"><code>accumulator</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_marshaller</p></td>
<td class="parameter_description"><p> the function to translate arrays of
parameter values to signal emissions into C language callback
invocations or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>return_type</p></td>
<td class="parameter_description"><p>the type of return value, or <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS" title="G_TYPE_NONE"><span class="type">G_TYPE_NONE</span></a> for a signal
without a return value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_params</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>param_types</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>param_types</p></td>
<td class="parameter_description"><p> an array of types, one for
each parameter. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_params]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-newv.returns"></a><h4>Returns</h4>
<p> the signal id</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-new-valist"></a><h3>g_signal_new_valist ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_signal_new_valist (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_name</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> itype</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalFlags" title="enum GSignalFlags"><span class="type">GSignalFlags</span></a> signal_flags</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *class_closure</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalAccumulator" title="GSignalAccumulator ()"><span class="type">GSignalAccumulator</span></a> accumulator</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> accu_data</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalCMarshaller" title="GSignalCMarshaller"><span class="type">GSignalCMarshaller</span></a> c_marshaller</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_params</code></em>,
<em class="parameter"><code><span class="type">va_list</span> args</code></em>);</pre>
<p>Creates a new signal. (This is usually done in the class initializer.)</p>
<p>See <a class="link" href="gobject-Signals.html#g-signal-new" title="g_signal_new ()"><code class="function">g_signal_new()</code></a> for details on allowed signal names.</p>
<p>If c_marshaller is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a class="link" href="gobject-Closures.html#g-cclosure-marshal-generic" title="g_cclosure_marshal_generic ()"><code class="function">g_cclosure_marshal_generic()</code></a> will be used as
the marshaller for this signal.</p>
<div class="refsect3">
<a name="g-signal-new-valist.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>signal_name</p></td>
<td class="parameter_description"><p>the name for the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>itype</p></td>
<td class="parameter_description"><p>the type this signal pertains to. It will also pertain to
types which are derived from this type.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_flags</p></td>
<td class="parameter_description"><p>a combination of <a class="link" href="gobject-Signals.html#GSignalFlags" title="enum GSignalFlags"><span class="type">GSignalFlags</span></a> specifying detail of when
the default handler is to be invoked. You should at least specify
<a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">G_SIGNAL_RUN_FIRST</code></a> or <a class="link" href="gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">G_SIGNAL_RUN_LAST</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>class_closure</p></td>
<td class="parameter_description"><p>The closure to invoke on signal emission; may be <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accumulator</p></td>
<td class="parameter_description"><p>the accumulator for this signal; may be <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accu_data</p></td>
<td class="parameter_description"><p>user data for the <em class="parameter"><code>accumulator</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_marshaller</p></td>
<td class="parameter_description"><p> the function to translate arrays of parameter
values to signal emissions into C language callback invocations or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>return_type</p></td>
<td class="parameter_description"><p>the type of return value, or <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS" title="G_TYPE_NONE"><span class="type">G_TYPE_NONE</span></a> for a signal
without a return value.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_params</p></td>
<td class="parameter_description"><p>the number of parameter types in <em class="parameter"><code>args</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>args</p></td>
<td class="parameter_description"><p>va_list of <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>, one for each parameter.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-new-valist.returns"></a><h4>Returns</h4>
<p> the signal id</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-set-va-marshaller"></a><h3>g_signal_set_va_marshaller ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_set_va_marshaller (<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> instance_type</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalCVaMarshaller" title="GSignalCVaMarshaller"><span class="type">GSignalCVaMarshaller</span></a> va_marshaller</code></em>);</pre>
<p>Change the <a class="link" href="gobject-Signals.html#GSignalCVaMarshaller" title="GSignalCVaMarshaller"><span class="type">GSignalCVaMarshaller</span></a> used for a given signal. This is a
specialised form of the marshaller that can often be used for the
common case of a single connected signal handler and avoids the
overhead of <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a>. Its use is optional.</p>
<div class="refsect3">
<a name="g-signal-set-va-marshaller.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>the signal id</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>instance_type</p></td>
<td class="parameter_description"><p>the instance type on which to set the marshaller.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>va_marshaller</p></td>
<td class="parameter_description"><p>the marshaller to set.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-query"></a><h3>g_signal_query ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_query (<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalQuery" title="struct GSignalQuery"><span class="type">GSignalQuery</span></a> *query</code></em>);</pre>
<p>Queries the signal system for in-depth information about a
specific signal. This function will fill in a user-provided
structure to hold signal-specific information. If an invalid
signal id is passed in, the <em class="parameter"><code>signal_id</code></em>
member of the <a class="link" href="gobject-Signals.html#GSignalQuery" title="struct GSignalQuery"><span class="type">GSignalQuery</span></a>
is 0. All members filled into the <a class="link" href="gobject-Signals.html#GSignalQuery" title="struct GSignalQuery"><span class="type">GSignalQuery</span></a> structure should
be considered constant and have to be left untouched.</p>
<div class="refsect3">
<a name="g-signal-query.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>The signal id of the signal to query information for.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>query</p></td>
<td class="parameter_description"><p> A user provided structure that is
filled in with constant values upon success. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-lookup"></a><h3>g_signal_lookup ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_signal_lookup (<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> itype</code></em>);</pre>
<p>Given the name of the signal and the type of object it connects to, gets
the signal's identifying integer. Emitting the signal by number is
somewhat faster than using the name each time.</p>
<p>Also tries the ancestors of the given type.</p>
<p>See <a class="link" href="gobject-Signals.html#g-signal-new" title="g_signal_new ()"><code class="function">g_signal_new()</code></a> for details on allowed signal names.</p>
<div class="refsect3">
<a name="g-signal-lookup.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>the signal's name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>itype</p></td>
<td class="parameter_description"><p>the type that the signal operates on.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-lookup.returns"></a><h4>Returns</h4>
<p> the signal's identifying number, or 0 if no signal was found.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-name"></a><h3>g_signal_name ()</h3>
<pre class="programlisting">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
g_signal_name (<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>);</pre>
<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="refsect3">
<a name="g-signal-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>the signal's identifying number.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-name.returns"></a><h4>Returns</h4>
<p> the signal name, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the signal number was invalid.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-list-ids"></a><h3>g_signal_list_ids ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> *
g_signal_list_ids (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> itype</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_ids</code></em>);</pre>
<p>Lists the signals by id that a certain instance or interface type
created. Further information about the signals can be acquired through
<a class="link" href="gobject-Signals.html#g-signal-query" title="g_signal_query ()"><code class="function">g_signal_query()</code></a>.</p>
<div class="refsect3">
<a name="g-signal-list-ids.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>itype</p></td>
<td class="parameter_description"><p>Instance or interface type.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_ids</p></td>
<td class="parameter_description"><p>Location to store the number of signal ids for <em class="parameter"><code>itype</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-list-ids.returns"></a><h4>Returns</h4>
<p> Newly allocated array of signal IDs. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_ids][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-emit"></a><h3>g_signal_emit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_emit (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a href="../glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> detail</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Emits a signal.</p>
<p>Note that <a class="link" href="gobject-Signals.html#g-signal-emit" title="g_signal_emit ()"><code class="function">g_signal_emit()</code></a> resets the return value to the default
if no handlers are connected, in contrast to <a class="link" href="gobject-Signals.html#g-signal-emitv" title="g_signal_emitv ()"><code class="function">g_signal_emitv()</code></a>.</p>
<div class="refsect3">
<a name="g-signal-emit.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> the instance the signal is being emitted on. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>the signal id</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detail</p></td>
<td class="parameter_description"><p>the detail</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>parameters to be passed to the signal, followed by a
location for the return value. If the return type of the signal
is <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS" title="G_TYPE_NONE"><span class="type">G_TYPE_NONE</span></a>, the return value location can be omitted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-emit-by-name"></a><h3>g_signal_emit_by_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_emit_by_name (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *detailed_signal</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Emits a signal.</p>
<p>Note that <a class="link" href="gobject-Signals.html#g-signal-emit-by-name" title="g_signal_emit_by_name ()"><code class="function">g_signal_emit_by_name()</code></a> resets the return value to the default
if no handlers are connected, in contrast to <a class="link" href="gobject-Signals.html#g-signal-emitv" title="g_signal_emitv ()"><code class="function">g_signal_emitv()</code></a>.</p>
<div class="refsect3">
<a name="g-signal-emit-by-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> the instance the signal is being emitted on. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>parameters to be passed to the signal, followed by a
location for the return value. If the return type of the signal
is <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS" title="G_TYPE_NONE"><span class="type">G_TYPE_NONE</span></a>, the return value location can be omitted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-emitv"></a><h3>g_signal_emitv ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_emitv (<em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *instance_and_params</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a href="../glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> detail</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *return_value</code></em>);</pre>
<p>Emits a signal.</p>
<p>Note that <a class="link" href="gobject-Signals.html#g-signal-emitv" title="g_signal_emitv ()"><code class="function">g_signal_emitv()</code></a> doesn't change <em class="parameter"><code>return_value</code></em>
if no handlers are
connected, in contrast to <a class="link" href="gobject-Signals.html#g-signal-emit" title="g_signal_emit ()"><code class="function">g_signal_emit()</code></a> and <a class="link" href="gobject-Signals.html#g-signal-emit-valist" title="g_signal_emit_valist ()"><code class="function">g_signal_emit_valist()</code></a>.</p>
<div class="refsect3">
<a name="g-signal-emitv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance_and_params</p></td>
<td class="parameter_description"><p> argument list for the signal emission.
The first element in the array is a <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> for the instance the signal
is being emitted on. The rest are any arguments to be passed to the signal. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>the signal id</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detail</p></td>
<td class="parameter_description"><p>the detail</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>return_value</p></td>
<td class="parameter_description"><p> Location to
store the return value of the signal emission. This must be provided if the
specified signal returns a value, but may be ignored otherwise. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-emit-valist"></a><h3>g_signal_emit_valist ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_emit_valist (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a href="../glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> detail</code></em>,
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>Emits a signal.</p>
<p>Note that <a class="link" href="gobject-Signals.html#g-signal-emit-valist" title="g_signal_emit_valist ()"><code class="function">g_signal_emit_valist()</code></a> resets the return value to the default
if no handlers are connected, in contrast to <a class="link" href="gobject-Signals.html#g-signal-emitv" title="g_signal_emitv ()"><code class="function">g_signal_emitv()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="g-signal-emit-valist.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> the instance the signal is being
emitted on. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.TypeInstance]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>the signal id</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detail</p></td>
<td class="parameter_description"><p>the detail</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>var_args</p></td>
<td class="parameter_description"><p>a list of parameters to be passed to the signal, followed by a
location for the return value. If the return type of the signal
is <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS" title="G_TYPE_NONE"><span class="type">G_TYPE_NONE</span></a>, the return value location can be omitted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-connect"></a><h3>g_signal_connect()</h3>
<pre class="programlisting">#define g_signal_connect(instance, detailed_signal, c_handler, data)</pre>
<p>Connects a <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> function to a signal for a particular object.</p>
<p>The handler will be called before the default handler of the signal.</p>
<p>See <a class="link" href="gobject-Signals.html#signal-memory-management" title="Memory management of signal handlers">memory management of signal handlers</a> for
details on how to handle the return value and memory management of <em class="parameter"><code>data</code></em>
.</p>
<div class="refsect3">
<a name="g-signal-connect.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p>the instance to connect to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_handler</p></td>
<td class="parameter_description"><p>the <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to pass to <em class="parameter"><code>c_handler</code></em>
calls.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-connect.returns"></a><h4>Returns</h4>
<p> the handler id (always greater than 0 for successful connections)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-connect-after"></a><h3>g_signal_connect_after()</h3>
<pre class="programlisting">#define g_signal_connect_after(instance, detailed_signal, c_handler, data)</pre>
<p>Connects a <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> function to a signal for a particular object.</p>
<p>The handler will be called after the default handler of the signal.</p>
<div class="refsect3">
<a name="g-signal-connect-after.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p>the instance to connect to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_handler</p></td>
<td class="parameter_description"><p>the <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to pass to <em class="parameter"><code>c_handler</code></em>
calls.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-connect-after.returns"></a><h4>Returns</h4>
<p> the handler id (always greater than 0 for successful connections)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-connect-swapped"></a><h3>g_signal_connect_swapped()</h3>
<pre class="programlisting">#define g_signal_connect_swapped(instance, detailed_signal, c_handler, data)</pre>
<p>Connects a <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> function to a signal for a particular object.</p>
<p>The instance on which the signal is emitted and <em class="parameter"><code>data</code></em>
will be swapped when
calling the handler. This is useful when calling pre-existing functions to
operate purely on the <em class="parameter"><code>data</code></em>
, rather than the <em class="parameter"><code>instance</code></em>
: swapping the
parameters avoids the need to write a wrapper function.</p>
<p>For example, this allows the shorter code:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="gobject-Signals.html#g-signal-connect-swapped">g_signal_connect_swapped</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"clicked"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gobject-Closures.html#GCallback">GCallback</a></span><span class="symbol">)</span><span class="normal"> <a href="http://developer.gnome.org/gtk3/GtkWidget.html#gtk-widget-hide">gtk_widget_hide</a></span><span class="symbol">,</span><span class="normal"> other_widget</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>Rather than the cumbersome:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
<span class="function">button_clicked_cb</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkButton</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">button</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">other_widget</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal"> </span><span class="function"><a href="http://developer.gnome.org/gtk3/GtkWidget.html#gtk-widget-hide">gtk_widget_hide</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">other_widget</span><span class="symbol">);</span>
<span class="cbracket">}</span>
<span class="symbol">...</span>
<span class="function"><a href="gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"clicked"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gobject-Closures.html#GCallback">GCallback</a></span><span class="symbol">)</span><span class="normal"> button_clicked_cb</span><span class="symbol">,</span><span class="normal"> other_widget</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect3">
<a name="g-signal-connect-swapped.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p>the instance to connect to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_handler</p></td>
<td class="parameter_description"><p>the <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to pass to <em class="parameter"><code>c_handler</code></em>
calls.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-connect-swapped.returns"></a><h4>Returns</h4>
<p> the handler ID (always greater than 0 for successful connections)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-connect-object"></a><h3>g_signal_connect_object ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
g_signal_connect_object (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *detailed_signal</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> c_handler</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> gobject</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GConnectFlags" title="enum GConnectFlags"><span class="type">GConnectFlags</span></a> connect_flags</code></em>);</pre>
<p>This is similar to <a class="link" href="gobject-Signals.html#g-signal-connect-data" title="g_signal_connect_data ()"><code class="function">g_signal_connect_data()</code></a>, but uses a closure which
ensures that the <em class="parameter"><code>gobject</code></em>
stays alive during the call to <em class="parameter"><code>c_handler</code></em>
by temporarily adding a reference count to <em class="parameter"><code>gobject</code></em>
.</p>
<p>When the <em class="parameter"><code>gobject</code></em>
is destroyed the signal handler will be automatically
disconnected. Note that this is not currently threadsafe (ie:
emitting a signal while <em class="parameter"><code>gobject</code></em>
is being destroyed in another thread
is not safe).</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="g-signal-connect-object.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> the instance to connect to. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.TypeInstance]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_handler</p></td>
<td class="parameter_description"><p>the <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>gobject</p></td>
<td class="parameter_description"><p> the object to pass as data
to <em class="parameter"><code>c_handler</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>connect_flags</p></td>
<td class="parameter_description"><p>a combination of <a class="link" href="gobject-Signals.html#GConnectFlags" title="enum GConnectFlags"><span class="type">GConnectFlags</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-connect-object.returns"></a><h4>Returns</h4>
<p> the handler id.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-connect-data"></a><h3>g_signal_connect_data ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
g_signal_connect_data (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *detailed_signal</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> c_handler</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosureNotify" title="GClosureNotify ()"><span class="type">GClosureNotify</span></a> destroy_data</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GConnectFlags" title="enum GConnectFlags"><span class="type">GConnectFlags</span></a> connect_flags</code></em>);</pre>
<p>Connects a <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> function to a signal for a particular object. Similar
to <a class="link" href="gobject-Signals.html#g-signal-connect" title="g_signal_connect()"><code class="function">g_signal_connect()</code></a>, but allows to provide a <a class="link" href="gobject-Closures.html#GClosureNotify" title="GClosureNotify ()"><span class="type">GClosureNotify</span></a> for the data
which will be called when the signal handler is disconnected and no longer
used. Specify <em class="parameter"><code>connect_flags</code></em>
if you need <code class="literal">..._after()</code> or
<code class="literal">..._swapped()</code> variants of this function.</p>
<div class="refsect3">
<a name="g-signal-connect-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> the instance to connect to. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c_handler</p></td>
<td class="parameter_description"><p>the <a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to pass to <em class="parameter"><code>c_handler</code></em>
calls.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy_data</p></td>
<td class="parameter_description"><p>a <a class="link" href="gobject-Closures.html#GClosureNotify" title="GClosureNotify ()"><span class="type">GClosureNotify</span></a> for <em class="parameter"><code>data</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connect_flags</p></td>
<td class="parameter_description"><p>a combination of <a class="link" href="gobject-Signals.html#GConnectFlags" title="enum GConnectFlags"><span class="type">GConnectFlags</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-connect-data.returns"></a><h4>Returns</h4>
<p> the handler id (always greater than 0 for successful connections)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-connect-closure"></a><h3>g_signal_connect_closure ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
g_signal_connect_closure (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *detailed_signal</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *closure</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> after</code></em>);</pre>
<p>Connects a closure to a signal for a particular object.</p>
<div class="refsect3">
<a name="g-signal-connect-closure.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> the instance to connect to. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>detailed_signal</p></td>
<td class="parameter_description"><p>a string of the form "signal-name::detail".</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>closure</p></td>
<td class="parameter_description"><p>the closure to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>after</p></td>
<td class="parameter_description"><p>whether the handler should be called before or after the
default handler of the signal.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-connect-closure.returns"></a><h4>Returns</h4>
<p> the handler id (always greater than 0 for successful connections)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-connect-closure-by-id"></a><h3>g_signal_connect_closure_by_id ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
g_signal_connect_closure_by_id (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a href="../glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> detail</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *closure</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> after</code></em>);</pre>
<p>Connects a closure to a signal for a particular object.</p>
<div class="refsect3">
<a name="g-signal-connect-closure-by-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> the instance to connect to. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>the id of the signal.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detail</p></td>
<td class="parameter_description"><p>the detail.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>closure</p></td>
<td class="parameter_description"><p>the closure to connect.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>after</p></td>
<td class="parameter_description"><p>whether the handler should be called before or after the
default handler of the signal.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-connect-closure-by-id.returns"></a><h4>Returns</h4>
<p> the handler id (always greater than 0 for successful connections)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-handler-block"></a><h3>g_signal_handler_block ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_handler_block (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> handler_id</code></em>);</pre>
<p>Blocks a handler of an instance so it will not be called during any
signal emissions unless it is unblocked again. Thus "blocking" a
signal handler means to temporarily deactive it, a signal handler
has to be unblocked exactly the same amount of times it has been
blocked before to become active again.</p>
<p>The <em class="parameter"><code>handler_id</code></em>
has to be a valid signal handler id, connected to a
signal of <em class="parameter"><code>instance</code></em>
.</p>
<div class="refsect3">
<a name="g-signal-handler-block.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> The instance to block the signal handler of. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>handler_id</p></td>
<td class="parameter_description"><p>Handler id of the handler to be blocked.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-handler-unblock"></a><h3>g_signal_handler_unblock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_handler_unblock (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> handler_id</code></em>);</pre>
<p>Undoes the effect of a previous <a class="link" href="gobject-Signals.html#g-signal-handler-block" title="g_signal_handler_block ()"><code class="function">g_signal_handler_block()</code></a> call. A
blocked handler is skipped during signal emissions and will not be
invoked, unblocking it (for exactly the amount of times it has been
blocked before) reverts its "blocked" state, so the handler will be
recognized by the signal system and is called upon future or
currently ongoing signal emissions (since the order in which
handlers are called during signal emissions is deterministic,
whether the unblocked handler in question is called as part of a
currently ongoing emission depends on how far that emission has
proceeded yet).</p>
<p>The <em class="parameter"><code>handler_id</code></em>
has to be a valid id of a signal handler that is
connected to a signal of <em class="parameter"><code>instance</code></em>
and is currently blocked.</p>
<div class="refsect3">
<a name="g-signal-handler-unblock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> The instance to unblock the signal handler of. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>handler_id</p></td>
<td class="parameter_description"><p>Handler id of the handler to be unblocked.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-handler-disconnect"></a><h3>g_signal_handler_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_signal_handler_disconnect (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> handler_id</code></em>);</pre>
<p>Disconnects a handler from an instance so it will not be called during
any future or currently ongoing emissions of the signal it has been
connected to. The <em class="parameter"><code>handler_id</code></em>
becomes invalid and may be reused.</p>
<p>The <em class="parameter"><code>handler_id</code></em>
has to be a valid signal handler id, connected to a
signal of <em class="parameter"><code>instance</code></em>
.</p>
<div class="refsect3">
<a name="g-signal-handler-disconnect.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> The instance to remove the signal handler from. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>handler_id</p></td>
<td class="parameter_description"><p>Handler id of the handler to be disconnected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-handler-find"></a><h3>g_signal_handler_find ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>
g_signal_handler_find (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalMatchType" title="enum GSignalMatchType"><span class="type">GSignalMatchType</span></a> mask</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a href="../glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> detail</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *closure</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>Finds the first signal handler that matches certain selection criteria.
The criteria mask is passed as an OR-ed combination of <a class="link" href="gobject-Signals.html#GSignalMatchType" title="enum GSignalMatchType"><span class="type">GSignalMatchType</span></a>
flags, and the criteria values are passed as arguments.
The match <em class="parameter"><code>mask</code></em>
has to be non-0 for successful matches.
If no handler was found, 0 is returned.</p>
<div class="refsect3">
<a name="g-signal-handler-find.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> The instance owning the signal handler to be found. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>mask</p></td>
<td class="parameter_description"><p>Mask indicating which of <em class="parameter"><code>signal_id</code></em>
, <em class="parameter"><code>detail</code></em>
, <em class="parameter"><code>closure</code></em>
, <em class="parameter"><code>func</code></em>
and/or <em class="parameter"><code>data</code></em>
the handler has to match.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>Signal the handler has to be connected to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detail</p></td>
<td class="parameter_description"><p>Signal detail the handler has to be connected to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>closure</p></td>
<td class="parameter_description"><p> The closure the handler will invoke. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>The C closure callback of the handler (useless for non-C closures).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>The closure data of the handler's closure.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-handler-find.returns"></a><h4>Returns</h4>
<p> A valid non-0 signal handler id for a successful match.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-handlers-block-matched"></a><h3>g_signal_handlers_block_matched ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_signal_handlers_block_matched (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalMatchType" title="enum GSignalMatchType"><span class="type">GSignalMatchType</span></a> mask</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a href="../glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> detail</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *closure</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>Blocks all handlers on an instance that match a certain selection criteria.
The criteria mask is passed as an OR-ed combination of <a class="link" href="gobject-Signals.html#GSignalMatchType" title="enum GSignalMatchType"><span class="type">GSignalMatchType</span></a>
flags, and the criteria values are passed as arguments.
Passing at least one of the <a class="link" href="gobject-Signals.html#G-SIGNAL-MATCH-CLOSURE:CAPS"><code class="literal">G_SIGNAL_MATCH_CLOSURE</code></a>, <a class="link" href="gobject-Signals.html#G-SIGNAL-MATCH-FUNC:CAPS"><code class="literal">G_SIGNAL_MATCH_FUNC</code></a>
or <a class="link" href="gobject-Signals.html#G-SIGNAL-MATCH-DATA:CAPS"><code class="literal">G_SIGNAL_MATCH_DATA</code></a> match flags is required for successful matches.
If no handlers were found, 0 is returned, the number of blocked handlers
otherwise.</p>
<div class="refsect3">
<a name="g-signal-handlers-block-matched.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> The instance to block handlers from. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>mask</p></td>
<td class="parameter_description"><p>Mask indicating which of <em class="parameter"><code>signal_id</code></em>
, <em class="parameter"><code>detail</code></em>
, <em class="parameter"><code>closure</code></em>
, <em class="parameter"><code>func</code></em>
and/or <em class="parameter"><code>data</code></em>
the handlers have to match.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>Signal the handlers have to be connected to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detail</p></td>
<td class="parameter_description"><p>Signal detail the handlers have to be connected to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>closure</p></td>
<td class="parameter_description"><p> The closure the handlers will invoke. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>The C closure callback of the handlers (useless for non-C closures).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>The closure data of the handlers' closures.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-handlers-block-matched.returns"></a><h4>Returns</h4>
<p> The number of handlers that matched.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-handlers-unblock-matched"></a><h3>g_signal_handlers_unblock_matched ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_signal_handlers_unblock_matched (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Signals.html#GSignalMatchType" title="enum GSignalMatchType"><span class="type">GSignalMatchType</span></a> mask</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
<em class="parameter"><code><a href="../glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> detail</code></em>,
<em class="parameter"><code><a class="link" href="gobject-Closures.html#GClosure" title="struct GClosure"><span class="type">GClosure</span></a> *closure</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>Unblocks all handlers on an instance that match a certain selection
criteria. The criteria mask is passed as an OR-ed combination of
<a class="link" href="gobject-Signals.html#GSignalMatchType" title="enum GSignalMatchType"><span class="type">GSignalMatchType</span></a> flags, and the criteria values are passed as arguments.
Passing at least one of the <a class="link" href="gobject-Signals.html#G-SIGNAL-MATCH-CLOSURE:CAPS"><code class="literal">G_SIGNAL_MATCH_CLOSURE</code></a>, <a class="link" href="gobject-Signals.html#G-SIGNAL-MATCH-FUNC:CAPS"><code class="literal">G_SIGNAL_MATCH_FUNC</code></a>
or <a class="link" href="gobject-Signals.html#G-SIGNAL-MATCH-DATA:CAPS"><code class="literal">G_SIGNAL_MATCH_DATA</code></a> match flags is required for successful matches.
If no handlers were found, 0 is returned, the number of unblocked handlers
otherwise. The match criteria should not apply to any handlers that are
not currently blocked.</p>
<div class="refsect3">
<a name="g-signal-handlers-unblock-matched.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p> The instance to unblock handlers from. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>mask</p></td>
<td class="parameter_description"><p>Mask indicating which of <em class="parameter"><code>signal_id</code></em>
, <em class="parameter"><code>detail</code></em>
, <em class="parameter"><code>closure</code></em>
, <em class="parameter"><code>func</code></em>
and/or <em class="parameter"><code>data</code></em>
the handlers have to match.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_id</p></td>
<td class="parameter_description"><p>Signal the handlers have to be connected to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>detail</p></td>
<td class="parameter_description"><p>Signal detail the handlers have to be connected to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>closure</p></td>
<td class="parameter_description"><p> The closure the handlers will invoke. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>The C closure callback of the handlers (useless for non-C closures).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>The closure data of the handlers' closures.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-signal-handlers-unblock-matched.returns"></a><h4>Returns</h4>
<p> The number of handlers that matched.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-signal-handlers-disconnect-matched"></a><h3>g_signal_handlers_disconnect_matched ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_signal_handlers_disconnect_matched (<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,