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