|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21585/root/usr/share/gtk-doc/html/glib/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Hook Functions</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-Random-Numbers.html" title="Random Numbers">
<link rel="next" href="glib-Miscellaneous-Utility-Functions.html" title="Miscellaneous Utility Functions">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="glib.html" title="GLib Overview">
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
<link rel="chapter" href="tools.html" title="GLib Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Random-Numbers.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Miscellaneous-Utility-Functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3062217" class="shortcut">Top</a>
 | 
<a href="#id3063312" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="glib-Hook-Functions"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3062217"></a><span class="refentrytitle">Hook Functions</span>
</h2>
<p>Hook Functions — support for manipulating lists of hook functions.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <glib.h>
<a href="glib-Hook-Functions.html#GHookList">GHookList</a>;
void (<a href="glib-Hook-Functions.html#GHookFinalizeFunc">*GHookFinalizeFunc</a>) (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);
<a href="glib-Hook-Functions.html#GHook">GHook</a>;
void (<a href="glib-Hook-Functions.html#GHookFunc">*GHookFunc</a>) (<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);
<a href="glib-Basic-Types.html#gboolean">gboolean</a> (<a href="glib-Hook-Functions.html#GHookCheckFunc">*GHookCheckFunc</a>) (<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);
void <a href="glib-Hook-Functions.html#g-hook-list-init">g_hook_list_init</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#guint">guint</a> hook_size);
void <a href="glib-Hook-Functions.html#g-hook-list-invoke">g_hook_list_invoke</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse);
void <a href="glib-Hook-Functions.html#g-hook-list-invoke-check">g_hook_list_invoke_check</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse);
void <a href="glib-Hook-Functions.html#g-hook-list-marshal">g_hook_list_marshal</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse,
<a href="glib-Hook-Functions.html#GHookMarshaller">GHookMarshaller</a> marshaller,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);
void (<a href="glib-Hook-Functions.html#GHookMarshaller">*GHookMarshaller</a>) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);
void <a href="glib-Hook-Functions.html#g-hook-list-marshal-check">g_hook_list_marshal_check</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse,
<a href="glib-Hook-Functions.html#GHookCheckMarshaller">GHookCheckMarshaller</a> marshaller,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);
<a href="glib-Basic-Types.html#gboolean">gboolean</a> (<a href="glib-Hook-Functions.html#GHookCheckMarshaller">*GHookCheckMarshaller</a>) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);
void <a href="glib-Hook-Functions.html#g-hook-list-clear">g_hook_list_clear</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-alloc">g_hook_alloc</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list);
#define <a href="glib-Hook-Functions.html#g-hook-append">g_hook_append</a> ( hook_list, hook )
void <a href="glib-Hook-Functions.html#g-hook-prepend">g_hook_prepend</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);
void <a href="glib-Hook-Functions.html#g-hook-insert-before">g_hook_insert_before</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *sibling,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);
void <a href="glib-Hook-Functions.html#g-hook-insert-sorted">g_hook_insert_sorted</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Hook-Functions.html#GHookCompareFunc">GHookCompareFunc</a> func);
<a href="glib-Basic-Types.html#gint">gint</a> (<a href="glib-Hook-Functions.html#GHookCompareFunc">*GHookCompareFunc</a>) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *new_hook,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *sibling);
<a href="glib-Basic-Types.html#gint">gint</a> <a href="glib-Hook-Functions.html#g-hook-compare-ids">g_hook_compare_ids</a> (<a href="glib-Hook-Functions.html#GHook">GHook</a> *new_hook,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *sibling);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-get">g_hook_get</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gulong">gulong</a> hook_id);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-find">g_hook_find</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Hook-Functions.html#GHookFindFunc">GHookFindFunc</a> func,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);
<a href="glib-Basic-Types.html#gboolean">gboolean</a> (<a href="glib-Hook-Functions.html#GHookFindFunc">*GHookFindFunc</a>) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-find-data">g_hook_find_data</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-find-func">g_hook_find_func</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> func);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-find-func-data">g_hook_find_func_data</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> func,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-first-valid">g_hook_first_valid</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_be_in_call);
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-next-valid">g_hook_next_valid</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_be_in_call);
enum <a href="glib-Hook-Functions.html#GHookFlagMask">GHookFlagMask</a>;
#define <a href="glib-Hook-Functions.html#G-HOOK-FLAGS:CAPS">G_HOOK_FLAGS</a> (hook)
#define <a href="glib-Hook-Functions.html#G-HOOK-FLAG-USER-SHIFT:CAPS">G_HOOK_FLAG_USER_SHIFT</a>
#define <a href="glib-Hook-Functions.html#G-HOOK:CAPS">G_HOOK</a> (hook)
#define <a href="glib-Hook-Functions.html#G-HOOK-IS-VALID:CAPS">G_HOOK_IS_VALID</a> (hook)
#define <a href="glib-Hook-Functions.html#G-HOOK-ACTIVE:CAPS">G_HOOK_ACTIVE</a> (hook)
#define <a href="glib-Hook-Functions.html#G-HOOK-IN-CALL:CAPS">G_HOOK_IN_CALL</a> (hook)
#define <a href="glib-Hook-Functions.html#G-HOOK-IS-UNLINKED:CAPS">G_HOOK_IS_UNLINKED</a> (hook)
<a href="glib-Hook-Functions.html#GHook">GHook</a>* <a href="glib-Hook-Functions.html#g-hook-ref">g_hook_ref</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);
void <a href="glib-Hook-Functions.html#g-hook-unref">g_hook_unref</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);
void <a href="glib-Hook-Functions.html#g-hook-free">g_hook_free</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Hook-Functions.html#g-hook-destroy">g_hook_destroy</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gulong">gulong</a> hook_id);
void <a href="glib-Hook-Functions.html#g-hook-destroy-link">g_hook_destroy_link</a> (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3063312"></a><h2>Description</h2>
<p>
The <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>, <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> and their related functions provide support for
lists of hook functions. Functions can be added and removed from the lists,
and the list of hook functions can be invoked.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3063345"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3063355"></a><h3>
<a name="GHookList"></a>GHookList</h3>
<a class="indexterm" name="id3063368"></a><pre class="programlisting">typedef struct {
gulong seq_id;
guint hook_size : 16;
guint is_setup : 1;
GHook *hooks;
gpointer dummy3;
GHookFinalizeFunc finalize_hook;
gpointer dummy[2];
} GHookList;
</pre>
<p>
The <span class="structname">GHookList</span> struct represents a
list of hook functions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#gulong">gulong</a> <em class="structfield"><code>seq_id</code></em>;</span></td>
<td>the next free <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> id.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#guint">guint</a> <em class="structfield"><code>hook_size</code></em> : 16;</span></td>
<td>the size of the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> elements, in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#guint">guint</a> <em class="structfield"><code>is_setup</code></em> : 1;</span></td>
<td>1 if the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> has been initialized.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Hook-Functions.html#GHook">GHook</a> *<em class="structfield"><code>hooks</code></em>;</span></td>
<td>the first <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> element in the list.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#gpointer">gpointer</a> <em class="structfield"><code>dummy3</code></em>;</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Hook-Functions.html#GHookFinalizeFunc">GHookFinalizeFunc</a> <em class="structfield"><code>finalize_hook</code></em>;</span></td>
<td>the function to call to finalize a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> element. The
default behaviour is to call the hooks <code class="function">destroy</code> function.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#gpointer">gpointer</a> <em class="structfield"><code>dummy</code></em>[2];</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3063586"></a><h3>
<a name="GHookFinalizeFunc"></a>GHookFinalizeFunc ()</h3>
<a class="indexterm" name="id3063600"></a><pre class="programlisting">void (*GHookFinalizeFunc) (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);</pre>
<p>
Defines the type of function to be called when a hook in a
list of hooks gets finalized.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the hook in <em class="parameter"><code>hook_list</code></em> that gets finalized.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3063682"></a><h3>
<a name="GHook"></a>GHook</h3>
<a class="indexterm" name="id3063695"></a><pre class="programlisting">typedef struct {
gpointer data;
GHook *next;
GHook *prev;
guint ref_count;
gulong hook_id;
guint flags;
gpointer func;
GDestroyNotify destroy;
} GHook;
</pre>
<p>
The <span class="structname">GHook</span> struct represents a single hook
function in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#gpointer">gpointer</a> <em class="structfield"><code>data</code></em>;</span></td>
<td>data which is passed to func when this hook is invoked.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Hook-Functions.html#GHook">GHook</a> *<em class="structfield"><code>next</code></em>;</span></td>
<td>pointer to the next hook in the list.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Hook-Functions.html#GHook">GHook</a> *<em class="structfield"><code>prev</code></em>;</span></td>
<td>pointer to the previous hook in the list.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#guint">guint</a> <em class="structfield"><code>ref_count</code></em>;</span></td>
<td>the reference count of this hook.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#gulong">gulong</a> <em class="structfield"><code>hook_id</code></em>;</span></td>
<td>the id of this hook, which is unique within its list.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#guint">guint</a> <em class="structfield"><code>flags</code></em>;</span></td>
<td>flags which are set for this hook. See <a href="glib-Hook-Functions.html#GHookFlagMask"><span class="type">GHookFlagMask</span></a> for
predefined flags.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Basic-Types.html#gpointer">gpointer</a> <em class="structfield"><code>func</code></em>;</span></td>
<td>the function to call when this hook is invoked. The possible
signatures for this function are <a href="glib-Hook-Functions.html#GHookFunc"><span class="type">GHookFunc</span></a> and <a href="glib-Hook-Functions.html#GHookCheckFunc"><span class="type">GHookCheckFunc</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> <em class="structfield"><code>destroy</code></em>;</span></td>
<td>the default <code class="function">finalize_hook</code> function of a
<a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> calls this member of the hook that is being finalized.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3063937"></a><h3>
<a name="GHookFunc"></a>GHookFunc ()</h3>
<a class="indexterm" name="id3063949"></a><pre class="programlisting">void (*GHookFunc) (<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Defines the type of a hook function that can be invoked
by <a href="glib-Hook-Functions.html#g-hook-list-invoke"><code class="function">g_hook_list_invoke()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the data field of the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is passed to the hook function here.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064016"></a><h3>
<a name="GHookCheckFunc"></a>GHookCheckFunc ()</h3>
<a class="indexterm" name="id3064029"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> (*GHookCheckFunc) (<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Defines the type of a hook function that can be invoked
by <a href="glib-Hook-Functions.html#g-hook-list-invoke-check"><code class="function">g_hook_list_invoke_check()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the data field of the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is passed to the hook function here.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> should be destroyed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064123"></a><h3>
<a name="g-hook-list-init"></a>g_hook_list_init ()</h3>
<a class="indexterm" name="id3064136"></a><pre class="programlisting">void g_hook_list_init (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#guint">guint</a> hook_size);</pre>
<p>
Initializes a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
This must be called before the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> is used.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_size</code></em> :</span></td>
<td>the size of each element in the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>, typically
<code class="literal">sizeof (GHook)</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064243"></a><h3>
<a name="g-hook-list-invoke"></a>g_hook_list_invoke ()</h3>
<a class="indexterm" name="id3064256"></a><pre class="programlisting">void g_hook_list_invoke (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse);</pre>
<p>
Calls all of the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> functions in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if functions which are already running (e.g. in another
thread) can be called. If set to <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, these are skipped.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064368"></a><h3>
<a name="g-hook-list-invoke-check"></a>g_hook_list_invoke_check ()</h3>
<a class="indexterm" name="id3064382"></a><pre class="programlisting">void g_hook_list_invoke_check (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse);</pre>
<p>
Calls all of the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> functions in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
Any function which returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is removed from the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if functions which are already running (e.g. in another
thread) can be called. If set to <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, these are skipped.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064513"></a><h3>
<a name="g-hook-list-marshal"></a>g_hook_list_marshal ()</h3>
<a class="indexterm" name="id3064526"></a><pre class="programlisting">void g_hook_list_marshal (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse,
<a href="glib-Hook-Functions.html#GHookMarshaller">GHookMarshaller</a> marshaller,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);</pre>
<p>
Calls a function on each valid <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if hooks which are currently running (e.g. in another
thread) are considered valid. If set to <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, these are skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshaller</code></em> :</span></td>
<td>the function to call for each <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></td>
<td>data to pass to <em class="parameter"><code>marshaller</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064688"></a><h3>
<a name="GHookMarshaller"></a>GHookMarshaller ()</h3>
<a class="indexterm" name="id3064701"></a><pre class="programlisting">void (*GHookMarshaller) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);</pre>
<p>
Defines the type of function used by <a href="glib-Hook-Functions.html#g-hook-list-marshal"><code class="function">g_hook_list_marshal()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></td>
<td>user data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064788"></a><h3>
<a name="g-hook-list-marshal-check"></a>g_hook_list_marshal_check ()</h3>
<a class="indexterm" name="id3064802"></a><pre class="programlisting">void g_hook_list_marshal_check (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_recurse,
<a href="glib-Hook-Functions.html#GHookCheckMarshaller">GHookCheckMarshaller</a> marshaller,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);</pre>
<p>
Calls a function on each valid <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> and destroys it if the
function returns <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if hooks which are currently running (e.g. in another
thread) are considered valid. If set to <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, these are skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshaller</code></em> :</span></td>
<td>the function to call for each <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></td>
<td>data to pass to <em class="parameter"><code>marshaller</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3064975"></a><h3>
<a name="GHookCheckMarshaller"></a>GHookCheckMarshaller ()</h3>
<a class="indexterm" name="id3064988"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> (*GHookCheckMarshaller) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> marshal_data);</pre>
<p>
Defines the type of function used by <a href="glib-Hook-Functions.html#g-hook-list-marshal-check"><code class="function">g_hook_list_marshal_check()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></td>
<td>user data.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>hook</code></em> should be destroyed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065101"></a><h3>
<a name="g-hook-list-clear"></a>g_hook_list_clear ()</h3>
<a class="indexterm" name="id3065114"></a><pre class="programlisting">void g_hook_list_clear (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list);</pre>
<p>
Removes all the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements from a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065184"></a><h3>
<a name="g-hook-alloc"></a>g_hook_alloc ()</h3>
<a class="indexterm" name="id3065197"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_alloc (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list);</pre>
<p>
Allocates space for a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> and initializes it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a new <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065278"></a><h3>
<a name="g-hook-append"></a>g_hook_append()</h3>
<a class="indexterm" name="id3065291"></a><pre class="programlisting">#define g_hook_append( hook_list, hook )</pre>
<p>
Appends a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> onto the end of a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to add to the end of <em class="parameter"><code>hook_list</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065376"></a><h3>
<a name="g-hook-prepend"></a>g_hook_prepend ()</h3>
<a class="indexterm" name="id3065388"></a><pre class="programlisting">void g_hook_prepend (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);</pre>
<p>
Prepends a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> on the start of a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to add to the start of <em class="parameter"><code>hook_list</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065494"></a><h3>
<a name="g-hook-insert-before"></a>g_hook_insert_before ()</h3>
<a class="indexterm" name="id3065507"></a><pre class="programlisting">void g_hook_insert_before (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *sibling,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);</pre>
<p>
Inserts a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> into a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>, before a given <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sibling</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to insert the new <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> before.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to insert.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065652"></a><h3>
<a name="g-hook-insert-sorted"></a>g_hook_insert_sorted ()</h3>
<a class="indexterm" name="id3065665"></a><pre class="programlisting">void g_hook_insert_sorted (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Hook-Functions.html#GHookCompareFunc">GHookCompareFunc</a> func);</pre>
<p>
Inserts a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> into a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>, sorted by the given function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to insert.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the comparison function used to sort the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065796"></a><h3>
<a name="GHookCompareFunc"></a>GHookCompareFunc ()</h3>
<a class="indexterm" name="id3065809"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gint">gint</a> (*GHookCompareFunc) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *new_hook,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *sibling);</pre>
<p>
Defines the type of function used to compare <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements in
<a href="glib-Hook-Functions.html#g-hook-insert-sorted"><code class="function">g_hook_insert_sorted()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>new_hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> being inserted.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sibling</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to compare with <em class="parameter"><code>new_hook</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a value <= 0 if <em class="parameter"><code>new_hook</code></em> should be before <em class="parameter"><code>sibling</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3065941"></a><h3>
<a name="g-hook-compare-ids"></a>g_hook_compare_ids ()</h3>
<a class="indexterm" name="id3065954"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gint">gint</a> g_hook_compare_ids (<a href="glib-Hook-Functions.html#GHook">GHook</a> *new_hook,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *sibling);</pre>
<p>
Compares the ids of two <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements, returning a negative value
if the second id is greater than the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>new_hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sibling</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to compare with <em class="parameter"><code>new_hook</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a value <= 0 if the id of <em class="parameter"><code>sibling</code></em> is >= the id of <em class="parameter"><code>new_hook</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3066076"></a><h3>
<a name="g-hook-get"></a>g_hook_get ()</h3>
<a class="indexterm" name="id3066089"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_get (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gulong">gulong</a> hook_id);</pre>
<p>
Returns the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> with the given id, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it is not found.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_id</code></em> :</span></td>
<td>a hook id.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> with the given id, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it is not found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3066212"></a><h3>
<a name="g-hook-find"></a>g_hook_find ()</h3>
<a class="indexterm" name="id3066225"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_find (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Hook-Functions.html#GHookFindFunc">GHookFindFunc</a> func,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Finds a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> using the given function to test for a match.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>need_valids</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function to call for each <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>, which should return <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when
the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> has been found.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the data to pass to <em class="parameter"><code>func</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the found <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no matching <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3066448"></a><h3>
<a name="GHookFindFunc"></a>GHookFindFunc ()</h3>
<a class="indexterm" name="id3066460"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> (*GHookFindFunc) (<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Defines the type of the function passed to <a href="glib-Hook-Functions.html#g-hook-find"><code class="function">g_hook_find()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>user data passed to <a href="glib-Hook-Functions.html#g-hook-find-func"><code class="function">g_hook_find_func()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the required <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> has been found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3066585"></a><h3>
<a name="g-hook-find-data"></a>g_hook_find_data ()</h3>
<a class="indexterm" name="id3066598"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_find_data (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Finds a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> with the given data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>need_valids</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the data to find.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> with the given <em class="parameter"><code>data</code></em> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no matching
<a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3066772"></a><h3>
<a name="g-hook-find-func"></a>g_hook_find_func ()</h3>
<a class="indexterm" name="id3066785"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_find_func (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> func);</pre>
<p>
Finds a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> with the given function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>need_valids</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function to find.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> with the given <em class="parameter"><code>func</code></em> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no matching
<a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3066959"></a><h3>
<a name="g-hook-find-func-data"></a>g_hook_find_func_data ()</h3>
<a class="indexterm" name="id3066972"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_find_func_data (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> need_valids,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> func,
<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Finds a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> with the given function and data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>need_valids</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td>the function to find.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the data to find.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> with the given <em class="parameter"><code>func</code></em> and <em class="parameter"><code>data</code></em> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no matching
<a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067174"></a><h3>
<a name="g-hook-first-valid"></a>g_hook_first_valid ()</h3>
<a class="indexterm" name="id3067188"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_first_valid (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_be_in_call);</pre>
<p>
Returns the first <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> which has not been destroyed.
The reference count for the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is incremented, so you must call
<a href="glib-Hook-Functions.html#g-hook-unref"><code class="function">g_hook_unref()</code></a> to restore it when no longer needed. (Or call
<a href="glib-Hook-Functions.html#g-hook-next-valid"><code class="function">g_hook_next_valid()</code></a> if you are stepping through the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_be_in_call</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if hooks which are currently running (e.g. in another
thread) are considered valid. If set to <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, these are skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the first valid <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none are valid.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067368"></a><h3>
<a name="g-hook-next-valid"></a>g_hook_next_valid ()</h3>
<a class="indexterm" name="id3067382"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_next_valid (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook,
<a href="glib-Basic-Types.html#gboolean">gboolean</a> may_be_in_call);</pre>
<p>
Returns the next <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> which has not been destroyed.
The reference count for the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is incremented, so you must call
<a href="glib-Hook-Functions.html#g-hook-unref"><code class="function">g_hook_unref()</code></a> to restore it when no longer needed. (Or continue to call
<a href="glib-Hook-Functions.html#g-hook-next-valid"><code class="function">g_hook_next_valid()</code></a> until <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the current <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>may_be_in_call</code></em> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if hooks which are currently running (e.g. in another
thread) are considered valid. If set to <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, these are skipped.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the next valid <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none are valid.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067594"></a><h3>
<a name="GHookFlagMask"></a>enum GHookFlagMask</h3>
<a class="indexterm" name="id3067607"></a><pre class="programlisting">typedef enum
{
G_HOOK_FLAG_ACTIVE = 1 << 0,
G_HOOK_FLAG_IN_CALL = 1 << 1,
G_HOOK_FLAG_MASK = 0x0f
} GHookFlagMask;
</pre>
<p>
Flags used internally in the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> implementation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="G-HOOK-FLAG-ACTIVE:CAPS"></a><code class="literal">G_HOOK_FLAG_ACTIVE</code></span></td>
<td>set if the hook has not been destroyed.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="G-HOOK-FLAG-IN-CALL:CAPS"></a><code class="literal">G_HOOK_FLAG_IN_CALL</code></span></td>
<td>set if the hook is currently being run.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="G-HOOK-FLAG-MASK:CAPS"></a><code class="literal">G_HOOK_FLAG_MASK</code></span></td>
<td>A mask covering all bits reserved for
hook flags; see <span class="type">G_HOOK_FLAGS_USER_SHIFT</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067720"></a><h3>
<a name="G-HOOK-FLAGS:CAPS"></a>G_HOOK_FLAGS()</h3>
<a class="indexterm" name="id3067733"></a><pre class="programlisting">#define G_HOOK_FLAGS(hook) (G_HOOK (hook)->flags)
</pre>
<p>
Returns the flags of a hook.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067775"></a><h3>
<a name="G-HOOK-FLAG-USER-SHIFT:CAPS"></a>G_HOOK_FLAG_USER_SHIFT</h3>
<a class="indexterm" name="id3067788"></a><pre class="programlisting">#define G_HOOK_FLAG_USER_SHIFT (4)
</pre>
<p>
The position of the first bit which is not reserved for internal
use be the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> implementation, i.e.
<code class="literal">1 << G_HOOK_FLAG_USER_SHIFT</code> is the first bit
which can be used for application-defined flags.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067821"></a><h3>
<a name="G-HOOK:CAPS"></a>G_HOOK()</h3>
<a class="indexterm" name="id3067833"></a><pre class="programlisting">#define G_HOOK(hook) ((GHook*) (hook))
</pre>
<p>
Casts a pointer to a <code class="literal">GHook*</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a pointer.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067873"></a><h3>
<a name="G-HOOK-IS-VALID:CAPS"></a>G_HOOK_IS_VALID()</h3>
<a class="indexterm" name="id3067887"></a><pre class="programlisting">#define G_HOOK_IS_VALID(hook)</pre>
<p>
Returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is valid, i.e. it is in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>, it is active
and it has not been destroyed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is valid.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3067982"></a><h3>
<a name="G-HOOK-ACTIVE:CAPS"></a>G_HOOK_ACTIVE()</h3>
<a class="indexterm" name="id3067995"></a><pre class="programlisting">#define G_HOOK_ACTIVE(hook)</pre>
<p>
Returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is active, which is normally <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> until the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>
is destroyed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is active.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3068101"></a><h3>
<a name="G-HOOK-IN-CALL:CAPS"></a>G_HOOK_IN_CALL()</h3>
<a class="indexterm" name="id3068114"></a><pre class="programlisting">#define G_HOOK_IN_CALL(hook)</pre>
<p>
Returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> function is currently executing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> function is currently executing.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3068202"></a><h3>
<a name="G-HOOK-IS-UNLINKED:CAPS"></a>G_HOOK_IS_UNLINKED()</h3>
<a class="indexterm" name="id3068215"></a><pre class="programlisting">#define G_HOOK_IS_UNLINKED(hook)</pre>
<p>
Returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is not in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is not in a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3068318"></a><h3>
<a name="g-hook-ref"></a>g_hook_ref ()</h3>
<a class="indexterm" name="id3068330"></a><pre class="programlisting"><a href="glib-Hook-Functions.html#GHook">GHook</a>* g_hook_ref (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);</pre>
<p>
Increments the reference count for a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to increment the reference count of.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the <em class="parameter"><code>hook</code></em> that was passed in (since 2.6)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3068439"></a><h3>
<a name="g-hook-unref"></a>g_hook_unref ()</h3>
<a class="indexterm" name="id3068452"></a><pre class="programlisting">void g_hook_unref (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);</pre>
<p>
Decrements the reference count of a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
If the reference count falls to 0, the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> is removed from the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>
and <a href="glib-Hook-Functions.html#g-hook-free"><code class="function">g_hook_free()</code></a> is called to free it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to unref.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3068572"></a><h3>
<a name="g-hook-free"></a>g_hook_free ()</h3>
<a class="indexterm" name="id3068584"></a><pre class="programlisting">void g_hook_free (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);</pre>
<p>
Calls the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> <em class="parameter"><code>hook_free</code></em> function if it exists, and frees the memory
allocated for the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to free.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3068690"></a><h3>
<a name="g-hook-destroy"></a>g_hook_destroy ()</h3>
<a class="indexterm" name="id3068703"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_hook_destroy (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Basic-Types.html#gulong">gulong</a> hook_id);</pre>
<p>
Destroys a <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a>, given its ID.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_id</code></em> :</span></td>
<td>a hook ID.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> was found in the <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a> and destroyed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3068822"></a><h3>
<a name="g-hook-destroy-link"></a>g_hook_destroy_link ()</h3>
<a class="indexterm" name="id3068836"></a><pre class="programlisting">void g_hook_destroy_link (<a href="glib-Hook-Functions.html#GHookList">GHookList</a> *hook_list,
<a href="glib-Hook-Functions.html#GHook">GHook</a> *hook);</pre>
<p>
Removes one <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> from a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>, marking it inactive and calling
<a href="glib-Hook-Functions.html#g-hook-unref"><code class="function">g_hook_unref()</code></a> on it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook_list</code></em> :</span></td>
<td>a <a href="glib-Hook-Functions.html#GHookList"><span class="type">GHookList</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hook</code></em> :</span></td>
<td>the <a href="glib-Hook-Functions.html#GHook"><span class="type">GHook</span></a> to remove.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>