source: appstream-generator/build/girepo/glib/HookList.d @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 3.6 KB
Line 
1/*
2 * Licensed under the GNU Lesser General Public License Version 3
3 *
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the license, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18// generated automatically - do not change
19
20
21module glib.HookList;
22
23private import gi.glib;
24public  import gi.glibtypes;
25
26
27/**
28 * The #GHookList struct represents a list of hook functions.
29 */
30public class HookList
31{
32        /** the main Gtk struct */
33        protected GHookList* gHookList;
34        protected bool ownedRef;
35
36        /** Get the main Gtk struct */
37        public GHookList* getHookListStruct()
38        {
39                return gHookList;
40        }
41
42        /** the main Gtk struct as a void* */
43        protected void* getStruct()
44        {
45                return cast(void*)gHookList;
46        }
47
48        /**
49         * Sets our main struct and passes it to the parent class.
50         */
51        public this (GHookList* gHookList, bool ownedRef = false)
52        {
53                this.gHookList = gHookList;
54                this.ownedRef = ownedRef;
55        }
56
57
58        /**
59         * Removes all the #GHook elements from a #GHookList.
60         */
61        public void clear()
62        {
63                g_hook_list_clear(gHookList);
64        }
65
66        /**
67         * Initializes a #GHookList.
68         * This must be called before the #GHookList is used.
69         *
70         * Params:
71         *     hookSize = the size of each element in the #GHookList,
72         *         typically `sizeof (GHook)`.
73         */
74        public void init(uint hookSize)
75        {
76                g_hook_list_init(gHookList, hookSize);
77        }
78
79        /**
80         * Calls all of the #GHook functions in a #GHookList.
81         *
82         * Params:
83         *     mayRecurse = %TRUE if functions which are already running
84         *         (e.g. in another thread) can be called. If set to %FALSE,
85         *         these are skipped
86         */
87        public void invoke(bool mayRecurse)
88        {
89                g_hook_list_invoke(gHookList, mayRecurse);
90        }
91
92        /**
93         * Calls all of the #GHook functions in a #GHookList.
94         * Any function which returns %FALSE is removed from the #GHookList.
95         *
96         * Params:
97         *     mayRecurse = %TRUE if functions which are already running
98         *         (e.g. in another thread) can be called. If set to %FALSE,
99         *         these are skipped
100         */
101        public void invokeCheck(bool mayRecurse)
102        {
103                g_hook_list_invoke_check(gHookList, mayRecurse);
104        }
105
106        /**
107         * Calls a function on each valid #GHook.
108         *
109         * Params:
110         *     mayRecurse = %TRUE if hooks which are currently running
111         *         (e.g. in another thread) are considered valid. If set to %FALSE,
112         *         these are skipped
113         *     marshaller = the function to call for each #GHook
114         *     marshalData = data to pass to @marshaller
115         */
116        public void marshal(bool mayRecurse, GHookMarshaller marshaller, void* marshalData)
117        {
118                g_hook_list_marshal(gHookList, mayRecurse, marshaller, marshalData);
119        }
120
121        /**
122         * Calls a function on each valid #GHook and destroys it if the
123         * function returns %FALSE.
124         *
125         * Params:
126         *     mayRecurse = %TRUE if hooks which are currently running
127         *         (e.g. in another thread) are considered valid. If set to %FALSE,
128         *         these are skipped
129         *     marshaller = the function to call for each #GHook
130         *     marshalData = data to pass to @marshaller
131         */
132        public void marshalCheck(bool mayRecurse, GHookCheckMarshaller marshaller, void* marshalData)
133        {
134                g_hook_list_marshal_check(gHookList, mayRecurse, marshaller, marshalData);
135        }
136}
Note: See TracBrowser for help on using the repository browser.