Tizen 2.1 base
[platform/upstream/glib2.0.git] / docs / reference / glib / html / glib-Hook-Functions.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Hook Functions</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GLib Reference Manual">
8 <link rel="up" href="glib-utilities.html" title="GLib Utilities">
9 <link rel="prev" href="glib-Random-Numbers.html" title="Random Numbers">
10 <link rel="next" href="glib-Miscellaneous-Utility-Functions.html" title="Miscellaneous Utility Functions">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="glib-Random-Numbers.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GLib Reference Manual</th>
21 <td><a accesskey="n" href="glib-Miscellaneous-Utility-Functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#glib-Hook-Functions.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#glib-Hook-Functions.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="glib-Hook-Functions"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="glib-Hook-Functions.top_of_page"></a>Hook Functions</span></h2>
34 <p>Hook Functions — support for manipulating lists of hook functions</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="glib-Hook-Functions.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">
41 #include &lt;glib.h&gt;
42
43 struct              <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList">GHookList</a>;
44 <span class="returnvalue">void</span>                (<a class="link" href="glib-Hook-Functions.html#GHookFinalizeFunc" title="GHookFinalizeFunc ()">*GHookFinalizeFunc</a>)                (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
45                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);
46 struct              <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook">GHook</a>;
47 <span class="returnvalue">void</span>                (<a class="link" href="glib-Hook-Functions.html#GHookFunc" title="GHookFunc ()">*GHookFunc</a>)                        (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
48 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="glib-Hook-Functions.html#GHookCheckFunc" title="GHookCheckFunc ()">*GHookCheckFunc</a>)                   (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
49
50 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-list-init" title="g_hook_list_init ()">g_hook_list_init</a>                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
51                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> hook_size</code></em>);
52 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-list-invoke" title="g_hook_list_invoke ()">g_hook_list_invoke</a>                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
53                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>);
54 <span class="returnvalue">void</span>                <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>            (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
55                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>);
56 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-list-marshal" title="g_hook_list_marshal ()">g_hook_list_marshal</a>                 (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
57                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>,
58                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookMarshaller" title="GHookMarshaller ()"><span class="type">GHookMarshaller</span></a> marshaller</code></em>,
59                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);
60 <span class="returnvalue">void</span>                (<a class="link" href="glib-Hook-Functions.html#GHookMarshaller" title="GHookMarshaller ()">*GHookMarshaller</a>)                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
61                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);
62 <span class="returnvalue">void</span>                <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>           (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
63                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>,
64                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookCheckMarshaller" title="GHookCheckMarshaller ()"><span class="type">GHookCheckMarshaller</span></a> marshaller</code></em>,
65                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);
66 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="glib-Hook-Functions.html#GHookCheckMarshaller" title="GHookCheckMarshaller ()">*GHookCheckMarshaller</a>)             (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
67                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);
68 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-list-clear" title="g_hook_list_clear ()">g_hook_list_clear</a>                   (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>);
69
70 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-alloc" title="g_hook_alloc ()">g_hook_alloc</a>                        (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>);
71 #define             <a class="link" href="glib-Hook-Functions.html#g-hook-append" title="g_hook_append()">g_hook_append</a>                       (hook_list,
72                                                          hook)
73 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-prepend" title="g_hook_prepend ()">g_hook_prepend</a>                      (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
74                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);
75 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-insert-before" title="g_hook_insert_before ()">g_hook_insert_before</a>                (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
76                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *sibling</code></em>,
77                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);
78 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-insert-sorted" title="g_hook_insert_sorted ()">g_hook_insert_sorted</a>                (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
79                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
80                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookCompareFunc" title="GHookCompareFunc ()"><span class="type">GHookCompareFunc</span></a> func</code></em>);
81 <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                (<a class="link" href="glib-Hook-Functions.html#GHookCompareFunc" title="GHookCompareFunc ()">*GHookCompareFunc</a>)                 (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *new_hook</code></em>,
82                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *sibling</code></em>);
83 <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Hook-Functions.html#g-hook-compare-ids" title="g_hook_compare_ids ()">g_hook_compare_ids</a>                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *new_hook</code></em>,
84                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *sibling</code></em>);
85
86 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-get" title="g_hook_get ()">g_hook_get</a>                          (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
87                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> hook_id</code></em>);
88 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-find" title="g_hook_find ()">g_hook_find</a>                         (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
89                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
90                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookFindFunc" title="GHookFindFunc ()"><span class="type">GHookFindFunc</span></a> func</code></em>,
91                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
92 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="glib-Hook-Functions.html#GHookFindFunc" title="GHookFindFunc ()">*GHookFindFunc</a>)                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
93                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
94 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-find-data" title="g_hook_find_data ()">g_hook_find_data</a>                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
95                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
96                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
97 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-find-func" title="g_hook_find_func ()">g_hook_find_func</a>                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
98                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
99                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> func</code></em>);
100 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></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>               (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
101                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
102                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> func</code></em>,
103                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);
104
105 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-first-valid" title="g_hook_first_valid ()">g_hook_first_valid</a>                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
106                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_be_in_call</code></em>);
107 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-next-valid" title="g_hook_next_valid ()">g_hook_next_valid</a>                   (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
108                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
109                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_be_in_call</code></em>);
110 enum                <a class="link" href="glib-Hook-Functions.html#GHookFlagMask" title="enum GHookFlagMask">GHookFlagMask</a>;
111 #define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-FLAGS:CAPS" title="G_HOOK_FLAGS()">G_HOOK_FLAGS</a>                        (hook)
112 #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>
113
114 #define             <a class="link" href="glib-Hook-Functions.html#G-HOOK:CAPS" title="G_HOOK()">G_HOOK</a>                              (hook)
115 #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)
116 #define             <a class="link" href="glib-Hook-Functions.html#G-HOOK-ACTIVE:CAPS" title="G_HOOK_ACTIVE()">G_HOOK_ACTIVE</a>                       (hook)
117 #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)
118 #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)
119
120 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             <a class="link" href="glib-Hook-Functions.html#g-hook-ref" title="g_hook_ref ()">g_hook_ref</a>                          (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
121                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);
122 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-unref" title="g_hook_unref ()">g_hook_unref</a>                        (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
123                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);
124 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-free" title="g_hook_free ()">g_hook_free</a>                         (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
125                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);
126 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Hook-Functions.html#g-hook-destroy" title="g_hook_destroy ()">g_hook_destroy</a>                      (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
127                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> hook_id</code></em>);
128 <span class="returnvalue">void</span>                <a class="link" href="glib-Hook-Functions.html#g-hook-destroy-link" title="g_hook_destroy_link ()">g_hook_destroy_link</a>                 (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
129                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);
130 </pre>
131 </div>
132 <div class="refsect1">
133 <a name="glib-Hook-Functions.description"></a><h2>Description</h2>
134 <p>
135 The <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>, <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> and their related functions provide support for
136 lists of hook functions. Functions can be added and removed from the lists,
137 and the list of hook functions can be invoked.
138 </p>
139 </div>
140 <div class="refsect1">
141 <a name="glib-Hook-Functions.details"></a><h2>Details</h2>
142 <div class="refsect2">
143 <a name="GHookList"></a><h3>struct GHookList</h3>
144 <pre class="programlisting">struct GHookList {
145   gulong            seq_id;
146   guint             hook_size : 16;
147   guint             is_setup : 1;
148   GHook            *hooks;
149   gpointer          dummy3;
150   GHookFinalizeFunc finalize_hook;
151   gpointer          dummy[2];
152 };
153 </pre>
154 <p>
155 The <span class="structname">GHookList</span> struct represents a
156 list of hook functions.
157 </p>
158 <div class="variablelist"><table border="0">
159 <col align="left" valign="top">
160 <tbody>
161 <tr>
162 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> <em class="structfield"><code><a name="GHookList.seq-id"></a>seq_id</code></em>;</span></p></td>
163 <td>the next free <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> id</td>
164 </tr>
165 <tr>
166 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GHookList.hook-size"></a>hook_size</code></em> : 16;</span></p></td>
167 <td>the size of the <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> elements, in bytes</td>
168 </tr>
169 <tr>
170 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GHookList.is-setup"></a>is_setup</code></em> : 1;</span></p></td>
171 <td>1 if the <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> has been initialized</td>
172 </tr>
173 <tr>
174 <td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *<em class="structfield"><code><a name="GHookList.hooks"></a>hooks</code></em>;</span></p></td>
175 <td>the first <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> element in the list</td>
176 </tr>
177 <tr>
178 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GHookList.dummy3"></a>dummy3</code></em>;</span></p></td>
179 <td>unused</td>
180 </tr>
181 <tr>
182 <td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHookFinalizeFunc" title="GHookFinalizeFunc ()"><span class="type">GHookFinalizeFunc</span></a> <em class="structfield"><code><a name="GHookList.finalize-hook"></a>finalize_hook</code></em>;</span></p></td>
183 <td>the function to call to finalize a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> element.
184 The default behaviour is to call the hooks <em class="parameter"><code>destroy</code></em> function</td>
185 </tr>
186 <tr>
187 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GHookList.dummy"></a>dummy</code></em>[2];</span></p></td>
188 <td>unused</td>
189 </tr>
190 </tbody>
191 </table></div>
192 </div>
193 <hr>
194 <div class="refsect2">
195 <a name="GHookFinalizeFunc"></a><h3>GHookFinalizeFunc ()</h3>
196 <pre class="programlisting"><span class="returnvalue">void</span>                (*GHookFinalizeFunc)                (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
197                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);</pre>
198 <p>
199 Defines the type of function to be called when a hook in a
200 list of hooks gets finalized.
201 </p>
202 <div class="variablelist"><table border="0">
203 <col align="left" valign="top">
204 <tbody>
205 <tr>
206 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
207 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
208 </td>
209 </tr>
210 <tr>
211 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
212 <td>the hook in <em class="parameter"><code>hook_list</code></em> that gets finalized</td>
213 </tr>
214 </tbody>
215 </table></div>
216 </div>
217 <hr>
218 <div class="refsect2">
219 <a name="GHook"></a><h3>struct GHook</h3>
220 <pre class="programlisting">struct GHook {
221   gpointer       data;
222   GHook         *next;
223   GHook         *prev;
224   guint          ref_count;
225   gulong         hook_id;
226   guint          flags;
227   gpointer       func;
228   GDestroyNotify destroy;
229 };
230 </pre>
231 <p>
232 The <span class="structname">GHook</span> struct represents a single hook
233 function in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
234 </p>
235 <div class="variablelist"><table border="0">
236 <col align="left" valign="top">
237 <tbody>
238 <tr>
239 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GHook.data"></a>data</code></em>;</span></p></td>
240 <td>data which is passed to func when this hook is invoked</td>
241 </tr>
242 <tr>
243 <td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *<em class="structfield"><code><a name="GHook.next"></a>next</code></em>;</span></p></td>
244 <td>pointer to the next hook in the list</td>
245 </tr>
246 <tr>
247 <td><p><span class="term"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *<em class="structfield"><code><a name="GHook.prev"></a>prev</code></em>;</span></p></td>
248 <td>pointer to the previous hook in the list</td>
249 </tr>
250 <tr>
251 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GHook.ref-count"></a>ref_count</code></em>;</span></p></td>
252 <td>the reference count of this hook</td>
253 </tr>
254 <tr>
255 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> <em class="structfield"><code><a name="GHook.hook-id"></a>hook_id</code></em>;</span></p></td>
256 <td>the id of this hook, which is unique within its list</td>
257 </tr>
258 <tr>
259 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GHook.flags"></a>flags</code></em>;</span></p></td>
260 <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
261 predefined flags</td>
262 </tr>
263 <tr>
264 <td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GHook.func"></a>func</code></em>;</span></p></td>
265 <td>the function to call when this hook is invoked. The possible
266 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>
267 </td>
268 </tr>
269 <tr>
270 <td><p><span class="term"><a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="type">GDestroyNotify</span></a> <em class="structfield"><code><a name="GHook.destroy"></a>destroy</code></em>;</span></p></td>
271 <td>the default <em class="parameter"><code>finalize_hook</code></em> function of a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> calls
272 this member of the hook that is being finalized</td>
273 </tr>
274 </tbody>
275 </table></div>
276 </div>
277 <hr>
278 <div class="refsect2">
279 <a name="GHookFunc"></a><h3>GHookFunc ()</h3>
280 <pre class="programlisting"><span class="returnvalue">void</span>                (*GHookFunc)                        (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
281 <p>
282 Defines the type of a hook function that can be invoked
283 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>.
284 </p>
285 <div class="variablelist"><table border="0">
286 <col align="left" valign="top">
287 <tbody><tr>
288 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
289 <td>the data field of the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is passed to the hook function here</td>
290 </tr></tbody>
291 </table></div>
292 </div>
293 <hr>
294 <div class="refsect2">
295 <a name="GHookCheckFunc"></a><h3>GHookCheckFunc ()</h3>
296 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (*GHookCheckFunc)                   (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
297 <p>
298 Defines the type of a hook function that can be invoked
299 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>.
300 </p>
301 <div class="variablelist"><table border="0">
302 <col align="left" valign="top">
303 <tbody>
304 <tr>
305 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
306 <td>the data field of the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is passed to the hook function here</td>
307 </tr>
308 <tr>
309 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
310 <td>
311 <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> should be destroyed</td>
312 </tr>
313 </tbody>
314 </table></div>
315 </div>
316 <hr>
317 <div class="refsect2">
318 <a name="g-hook-list-init"></a><h3>g_hook_list_init ()</h3>
319 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_list_init                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
320                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="type">guint</span></a> hook_size</code></em>);</pre>
321 <p>
322 Initializes a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
323 This must be called before the <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> is used.
324 </p>
325 <div class="variablelist"><table border="0">
326 <col align="left" valign="top">
327 <tbody>
328 <tr>
329 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
330 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
331 </td>
332 </tr>
333 <tr>
334 <td><p><span class="term"><em class="parameter"><code>hook_size</code></em> :</span></p></td>
335 <td>the size of each element in the <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>,
336 typically <code class="literal">sizeof (GHook)</code>
337 </td>
338 </tr>
339 </tbody>
340 </table></div>
341 </div>
342 <hr>
343 <div class="refsect2">
344 <a name="g-hook-list-invoke"></a><h3>g_hook_list_invoke ()</h3>
345 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_list_invoke                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
346                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>);</pre>
347 <p>
348 Calls all of the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> functions in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
349 </p>
350 <div class="variablelist"><table border="0">
351 <col align="left" valign="top">
352 <tbody>
353 <tr>
354 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
355 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
356 </td>
357 </tr>
358 <tr>
359 <td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
360 <td>
361 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if functions which are already running
362 (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>,
363 these are skipped</td>
364 </tr>
365 </tbody>
366 </table></div>
367 </div>
368 <hr>
369 <div class="refsect2">
370 <a name="g-hook-list-invoke-check"></a><h3>g_hook_list_invoke_check ()</h3>
371 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_list_invoke_check            (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
372                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>);</pre>
373 <p>
374 Calls all of the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> functions in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
375 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="struct GHookList"><span class="type">GHookList</span></a>.
376 </p>
377 <div class="variablelist"><table border="0">
378 <col align="left" valign="top">
379 <tbody>
380 <tr>
381 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
382 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
383 </td>
384 </tr>
385 <tr>
386 <td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
387 <td>
388 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if functions which are already running
389 (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>,
390 these are skipped</td>
391 </tr>
392 </tbody>
393 </table></div>
394 </div>
395 <hr>
396 <div class="refsect2">
397 <a name="g-hook-list-marshal"></a><h3>g_hook_list_marshal ()</h3>
398 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_list_marshal                 (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
399                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>,
400                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookMarshaller" title="GHookMarshaller ()"><span class="type">GHookMarshaller</span></a> marshaller</code></em>,
401                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);</pre>
402 <p>
403 Calls a function on each valid <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>.
404 </p>
405 <div class="variablelist"><table border="0">
406 <col align="left" valign="top">
407 <tbody>
408 <tr>
409 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
410 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
411 </td>
412 </tr>
413 <tr>
414 <td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
415 <td>
416 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if hooks which are currently running
417 (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>,
418 these are skipped</td>
419 </tr>
420 <tr>
421 <td><p><span class="term"><em class="parameter"><code>marshaller</code></em> :</span></p></td>
422 <td>the function to call for each <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
423 </td>
424 </tr>
425 <tr>
426 <td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
427 <td>data to pass to <em class="parameter"><code>marshaller</code></em>
428 </td>
429 </tr>
430 </tbody>
431 </table></div>
432 </div>
433 <hr>
434 <div class="refsect2">
435 <a name="GHookMarshaller"></a><h3>GHookMarshaller ()</h3>
436 <pre class="programlisting"><span class="returnvalue">void</span>                (*GHookMarshaller)                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
437                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);</pre>
438 <p>
439 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>.
440 </p>
441 <div class="variablelist"><table border="0">
442 <col align="left" valign="top">
443 <tbody>
444 <tr>
445 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
446 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
447 </td>
448 </tr>
449 <tr>
450 <td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
451 <td>user data</td>
452 </tr>
453 </tbody>
454 </table></div>
455 </div>
456 <hr>
457 <div class="refsect2">
458 <a name="g-hook-list-marshal-check"></a><h3>g_hook_list_marshal_check ()</h3>
459 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_list_marshal_check           (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
460                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_recurse</code></em>,
461                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookCheckMarshaller" title="GHookCheckMarshaller ()"><span class="type">GHookCheckMarshaller</span></a> marshaller</code></em>,
462                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);</pre>
463 <p>
464 Calls a function on each valid <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> and destroys it if the
465 function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>.
466 </p>
467 <div class="variablelist"><table border="0">
468 <col align="left" valign="top">
469 <tbody>
470 <tr>
471 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
472 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
473 </td>
474 </tr>
475 <tr>
476 <td><p><span class="term"><em class="parameter"><code>may_recurse</code></em> :</span></p></td>
477 <td>
478 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if hooks which are currently running
479 (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>,
480 these are skipped</td>
481 </tr>
482 <tr>
483 <td><p><span class="term"><em class="parameter"><code>marshaller</code></em> :</span></p></td>
484 <td>the function to call for each <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
485 </td>
486 </tr>
487 <tr>
488 <td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
489 <td>data to pass to <em class="parameter"><code>marshaller</code></em>
490 </td>
491 </tr>
492 </tbody>
493 </table></div>
494 </div>
495 <hr>
496 <div class="refsect2">
497 <a name="GHookCheckMarshaller"></a><h3>GHookCheckMarshaller ()</h3>
498 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (*GHookCheckMarshaller)             (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
499                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> marshal_data</code></em>);</pre>
500 <p>
501 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>.
502 </p>
503 <div class="variablelist"><table border="0">
504 <col align="left" valign="top">
505 <tbody>
506 <tr>
507 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
508 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
509 </td>
510 </tr>
511 <tr>
512 <td><p><span class="term"><em class="parameter"><code>marshal_data</code></em> :</span></p></td>
513 <td>user data</td>
514 </tr>
515 <tr>
516 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
517 <td>
518 <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if <em class="parameter"><code>hook</code></em> should be destroyed</td>
519 </tr>
520 </tbody>
521 </table></div>
522 </div>
523 <hr>
524 <div class="refsect2">
525 <a name="g-hook-list-clear"></a><h3>g_hook_list_clear ()</h3>
526 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_list_clear                   (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>);</pre>
527 <p>
528 Removes all the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements from a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
529 </p>
530 <div class="variablelist"><table border="0">
531 <col align="left" valign="top">
532 <tbody><tr>
533 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
534 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
535 </td>
536 </tr></tbody>
537 </table></div>
538 </div>
539 <hr>
540 <div class="refsect2">
541 <a name="g-hook-alloc"></a><h3>g_hook_alloc ()</h3>
542 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_alloc                        (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>);</pre>
543 <p>
544 Allocates space for a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> and initializes it.
545 </p>
546 <div class="variablelist"><table border="0">
547 <col align="left" valign="top">
548 <tbody>
549 <tr>
550 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
551 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
552 </td>
553 </tr>
554 <tr>
555 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
556 <td>a new <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
557 </td>
558 </tr>
559 </tbody>
560 </table></div>
561 </div>
562 <hr>
563 <div class="refsect2">
564 <a name="g-hook-append"></a><h3>g_hook_append()</h3>
565 <pre class="programlisting">#define             g_hook_append( hook_list, hook )</pre>
566 <p>
567 Appends a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> onto the end of a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
568 </p>
569 <div class="variablelist"><table border="0">
570 <col align="left" valign="top">
571 <tbody>
572 <tr>
573 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
574 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
575 </td>
576 </tr>
577 <tr>
578 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
579 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to add to the end of <em class="parameter"><code>hook_list</code></em>
580 </td>
581 </tr>
582 </tbody>
583 </table></div>
584 </div>
585 <hr>
586 <div class="refsect2">
587 <a name="g-hook-prepend"></a><h3>g_hook_prepend ()</h3>
588 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_prepend                      (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
589                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);</pre>
590 <p>
591 Prepends a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> on the start of a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
592 </p>
593 <div class="variablelist"><table border="0">
594 <col align="left" valign="top">
595 <tbody>
596 <tr>
597 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
598 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
599 </td>
600 </tr>
601 <tr>
602 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
603 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to add to the start of <em class="parameter"><code>hook_list</code></em>
604 </td>
605 </tr>
606 </tbody>
607 </table></div>
608 </div>
609 <hr>
610 <div class="refsect2">
611 <a name="g-hook-insert-before"></a><h3>g_hook_insert_before ()</h3>
612 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_insert_before                (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
613                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *sibling</code></em>,
614                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);</pre>
615 <p>
616 Inserts a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> into a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>, before a given <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>.
617 </p>
618 <div class="variablelist"><table border="0">
619 <col align="left" valign="top">
620 <tbody>
621 <tr>
622 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
623 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
624 </td>
625 </tr>
626 <tr>
627 <td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
628 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to insert the new <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> before</td>
629 </tr>
630 <tr>
631 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
632 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to insert</td>
633 </tr>
634 </tbody>
635 </table></div>
636 </div>
637 <hr>
638 <div class="refsect2">
639 <a name="g-hook-insert-sorted"></a><h3>g_hook_insert_sorted ()</h3>
640 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_insert_sorted                (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
641                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
642                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookCompareFunc" title="GHookCompareFunc ()"><span class="type">GHookCompareFunc</span></a> func</code></em>);</pre>
643 <p>
644 Inserts a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> into a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>, sorted by the given function.
645 </p>
646 <div class="variablelist"><table border="0">
647 <col align="left" valign="top">
648 <tbody>
649 <tr>
650 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
651 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
652 </td>
653 </tr>
654 <tr>
655 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
656 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to insert</td>
657 </tr>
658 <tr>
659 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
660 <td>the comparison function used to sort the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements</td>
661 </tr>
662 </tbody>
663 </table></div>
664 </div>
665 <hr>
666 <div class="refsect2">
667 <a name="GHookCompareFunc"></a><h3>GHookCompareFunc ()</h3>
668 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                (*GHookCompareFunc)                 (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *new_hook</code></em>,
669                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *sibling</code></em>);</pre>
670 <p>
671 Defines the type of function used to compare <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements in
672 <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>.
673 </p>
674 <div class="variablelist"><table border="0">
675 <col align="left" valign="top">
676 <tbody>
677 <tr>
678 <td><p><span class="term"><em class="parameter"><code>new_hook</code></em> :</span></p></td>
679 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> being inserted</td>
680 </tr>
681 <tr>
682 <td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
683 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to compare with <em class="parameter"><code>new_hook</code></em>
684 </td>
685 </tr>
686 <tr>
687 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
688 <td>a value &lt;= 0 if <em class="parameter"><code>new_hook</code></em> should be before <em class="parameter"><code>sibling</code></em>
689 </td>
690 </tr>
691 </tbody>
692 </table></div>
693 </div>
694 <hr>
695 <div class="refsect2">
696 <a name="g-hook-compare-ids"></a><h3>g_hook_compare_ids ()</h3>
697 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_hook_compare_ids                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *new_hook</code></em>,
698                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *sibling</code></em>);</pre>
699 <p>
700 Compares the ids of two <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements, returning a negative value
701 if the second id is greater than the first.
702 </p>
703 <div class="variablelist"><table border="0">
704 <col align="left" valign="top">
705 <tbody>
706 <tr>
707 <td><p><span class="term"><em class="parameter"><code>new_hook</code></em> :</span></p></td>
708 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
709 </td>
710 </tr>
711 <tr>
712 <td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
713 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to compare with <em class="parameter"><code>new_hook</code></em>
714 </td>
715 </tr>
716 <tr>
717 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
718 <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>
719 </td>
720 </tr>
721 </tbody>
722 </table></div>
723 </div>
724 <hr>
725 <div class="refsect2">
726 <a name="g-hook-get"></a><h3>g_hook_get ()</h3>
727 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_get                          (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
728                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> hook_id</code></em>);</pre>
729 <p>
730 Returns the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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.
731 </p>
732 <div class="variablelist"><table border="0">
733 <col align="left" valign="top">
734 <tbody>
735 <tr>
736 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
737 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
738 </td>
739 </tr>
740 <tr>
741 <td><p><span class="term"><em class="parameter"><code>hook_id</code></em> :</span></p></td>
742 <td>a hook id</td>
743 </tr>
744 <tr>
745 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
746 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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>
747 </tr>
748 </tbody>
749 </table></div>
750 </div>
751 <hr>
752 <div class="refsect2">
753 <a name="g-hook-find"></a><h3>g_hook_find ()</h3>
754 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_find                         (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
755                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
756                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookFindFunc" title="GHookFindFunc ()"><span class="type">GHookFindFunc</span></a> func</code></em>,
757                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
758 <p>
759 Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> using the given function to
760 test for a match.
761 </p>
762 <div class="variablelist"><table border="0">
763 <col align="left" valign="top">
764 <tbody>
765 <tr>
766 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
767 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
768 </td>
769 </tr>
770 <tr>
771 <td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
772 <td>
773 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements which have been destroyed
774 should be skipped</td>
775 </tr>
776 <tr>
777 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
778 <td>the function to call for each <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>, which should return
779 <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="struct GHook"><span class="type">GHook</span></a> has been found</td>
780 </tr>
781 <tr>
782 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
783 <td>the data to pass to <em class="parameter"><code>func</code></em>
784 </td>
785 </tr>
786 <tr>
787 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
788 <td>the found <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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="struct GHook"><span class="type">GHook</span></a> is found</td>
789 </tr>
790 </tbody>
791 </table></div>
792 </div>
793 <hr>
794 <div class="refsect2">
795 <a name="GHookFindFunc"></a><h3>GHookFindFunc ()</h3>
796 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (*GHookFindFunc)                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
797                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
798 <p>
799 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>.
800 </p>
801 <div class="variablelist"><table border="0">
802 <col align="left" valign="top">
803 <tbody>
804 <tr>
805 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
806 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
807 </td>
808 </tr>
809 <tr>
810 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
811 <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>
812 </td>
813 </tr>
814 <tr>
815 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
816 <td>
817 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the required <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> has been found</td>
818 </tr>
819 </tbody>
820 </table></div>
821 </div>
822 <hr>
823 <div class="refsect2">
824 <a name="g-hook-find-data"></a><h3>g_hook_find_data ()</h3>
825 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_find_data                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
826                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
827                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
828 <p>
829 Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> with the given data.
830 </p>
831 <div class="variablelist"><table border="0">
832 <col align="left" valign="top">
833 <tbody>
834 <tr>
835 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
836 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
837 </td>
838 </tr>
839 <tr>
840 <td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
841 <td>
842 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements which have been destroyed
843 should be skipped</td>
844 </tr>
845 <tr>
846 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
847 <td>the data to find</td>
848 </tr>
849 <tr>
850 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
851 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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
852 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is found</td>
853 </tr>
854 </tbody>
855 </table></div>
856 </div>
857 <hr>
858 <div class="refsect2">
859 <a name="g-hook-find-func"></a><h3>g_hook_find_func ()</h3>
860 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_find_func                    (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
861                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
862                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> func</code></em>);</pre>
863 <p>
864 Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> with the given function.
865 </p>
866 <div class="variablelist"><table border="0">
867 <col align="left" valign="top">
868 <tbody>
869 <tr>
870 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
871 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
872 </td>
873 </tr>
874 <tr>
875 <td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
876 <td>
877 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements which have been destroyed
878 should be skipped</td>
879 </tr>
880 <tr>
881 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
882 <td>the function to find</td>
883 </tr>
884 <tr>
885 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
886 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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
887 <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is found</td>
888 </tr>
889 </tbody>
890 </table></div>
891 </div>
892 <hr>
893 <div class="refsect2">
894 <a name="g-hook-find-func-data"></a><h3>g_hook_find_func_data ()</h3>
895 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_find_func_data               (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
896                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> need_valids</code></em>,
897                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> func</code></em>,
898                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
899 <p>
900 Finds a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> with the given function and data.
901 </p>
902 <div class="variablelist"><table border="0">
903 <col align="left" valign="top">
904 <tbody>
905 <tr>
906 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
907 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
908 </td>
909 </tr>
910 <tr>
911 <td><p><span class="term"><em class="parameter"><code>need_valids</code></em> :</span></p></td>
912 <td>
913 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> elements which have been destroyed
914 should be skipped</td>
915 </tr>
916 <tr>
917 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
918 <td>the function to find</td>
919 </tr>
920 <tr>
921 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
922 <td>the data to find</td>
923 </tr>
924 <tr>
925 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
926 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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
927 no matching <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is found</td>
928 </tr>
929 </tbody>
930 </table></div>
931 </div>
932 <hr>
933 <div class="refsect2">
934 <a name="g-hook-first-valid"></a><h3>g_hook_first_valid ()</h3>
935 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_first_valid                  (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
936                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_be_in_call</code></em>);</pre>
937 <p>
938 Returns the first <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> which has not been destroyed.
939 The reference count for the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is incremented, so you must call
940 <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
941 <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="struct GHookList"><span class="type">GHookList</span></a>.)
942 </p>
943 <div class="variablelist"><table border="0">
944 <col align="left" valign="top">
945 <tbody>
946 <tr>
947 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
948 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
949 </td>
950 </tr>
951 <tr>
952 <td><p><span class="term"><em class="parameter"><code>may_be_in_call</code></em> :</span></p></td>
953 <td>
954 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if hooks which are currently running
955 (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>,
956 these are skipped</td>
957 </tr>
958 <tr>
959 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
960 <td>the first valid <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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>
961 </tr>
962 </tbody>
963 </table></div>
964 </div>
965 <hr>
966 <div class="refsect2">
967 <a name="g-hook-next-valid"></a><h3>g_hook_next_valid ()</h3>
968 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_next_valid                   (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
969                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>,
970                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> may_be_in_call</code></em>);</pre>
971 <p>
972 Returns the next <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> which has not been destroyed.
973 The reference count for the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is incremented, so you must call
974 <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
975 <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.)
976 </p>
977 <div class="variablelist"><table border="0">
978 <col align="left" valign="top">
979 <tbody>
980 <tr>
981 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
982 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
983 </td>
984 </tr>
985 <tr>
986 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
987 <td>the current <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
988 </td>
989 </tr>
990 <tr>
991 <td><p><span class="term"><em class="parameter"><code>may_be_in_call</code></em> :</span></p></td>
992 <td>
993 <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if hooks which are currently running
994 (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>,
995 these are skipped</td>
996 </tr>
997 <tr>
998 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
999 <td>the next valid <a class="link" href="glib-Hook-Functions.html#GHook" title="struct 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>
1000 </tr>
1001 </tbody>
1002 </table></div>
1003 </div>
1004 <hr>
1005 <div class="refsect2">
1006 <a name="GHookFlagMask"></a><h3>enum GHookFlagMask</h3>
1007 <pre class="programlisting">typedef enum {
1008   G_HOOK_FLAG_ACTIVE        = 1 &lt;&lt; 0,
1009   G_HOOK_FLAG_IN_CALL       = 1 &lt;&lt; 1,
1010   G_HOOK_FLAG_MASK          = 0x0f
1011 } GHookFlagMask;
1012 </pre>
1013 <p>
1014 Flags used internally in the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> implementation.
1015 </p>
1016 <div class="variablelist"><table border="0">
1017 <col align="left" valign="top">
1018 <tbody>
1019 <tr>
1020 <td><p><a name="G-HOOK-FLAG-ACTIVE:CAPS"></a><span class="term"><code class="literal">G_HOOK_FLAG_ACTIVE</code></span></p></td>
1021 <td>set if the hook has not been destroyed
1022 </td>
1023 </tr>
1024 <tr>
1025 <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>
1026 <td>set if the hook is currently being run
1027 </td>
1028 </tr>
1029 <tr>
1030 <td><p><a name="G-HOOK-FLAG-MASK:CAPS"></a><span class="term"><code class="literal">G_HOOK_FLAG_MASK</code></span></p></td>
1031 <td>A mask covering all bits reserved for
1032   hook flags; see <a class="link" href="glib-Hook-Functions.html#G-HOOK-FLAG-USER-SHIFT:CAPS" title="G_HOOK_FLAG_USER_SHIFT"><code class="literal">G_HOOK_FLAG_USER_SHIFT</code></a>
1033 </td>
1034 </tr>
1035 </tbody>
1036 </table></div>
1037 </div>
1038 <hr>
1039 <div class="refsect2">
1040 <a name="G-HOOK-FLAGS:CAPS"></a><h3>G_HOOK_FLAGS()</h3>
1041 <pre class="programlisting">#define G_HOOK_FLAGS(hook)         (G_HOOK (hook)-&gt;flags)
1042 </pre>
1043 <p>
1044 Gets the flags of a hook.
1045 </p>
1046 <div class="variablelist"><table border="0">
1047 <col align="left" valign="top">
1048 <tbody><tr>
1049 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1050 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
1051 </td>
1052 </tr></tbody>
1053 </table></div>
1054 </div>
1055 <hr>
1056 <div class="refsect2">
1057 <a name="G-HOOK-FLAG-USER-SHIFT:CAPS"></a><h3>G_HOOK_FLAG_USER_SHIFT</h3>
1058 <pre class="programlisting">#define G_HOOK_FLAG_USER_SHIFT (4)
1059 </pre>
1060 <p>
1061 The position of the first bit which is not reserved for internal
1062 use be the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> implementation, i.e.
1063 <code class="literal">1 &lt;&lt; G_HOOK_FLAG_USER_SHIFT</code> is the first
1064 bit which can be used for application-defined flags.
1065 </p>
1066 </div>
1067 <hr>
1068 <div class="refsect2">
1069 <a name="G-HOOK:CAPS"></a><h3>G_HOOK()</h3>
1070 <pre class="programlisting">#define G_HOOK(hook)                       ((GHook*) (hook))
1071 </pre>
1072 <p>
1073 Casts a pointer to a <code class="literal">GHook*</code>.
1074 </p>
1075 <div class="variablelist"><table border="0">
1076 <col align="left" valign="top">
1077 <tbody><tr>
1078 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1079 <td>a pointer</td>
1080 </tr></tbody>
1081 </table></div>
1082 </div>
1083 <hr>
1084 <div class="refsect2">
1085 <a name="G-HOOK-IS-VALID:CAPS"></a><h3>G_HOOK_IS_VALID()</h3>
1086 <pre class="programlisting">#define             G_HOOK_IS_VALID(hook)</pre>
1087 <p>
1088 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="struct 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="struct GHookList"><span class="type">GHookList</span></a>,
1089 it is active and it has not been destroyed.
1090 </p>
1091 <div class="variablelist"><table border="0">
1092 <col align="left" valign="top">
1093 <tbody>
1094 <tr>
1095 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1096 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
1097 </td>
1098 </tr>
1099 <tr>
1100 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1101 <td>
1102 <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="struct GHook"><span class="type">GHook</span></a> is valid</td>
1103 </tr>
1104 </tbody>
1105 </table></div>
1106 </div>
1107 <hr>
1108 <div class="refsect2">
1109 <a name="G-HOOK-ACTIVE:CAPS"></a><h3>G_HOOK_ACTIVE()</h3>
1110 <pre class="programlisting">#define             G_HOOK_ACTIVE(hook)</pre>
1111 <p>
1112 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="struct GHook"><span class="type">GHook</span></a> is active, which is normally the case
1113 until the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is destroyed.
1114 </p>
1115 <div class="variablelist"><table border="0">
1116 <col align="left" valign="top">
1117 <tbody>
1118 <tr>
1119 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1120 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
1121 </td>
1122 </tr>
1123 <tr>
1124 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1125 <td>
1126 <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="struct GHook"><span class="type">GHook</span></a> is active</td>
1127 </tr>
1128 </tbody>
1129 </table></div>
1130 </div>
1131 <hr>
1132 <div class="refsect2">
1133 <a name="G-HOOK-IN-CALL:CAPS"></a><h3>G_HOOK_IN_CALL()</h3>
1134 <pre class="programlisting">#define             G_HOOK_IN_CALL(hook)</pre>
1135 <p>
1136 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="struct GHook"><span class="type">GHook</span></a> function is currently executing.
1137 </p>
1138 <div class="variablelist"><table border="0">
1139 <col align="left" valign="top">
1140 <tbody>
1141 <tr>
1142 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1143 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
1144 </td>
1145 </tr>
1146 <tr>
1147 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1148 <td>
1149 <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="struct GHook"><span class="type">GHook</span></a> function is currently executing</td>
1150 </tr>
1151 </tbody>
1152 </table></div>
1153 </div>
1154 <hr>
1155 <div class="refsect2">
1156 <a name="G-HOOK-IS-UNLINKED:CAPS"></a><h3>G_HOOK_IS_UNLINKED()</h3>
1157 <pre class="programlisting">#define             G_HOOK_IS_UNLINKED(hook)</pre>
1158 <p>
1159 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="struct GHook"><span class="type">GHook</span></a> is not in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>.
1160 </p>
1161 <div class="variablelist"><table border="0">
1162 <col align="left" valign="top">
1163 <tbody>
1164 <tr>
1165 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1166 <td>a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>
1167 </td>
1168 </tr>
1169 <tr>
1170 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1171 <td>
1172 <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="struct GHook"><span class="type">GHook</span></a> is not in a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
1173 </td>
1174 </tr>
1175 </tbody>
1176 </table></div>
1177 </div>
1178 <hr>
1179 <div class="refsect2">
1180 <a name="g-hook-ref"></a><h3>g_hook_ref ()</h3>
1181 <pre class="programlisting"><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="returnvalue">GHook</span></a> *             g_hook_ref                          (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
1182                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);</pre>
1183 <p>
1184 Increments the reference count for a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>.
1185 </p>
1186 <div class="variablelist"><table border="0">
1187 <col align="left" valign="top">
1188 <tbody>
1189 <tr>
1190 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
1191 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
1192 </td>
1193 </tr>
1194 <tr>
1195 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1196 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to increment the reference count of</td>
1197 </tr>
1198 <tr>
1199 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1200 <td>the <em class="parameter"><code>hook</code></em> that was passed in (since 2.6)</td>
1201 </tr>
1202 </tbody>
1203 </table></div>
1204 </div>
1205 <hr>
1206 <div class="refsect2">
1207 <a name="g-hook-unref"></a><h3>g_hook_unref ()</h3>
1208 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_unref                        (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
1209                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);</pre>
1210 <p>
1211 Decrements the reference count of a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>.
1212 If the reference count falls to 0, the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> is removed
1213 from the <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct 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.
1214 </p>
1215 <div class="variablelist"><table border="0">
1216 <col align="left" valign="top">
1217 <tbody>
1218 <tr>
1219 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
1220 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
1221 </td>
1222 </tr>
1223 <tr>
1224 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1225 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to unref</td>
1226 </tr>
1227 </tbody>
1228 </table></div>
1229 </div>
1230 <hr>
1231 <div class="refsect2">
1232 <a name="g-hook-free"></a><h3>g_hook_free ()</h3>
1233 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_free                         (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
1234                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);</pre>
1235 <p>
1236 Calls the <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> <em class="parameter"><code>finalize_hook</code></em> function if it exists,
1237 and frees the memory allocated for the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>.
1238 </p>
1239 <div class="variablelist"><table border="0">
1240 <col align="left" valign="top">
1241 <tbody>
1242 <tr>
1243 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
1244 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
1245 </td>
1246 </tr>
1247 <tr>
1248 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1249 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to free</td>
1250 </tr>
1251 </tbody>
1252 </table></div>
1253 </div>
1254 <hr>
1255 <div class="refsect2">
1256 <a name="g-hook-destroy"></a><h3>g_hook_destroy ()</h3>
1257 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_hook_destroy                      (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
1258                                                          <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gulong" title="gulong"><span class="type">gulong</span></a> hook_id</code></em>);</pre>
1259 <p>
1260 Destroys a <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a>, given its ID.
1261 </p>
1262 <div class="variablelist"><table border="0">
1263 <col align="left" valign="top">
1264 <tbody>
1265 <tr>
1266 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
1267 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
1268 </td>
1269 </tr>
1270 <tr>
1271 <td><p><span class="term"><em class="parameter"><code>hook_id</code></em> :</span></p></td>
1272 <td>a hook ID</td>
1273 </tr>
1274 <tr>
1275 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1276 <td>
1277 <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="struct GHook"><span class="type">GHook</span></a> was found in the <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> and destroyed</td>
1278 </tr>
1279 </tbody>
1280 </table></div>
1281 </div>
1282 <hr>
1283 <div class="refsect2">
1284 <a name="g-hook-destroy-link"></a><h3>g_hook_destroy_link ()</h3>
1285 <pre class="programlisting"><span class="returnvalue">void</span>                g_hook_destroy_link                 (<em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a> *hook_list</code></em>,
1286                                                          <em class="parameter"><code><a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> *hook</code></em>);</pre>
1287 <p>
1288 Removes one <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> from a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>, marking it
1289 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.
1290 </p>
1291 <div class="variablelist"><table border="0">
1292 <col align="left" valign="top">
1293 <tbody>
1294 <tr>
1295 <td><p><span class="term"><em class="parameter"><code>hook_list</code></em> :</span></p></td>
1296 <td>a <a class="link" href="glib-Hook-Functions.html#GHookList" title="struct GHookList"><span class="type">GHookList</span></a>
1297 </td>
1298 </tr>
1299 <tr>
1300 <td><p><span class="term"><em class="parameter"><code>hook</code></em> :</span></p></td>
1301 <td>the <a class="link" href="glib-Hook-Functions.html#GHook" title="struct GHook"><span class="type">GHook</span></a> to remove</td>
1302 </tr>
1303 </tbody>
1304 </table></div>
1305 </div>
1306 </div>
1307 </div>
1308 <div class="footer">
1309 <hr>
1310           Generated by GTK-Doc V1.18</div>
1311 </body>
1312 </html>