403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/gtk-doc/html/glib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/gtk-doc/html/glib/glib-Hook-Functions.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Hook Functions</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" 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.11 (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">
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
<link rel="index" href="ix11.html" title="Index of new symbols in 2.18">
<link rel="index" href="ix12.html" title="Index of new symbols in 2.20">
<link rel="index" href="ix13.html" title="Index of new symbols in 2.22">
</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">
<a href="#glib-Hook-Functions.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#glib-Hook-Functions.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Hook Functions">
<a name="glib-Hook-Functions"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="glib-Hook-Functions.top_of_page"></a>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" title="Synopsis">
<a name="glib-Hook-Functions.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;glib.h&gt;

                    <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a>;
void                (<a class="link" href="glib-Hook-Functions.html#GHookFinalizeFunc" title="GHookFinalizeFunc ()">*GHookFinalizeFunc</a>)                (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);
                    <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>;
void                (<a class="link" href="glib-Hook-Functions.html#GHookFunc" title="GHookFunc ()">*GHookFunc</a>)                        (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (<a class="link" href="glib-Hook-Functions.html#GHookCheckFunc" title="GHookCheckFunc ()">*GHookCheckFunc</a>)                   (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);

void                <a class="link" href="glib-Hook-Functions.html#g-hook-list-init" title="g_hook_list_init ()">g_hook_list_init</a>                    (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a> hook_size);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-list-invoke" title="g_hook_list_invoke ()">g_hook_list_invoke</a>                  (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-list-invoke-check" title="g_hook_list_invoke_check ()">g_hook_list_invoke_check</a>            (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-list-marshal" title="g_hook_list_marshal ()">g_hook_list_marshal</a>                 (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookMarshaller" title="GHookMarshaller ()">GHookMarshaller</a> marshaller,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);
void                (<a class="link" href="glib-Hook-Functions.html#GHookMarshaller" title="GHookMarshaller ()">*GHookMarshaller</a>)                  (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-list-marshal-check" title="g_hook_list_marshal_check ()">g_hook_list_marshal_check</a>           (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookCheckMarshaller" title="GHookCheckMarshaller ()">GHookCheckMarshaller</a> marshaller,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (<a class="link" href="glib-Hook-Functions.html#GHookCheckMarshaller" title="GHookCheckMarshaller ()">*GHookCheckMarshaller</a>)             (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-list-clear" title="g_hook_list_clear ()">g_hook_list_clear</a>                   (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list);

<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-alloc" title="g_hook_alloc ()">g_hook_alloc</a>                        (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list);
#define             <a class="link" href="glib-Hook-Functions.html#g-hook-append" title="g_hook_append()">g_hook_append</a>                       ( hook_list, hook )
void                <a class="link" href="glib-Hook-Functions.html#g-hook-prepend" title="g_hook_prepend ()">g_hook_prepend</a>                      (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-insert-before" title="g_hook_insert_before ()">g_hook_insert_before</a>                (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *sibling,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-insert-sorted" title="g_hook_insert_sorted ()">g_hook_insert_sorted</a>                (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookCompareFunc" title="GHookCompareFunc ()">GHookCompareFunc</a> func);
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a>                (<a class="link" href="glib-Hook-Functions.html#GHookCompareFunc" title="GHookCompareFunc ()">*GHookCompareFunc</a>)                 (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *new_hook,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *sibling);
<a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a>                <a class="link" href="glib-Hook-Functions.html#g-hook-compare-ids" title="g_hook_compare_ids ()">g_hook_compare_ids</a>                  (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *new_hook,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *sibling);

<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-get" title="g_hook_get ()">g_hook_get</a>                          (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> hook_id);
<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-find" title="g_hook_find ()">g_hook_find</a>                         (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookFindFunc" title="GHookFindFunc ()">GHookFindFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (<a class="link" href="glib-Hook-Functions.html#GHookFindFunc" title="GHookFindFunc ()">*GHookFindFunc</a>)                    (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);
<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-find-data" title="g_hook_find_data ()">g_hook_find_data</a>                    (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);
<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-find-func" title="g_hook_find_func ()">g_hook_find_func</a>                    (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> func);
<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-find-func-data" title="g_hook_find_func_data ()">g_hook_find_func_data</a>               (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);

<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-first-valid" title="g_hook_first_valid ()">g_hook_first_valid</a>                  (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_be_in_call);
<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              <a class="link" href="glib-Hook-Functions.html#g-hook-next-valid" title="g_hook_next_valid ()">g_hook_next_valid</a>                   (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_be_in_call);
enum                <a class="link" href="glib-Hook-Functions.html#GHookFlagMask" title="enum GHookFlagMask">GHookFlagMask</a>;
#define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-FLAGS--CAPS" title="G_HOOK_FLAGS()">G_HOOK_FLAGS</a>                        (hook)
#define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-FLAG-USER-SHIFT--CAPS" title="G_HOOK_FLAG_USER_SHIFT">G_HOOK_FLAG_USER_SHIFT</a>

#define             <a class="link" href="glib-Hook-Functions.html#G-HOOK--CAPS" title="G_HOOK()">G_HOOK</a>                              (hook)
#define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-IS-VALID--CAPS" title="G_HOOK_IS_VALID()">G_HOOK_IS_VALID</a>                     (hook)
#define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-ACTIVE--CAPS" title="G_HOOK_ACTIVE()">G_HOOK_ACTIVE</a>                       (hook)
#define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-IN-CALL--CAPS" title="G_HOOK_IN_CALL()">G_HOOK_IN_CALL</a>                      (hook)
#define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-IS-UNLINKED--CAPS" title="G_HOOK_IS_UNLINKED()">G_HOOK_IS_UNLINKED</a>                  (hook)

<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-ref" title="g_hook_ref ()">g_hook_ref</a>                          (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-unref" title="g_hook_unref ()">g_hook_unref</a>                        (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-free" title="g_hook_free ()">g_hook_free</a>                         (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Hook-Functions.html#g-hook-destroy" title="g_hook_destroy ()">g_hook_destroy</a>                      (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> hook_id);
void                <a class="link" href="glib-Hook-Functions.html#g-hook-destroy-link" title="g_hook_destroy_link ()">g_hook_destroy_link</a>                 (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="glib-Hook-Functions.description"></a><h2>Description</h2>
<p>
The <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>, <a class="link" href="glib-Hook-Functions.html#GHook" title="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" title="Details">
<a name="glib-Hook-Functions.details"></a><h2>Details</h2>
<div class="refsect2" title="GHookList">
<a name="GHookList"></a><h3>GHookList</h3>
<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><p><span class="term"><a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> <em class="structfield"><code>seq_id</code></em>;</span></p></td>
<td>the next free <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> id
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a> <em class="structfield"><code>hook_size</code></em> : 16;</span></p></td>
<td>the size of the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a> elements, in bytes
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a> <em class="structfield"><code>is_setup</code></em> : 1;</span></p></td>
<td>1 if the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a> has been initialized
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *<em class="structfield"><code>hooks</code></em>;</span></p></td>
<td>the first <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> element in the list
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> <em class="structfield"><code>dummy3</code></em>;</span></p></td>
<td>unused
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHookFinalizeFunc" title="GHookFinalizeFunc ()">GHookFinalizeFunc</a> <em class="structfield"><code>finalize_hook</code></em>;</span></p></td>
<td>the function to call to finalize a <a class="link" href="glib-Hook-Functions.html#GHook" title="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><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> <em class="structfield"><code>dummy</code></em>[2];</span></p></td>
<td>unused
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GHookFinalizeFunc ()">
<a name="GHookFinalizeFunc"></a><h3>GHookFinalizeFunc ()</h3>
<pre class="programlisting">void                (*GHookFinalizeFunc)                (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></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" title="GHook">
<a name="GHook"></a><h3>GHook</h3>
<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 class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> <em class="structfield"><code>data</code></em>;</span></p></td>
<td>data which is passed to func when this hook is invoked
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *<em class="structfield"><code>next</code></em>;</span></p></td>
<td>pointer to the next hook in the list
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *<em class="structfield"><code>prev</code></em>;</span></p></td>
<td>pointer to the previous hook in the list
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a> <em class="structfield"><code>ref_count</code></em>;</span></p></td>
<td>the reference count of this hook
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> <em class="structfield"><code>hook_id</code></em>;</span></p></td>
<td>the id of this hook, which is unique within its list
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a> <em class="structfield"><code>flags</code></em>;</span></p></td>
<td>flags which are set for this hook. See <a class="link" href="glib-Hook-Functions.html#GHookFlagMask" title="enum GHookFlagMask"><span class="type">GHookFlagMask</span></a> for
    predefined flags
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> <em class="structfield"><code>func</code></em>;</span></p></td>
<td>the function to call when this hook is invoked. The possible 
signatures for this function are <a class="link" href="glib-Hook-Functions.html#GHookFunc" title="GHookFunc ()"><span class="type">GHookFunc</span></a> and <a class="link" href="glib-Hook-Functions.html#GHookCheckFunc" title="GHookCheckFunc ()"><span class="type">GHookCheckFunc</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> <em class="structfield"><code>destroy</code></em>;</span></p></td>
<td>the default <code class="function">finalize_hook</code> function of a 
<a class="link" href="glib-Hook-Functions.html#GHookList" title="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" title="GHookFunc ()">
<a name="GHookFunc"></a><h3>GHookFunc ()</h3>
<pre class="programlisting">void                (*GHookFunc)                        (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);</pre>
<p>
Defines the type of a hook function that can be invoked
by <a class="link" href="glib-Hook-Functions.html#g-hook-list-invoke" title="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><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data field of the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is passed to the hook function here
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GHookCheckFunc ()">
<a name="GHookCheckFunc"></a><h3>GHookCheckFunc ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (*GHookCheckFunc)                   (<a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);</pre>
<p>
Defines the type of a hook function that can be invoked
by <a class="link" href="glib-Hook-Functions.html#g-hook-list-invoke-check" title="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><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data field of the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is passed to the hook function here
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%FALSE if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> should be destroyed
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_list_init ()">
<a name="g-hook-list-init"></a><h3>g_hook_list_init ()</h3>
<pre class="programlisting">void                g_hook_list_init                    (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#guint" title="guint">guint</a> hook_size);</pre>
<p>
Initializes a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
This must be called before the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a> is used.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_size</code></em> :</span></p></td>
<td>the size of each element in the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>, typically
    <code class="literal">sizeof (GHook)</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_list_invoke ()">
<a name="g-hook-list-invoke"></a><h3>g_hook_list_invoke ()</h3>
<pre class="programlisting">void                g_hook_list_invoke                  (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse);</pre>
<p>
Calls all of the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> functions in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
<td>%TRUE if functions which are already running (e.g. in another
    thread) can be called. If set to <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>, these are skipped
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_list_invoke_check ()">
<a name="g-hook-list-invoke-check"></a><h3>g_hook_list_invoke_check ()</h3>
<pre class="programlisting">void                g_hook_list_invoke_check            (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse);</pre>
<p>
Calls all of the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> functions in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
Any function which returns <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> is removed from the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
<td>%TRUE if functions which are already running (e.g. in another
thread) can be called. If set to <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>, these are skipped
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_list_marshal ()">
<a name="g-hook-list-marshal"></a><h3>g_hook_list_marshal ()</h3>
<pre class="programlisting">void                g_hook_list_marshal                 (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookMarshaller" title="GHookMarshaller ()">GHookMarshaller</a> marshaller,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);</pre>
<p>
Calls a function on each valid <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
<td>%TRUE if hooks which are currently running (e.g. in another
    thread) are considered valid. If set to <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>, these are skipped
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marshaller</code></em> :</span></p></td>
<td>the function to call for each <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>marshaller</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GHookMarshaller ()">
<a name="GHookMarshaller"></a><h3>GHookMarshaller ()</h3>
<pre class="programlisting">void                (*GHookMarshaller)                  (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);</pre>
<p>
Defines the type of function used by <a class="link" href="glib-Hook-Functions.html#g-hook-list-marshal" title="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><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
<td>user data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_list_marshal_check ()">
<a name="g-hook-list-marshal-check"></a><h3>g_hook_list_marshal_check ()</h3>
<pre class="programlisting">void                g_hook_list_marshal_check           (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_recurse,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookCheckMarshaller" title="GHookCheckMarshaller ()">GHookCheckMarshaller</a> marshaller,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);</pre>
<p>
Calls a function on each valid <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> and destroys it if the
function returns <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
<td>%TRUE if hooks which are currently running (e.g. in another
    thread) are considered valid. If set to <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>, these are skipped
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marshaller</code></em> :</span></p></td>
<td>the function to call for each <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>marshaller</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GHookCheckMarshaller ()">
<a name="GHookCheckMarshaller"></a><h3>GHookCheckMarshaller ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (*GHookCheckMarshaller)             (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> marshal_data);</pre>
<p>
Defines the type of function used by <a class="link" href="glib-Hook-Functions.html#g-hook-list-marshal-check" title="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><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
<td>user data
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%FALSE if <em class="parameter"><code>hook</code></em> should be destroyed
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_list_clear ()">
<a name="g-hook-list-clear"></a><h3>g_hook_list_clear ()</h3>
<pre class="programlisting">void                g_hook_list_clear                   (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list);</pre>
<p>
Removes all the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> elements from a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_alloc ()">
<a name="g-hook-alloc"></a><h3>g_hook_alloc ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_alloc                        (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list);</pre>
<p>
Allocates space for a <a class="link" href="glib-Hook-Functions.html#GHook" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_append()">
<a name="g-hook-append"></a><h3>g_hook_append()</h3>
<pre class="programlisting">#define             g_hook_append( hook_list, hook )</pre>
<p>
Appends a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> onto the end of a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="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" title="g_hook_prepend ()">
<a name="g-hook-prepend"></a><h3>g_hook_prepend ()</h3>
<pre class="programlisting">void                g_hook_prepend                      (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);</pre>
<p>
Prepends a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> on the start of a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="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" title="g_hook_insert_before ()">
<a name="g-hook-insert-before"></a><h3>g_hook_insert_before ()</h3>
<pre class="programlisting">void                g_hook_insert_before                (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *sibling,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);</pre>
<p>
Inserts a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> into a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>, before a given <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to insert the new <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> before
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to insert
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_insert_sorted ()">
<a name="g-hook-insert-sorted"></a><h3>g_hook_insert_sorted ()</h3>
<pre class="programlisting">void                g_hook_insert_sorted                (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookCompareFunc" title="GHookCompareFunc ()">GHookCompareFunc</a> func);</pre>
<p>
Inserts a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> into a <a class="link" href="glib-Hook-Functions.html#GHookList" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to insert
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the comparison function used to sort the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> elements
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GHookCompareFunc ()">
<a name="GHookCompareFunc"></a><h3>GHookCompareFunc ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a>                (*GHookCompareFunc)                 (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *new_hook,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *sibling);</pre>
<p>
Defines the type of function used to compare <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> elements in
<a class="link" href="glib-Hook-Functions.html#g-hook-insert-sorted" title="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><p><span class="term"><em class="parameter"><code>new_hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> being inserted
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to compare with <em class="parameter"><code>new_hook</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a value &lt;= 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" title="g_hook_compare_ids ()">
<a name="g-hook-compare-ids"></a><h3>g_hook_compare_ids ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a>                g_hook_compare_ids                  (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *new_hook,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *sibling);</pre>
<p>
Compares the ids of two <a class="link" href="glib-Hook-Functions.html#GHook" title="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><p><span class="term"><em class="parameter"><code>new_hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to compare with <em class="parameter"><code>new_hook</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a value &lt;= 0 if the id of <em class="parameter"><code>sibling</code></em> is &gt;= the id of <em class="parameter"><code>new_hook</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_get ()">
<a name="g-hook-get"></a><h3>g_hook_get ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_get                          (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> hook_id);</pre>
<p>
Returns the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> with the given id, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_id</code></em> :</span></p></td>
<td>a hook id
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> with the given id, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if it is not found
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_find ()">
<a name="g-hook-find"></a><h3>g_hook_find ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_find                         (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Hook-Functions.html#GHookFindFunc" title="GHookFindFunc ()">GHookFindFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);</pre>
<p>
Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
<td>%TRUE if <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
    skipped
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to call for each <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>, which should return <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> when
    the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> has been found
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data to pass to <em class="parameter"><code>func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the found <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if no matching <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is found
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GHookFindFunc ()">
<a name="GHookFindFunc"></a><h3>GHookFindFunc ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (*GHookFindFunc)                    (<a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);</pre>
<p>
Defines the type of the function passed to <a class="link" href="glib-Hook-Functions.html#g-hook-find" title="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><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data passed to <a class="link" href="glib-Hook-Functions.html#g-hook-find-func" title="g_hook_find_func ()"><code class="function">g_hook_find_func()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%TRUE if the required <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> has been found
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_find_data ()">
<a name="g-hook-find-data"></a><h3>g_hook_find_data ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_find_data                    (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);</pre>
<p>
Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
<td>%TRUE if <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
    skipped
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data to find
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> with the given <em class="parameter"><code>data</code></em> or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if no matching
    <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is found
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_find_func ()">
<a name="g-hook-find-func"></a><h3>g_hook_find_func ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_find_func                    (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> func);</pre>
<p>
Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
<td>%TRUE if <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
    skipped
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to find
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> with the given <em class="parameter"><code>func</code></em> or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if no matching
    <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is found
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_find_func_data ()">
<a name="g-hook-find-func-data"></a><h3>g_hook_find_func_data ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_find_func_data               (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> need_valids,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);</pre>
<p>
Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
<td>%TRUE if <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> elements which have been destroyed should be
    skipped
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to find
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the data to find
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="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 class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if no matching
    <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is found
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_first_valid ()">
<a name="g-hook-first-valid"></a><h3>g_hook_first_valid ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_first_valid                  (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_be_in_call);</pre>
<p>
Returns the first <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a> which has not been destroyed.
The reference count for the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is incremented, so you must call
<a class="link" href="glib-Hook-Functions.html#g-hook-unref" title="g_hook_unref ()"><code class="function">g_hook_unref()</code></a> to restore it when no longer needed. (Or call
<a class="link" href="glib-Hook-Functions.html#g-hook-next-valid" title="g_hook_next_valid ()"><code class="function">g_hook_next_valid()</code></a> if you are stepping through the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_be_in_call</code></em> :</span></p></td>
<td>%TRUE if hooks which are currently running (e.g. in another
    thread) are considered valid. If set to <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>, these are skipped
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the first valid <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if none are valid
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_next_valid ()">
<a name="g-hook-next-valid"></a><h3>g_hook_next_valid ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a>*              g_hook_next_valid                   (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> may_be_in_call);</pre>
<p>
Returns the next <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a> which has not been destroyed.
The reference count for the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is incremented, so you must call
<a class="link" href="glib-Hook-Functions.html#g-hook-unref" title="g_hook_unref ()"><code class="function">g_hook_unref()</code></a> to restore it when no longer needed. (Or continue to call
<a class="link" href="glib-Hook-Functions.html#g-hook-next-valid" title="g_hook_next_valid ()"><code class="function">g_hook_next_valid()</code></a> until <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> is returned.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the current <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_be_in_call</code></em> :</span></p></td>
<td>%TRUE if hooks which are currently running (e.g. in another
    thread) are considered valid. If set to <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a>, these are skipped
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the next valid <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if none are valid
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum GHookFlagMask">
<a name="GHookFlagMask"></a><h3>enum GHookFlagMask</h3>
<pre class="programlisting">typedef enum
{
  G_HOOK_FLAG_ACTIVE	    = 1 &lt;&lt; 0,
  G_HOOK_FLAG_IN_CALL	    = 1 &lt;&lt; 1,
  G_HOOK_FLAG_MASK	    = 0x0f
} GHookFlagMask;
</pre>
<p>
Flags used internally in the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> implementation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-HOOK-FLAG-ACTIVE--CAPS"></a><span class="term"><code class="literal">G_HOOK_FLAG_ACTIVE</code></span></p></td>
<td>set if the hook has not been destroyed
</td>
</tr>
<tr>
<td><p><a name="G-HOOK-FLAG-IN-CALL--CAPS"></a><span class="term"><code class="literal">G_HOOK_FLAG_IN_CALL</code></span></p></td>
<td>set if the hook is currently being run
</td>
</tr>
<tr>
<td><p><a name="G-HOOK-FLAG-MASK--CAPS"></a><span class="term"><code class="literal">G_HOOK_FLAG_MASK</code></span></p></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" title="G_HOOK_FLAGS()">
<a name="G-HOOK-FLAGS--CAPS"></a><h3>G_HOOK_FLAGS()</h3>
<pre class="programlisting">#define             G_HOOK_FLAGS(hook)</pre>
<p>
Returns the flags of a hook.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="G_HOOK_FLAG_USER_SHIFT">
<a name="G-HOOK-FLAG-USER-SHIFT--CAPS"></a><h3>G_HOOK_FLAG_USER_SHIFT</h3>
<pre class="programlisting">#define             G_HOOK_FLAG_USER_SHIFT</pre>
<p>
The position of the first bit which is not reserved for internal
use be the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> implementation, i.e.
<code class="literal">1 &lt;&lt; G_HOOK_FLAG_USER_SHIFT</code> is the first bit
which can be used for application-defined flags.
</p>
</div>
<hr>
<div class="refsect2" title="G_HOOK()">
<a name="G-HOOK--CAPS"></a><h3>G_HOOK()</h3>
<pre class="programlisting">#define             G_HOOK(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><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a pointer
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="G_HOOK_IS_VALID()">
<a name="G-HOOK-IS-VALID--CAPS"></a><h3>G_HOOK_IS_VALID()</h3>
<pre class="programlisting">#define             G_HOOK_IS_VALID(hook)</pre>
<p>
Returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is valid, i.e. it is in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="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><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%TRUE if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is valid
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="G_HOOK_ACTIVE()">
<a name="G-HOOK-ACTIVE--CAPS"></a><h3>G_HOOK_ACTIVE()</h3>
<pre class="programlisting">#define             G_HOOK_ACTIVE(hook)</pre>
<p>
Returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is active, which is normally <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> until the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
is destroyed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%TRUE if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is active
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="G_HOOK_IN_CALL()">
<a name="G-HOOK-IN-CALL--CAPS"></a><h3>G_HOOK_IN_CALL()</h3>
<pre class="programlisting">#define             G_HOOK_IN_CALL(hook)</pre>
<p>
Returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the <a class="link" href="glib-Hook-Functions.html#GHook" title="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><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%TRUE if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> function is currently executing
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="G_HOOK_IS_UNLINKED()">
<a name="G-HOOK-IS-UNLINKED--CAPS"></a><h3>G_HOOK_IS_UNLINKED()</h3>
<pre class="programlisting">#define             G_HOOK_IS_UNLINKED(hook)</pre>
<p>
Returns <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is not in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%TRUE if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is not in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_ref ()">
<a name="g-hook-ref"></a><h3>g_hook_ref ()</h3>
<pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *             g_hook_ref                          (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);</pre>
<p>
Increments the reference count for a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to increment the reference count of
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></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" title="g_hook_unref ()">
<a name="g-hook-unref"></a><h3>g_hook_unref ()</h3>
<pre class="programlisting">void                g_hook_unref                        (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);</pre>
<p>
Decrements the reference count of a <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>.
If the reference count falls to 0, the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> is removed from the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
and <a class="link" href="glib-Hook-Functions.html#g-hook-free" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to unref
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_free ()">
<a name="g-hook-free"></a><h3>g_hook_free ()</h3>
<pre class="programlisting">void                g_hook_free                         (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);</pre>
<p>
Calls the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a> <em class="parameter"><code>finalize_hook</code></em> function if it exists, and frees the memory
allocated for the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to free
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_destroy ()">
<a name="g-hook-destroy"></a><h3>g_hook_destroy ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_hook_destroy                      (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Basic-Types.html#gulong" title="gulong">gulong</a> hook_id);</pre>
<p>
Destroys a <a class="link" href="glib-Hook-Functions.html#GHook" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook_id</code></em> :</span></p></td>
<td>a hook ID
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>%TRUE if the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> was found in the <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a> and destroyed
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_hook_destroy_link ()">
<a name="g-hook-destroy-link"></a><h3>g_hook_destroy_link ()</h3>
<pre class="programlisting">void                g_hook_destroy_link                 (<a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList">GHookList</a> *hook_list,
                                                         <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook">GHook</a> *hook);</pre>
<p>
Removes one <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> from a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>, marking it inactive and calling
<a class="link" href="glib-Hook-Functions.html#g-hook-unref" title="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><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="GHookList"><span class="type">GHookList</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
<td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="GHook"><span class="type">GHook</span></a> to remove
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit