alternative to assert
[gtkD.git] / gtkD / src / gtkc / gthread.d
blobfbfa48f7e5744a0666dc37feb5cc71f12550a647
1 /*
2 * This file is part of gtkD.
4 * gtkD 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 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD 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.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
23 // Adapted from John Reimer's DUI loader modules
26 module gtkc.gthread;
28 version(Tango) private import tango.stdc.stdio;
29 else private import std.stdio;
30 private import gtkc.gthreadtypes;
31 private import gtkc.Loader;
32 private import gtkc.paths;
34 private Linker gthread_Linker;
36 static this()
38 gthread_Linker = new Linker(libPath ~ importLibs[LIBRARY.GTHREAD] );
39 gthread_Linker.link(gthreadLinks);
40 debug writefln("* Finished static this(): gthread");
43 static ~this()
45 delete gthread_Linker;
46 debug writefln("* Finished static ~this(): gthread");
49 extern(C)
51 // gthread.Mutex
53 GMutex* function()g_mutex_new;
54 void function(GMutex* mutex)g_mutex_lock;
55 gboolean function(GMutex* mutex)g_mutex_trylock;
56 void function(GMutex* mutex)g_mutex_unlock;
57 void function(GMutex* mutex)g_mutex_free;
59 // gthread.StaticRecMutex
61 void function(GStaticRecMutex* mutex)g_static_rec_mutex_init;
62 void function(GStaticRecMutex* mutex)g_static_rec_mutex_lock;
63 gboolean function(GStaticRecMutex* mutex)g_static_rec_mutex_trylock;
64 void function(GStaticRecMutex* mutex)g_static_rec_mutex_unlock;
65 void function(GStaticRecMutex* mutex, guint depth)g_static_rec_mutex_lock_full;
66 guint function(GStaticRecMutex* mutex)g_static_rec_mutex_unlock_full;
67 void function(GStaticRecMutex* mutex)g_static_rec_mutex_free;
69 // gthread.RWLock
71 void function(GStaticRWLock* lock)g_static_rw_lock_init;
72 void function(GStaticRWLock* lock)g_static_rw_lock_reader_lock;
73 gboolean function(GStaticRWLock* lock)g_static_rw_lock_reader_trylock;
74 void function(GStaticRWLock* lock)g_static_rw_lock_reader_unlock;
75 void function(GStaticRWLock* lock)g_static_rw_lock_writer_lock;
76 gboolean function(GStaticRWLock* lock)g_static_rw_lock_writer_trylock;
77 void function(GStaticRWLock* lock)g_static_rw_lock_writer_unlock;
78 void function(GStaticRWLock* lock)g_static_rw_lock_free;
80 // gthread.Cond
82 GCond* function()g_cond_new;
83 void function(GCond* cond)g_cond_signal;
84 void function(GCond* cond)g_cond_broadcast;
85 void function(GCond* cond, GMutex* mutex)g_cond_wait;
86 gboolean function(GCond* cond, GMutex* mutex, GTimeVal* absTime)g_cond_timed_wait;
87 void function(GCond* cond)g_cond_free;
89 // gthread.Private
91 GPrivate* function(GDestroyNotify destructor)g_private_new;
92 gpointer function(GPrivate* privateKey)g_private_get;
93 void function(GPrivate* privateKey, gpointer data)g_private_set;
95 // gthread.StaticPrivate
97 void function(GStaticPrivate* privateKey)g_static_private_init;
98 gpointer function(GStaticPrivate* privateKey)g_static_private_get;
99 void function(GStaticPrivate* privateKey, gpointer data, GDestroyNotify notify)g_static_private_set;
100 void function(GStaticPrivate* privateKey)g_static_private_free;
102 // gthread.Thread
104 void function(GThreadFunctions* vtable)g_thread_init;
105 gboolean function()g_thread_supported;
106 GThread* function(GThreadFunc func, gpointer data, gboolean joinable, GError** error)g_thread_create;
107 GThread* function(GThreadFunc func, gpointer data, gulong stackSize, gboolean joinable, gboolean bound, GThreadPriority priority, GError** error)g_thread_create_full;
108 GThread* function()g_thread_self;
109 gpointer function(GThread* thread)g_thread_join;
110 void function(GThread* thread, GThreadPriority priority)g_thread_set_priority;
111 void function()g_thread_yield;
112 void function(gpointer retval)g_thread_exit;
113 void function(GFunc threadFunc, gpointer userData)g_thread_foreach;
114 void function(GStaticMutex* mutex)g_static_mutex_init;
115 void function(GStaticMutex* mutex)g_static_mutex_lock;
116 gboolean function(GStaticMutex* mutex)g_static_mutex_trylock;
117 void function(GStaticMutex* mutex)g_static_mutex_unlock;
118 GMutex* function(GStaticMutex* mutex)g_static_mutex_get_mutex;
119 void function(GStaticMutex* mutex)g_static_mutex_free;
124 Symbol[] gthreadLinks =
127 { "g_mutex_new", cast(void**)& g_mutex_new},
128 { "g_mutex_lock", cast(void**)& g_mutex_lock},
129 { "g_mutex_trylock", cast(void**)& g_mutex_trylock},
130 { "g_mutex_unlock", cast(void**)& g_mutex_unlock},
131 { "g_mutex_free", cast(void**)& g_mutex_free},
132 { "g_static_rec_mutex_init", cast(void**)& g_static_rec_mutex_init},
133 { "g_static_rec_mutex_lock", cast(void**)& g_static_rec_mutex_lock},
134 { "g_static_rec_mutex_trylock", cast(void**)& g_static_rec_mutex_trylock},
135 { "g_static_rec_mutex_unlock", cast(void**)& g_static_rec_mutex_unlock},
136 { "g_static_rec_mutex_lock_full", cast(void**)& g_static_rec_mutex_lock_full},
137 { "g_static_rec_mutex_unlock_full", cast(void**)& g_static_rec_mutex_unlock_full},
138 { "g_static_rec_mutex_free", cast(void**)& g_static_rec_mutex_free},
139 { "g_static_rw_lock_init", cast(void**)& g_static_rw_lock_init},
140 { "g_static_rw_lock_reader_lock", cast(void**)& g_static_rw_lock_reader_lock},
141 { "g_static_rw_lock_reader_trylock", cast(void**)& g_static_rw_lock_reader_trylock},
142 { "g_static_rw_lock_reader_unlock", cast(void**)& g_static_rw_lock_reader_unlock},
143 { "g_static_rw_lock_writer_lock", cast(void**)& g_static_rw_lock_writer_lock},
144 { "g_static_rw_lock_writer_trylock", cast(void**)& g_static_rw_lock_writer_trylock},
145 { "g_static_rw_lock_writer_unlock", cast(void**)& g_static_rw_lock_writer_unlock},
146 { "g_static_rw_lock_free", cast(void**)& g_static_rw_lock_free},
147 { "g_cond_new", cast(void**)& g_cond_new},
148 { "g_cond_signal", cast(void**)& g_cond_signal},
149 { "g_cond_broadcast", cast(void**)& g_cond_broadcast},
150 { "g_cond_wait", cast(void**)& g_cond_wait},
151 { "g_cond_timed_wait", cast(void**)& g_cond_timed_wait},
152 { "g_cond_free", cast(void**)& g_cond_free},
153 { "g_private_new", cast(void**)& g_private_new},
154 { "g_private_get", cast(void**)& g_private_get},
155 { "g_private_set", cast(void**)& g_private_set},
156 { "g_static_private_init", cast(void**)& g_static_private_init},
157 { "g_static_private_get", cast(void**)& g_static_private_get},
158 { "g_static_private_set", cast(void**)& g_static_private_set},
159 { "g_static_private_free", cast(void**)& g_static_private_free},
160 { "g_thread_init", cast(void**)& g_thread_init},
161 { "g_thread_supported", cast(void**)& g_thread_supported},
162 { "g_thread_create", cast(void**)& g_thread_create},
163 { "g_thread_create_full", cast(void**)& g_thread_create_full},
164 { "g_thread_self", cast(void**)& g_thread_self},
165 { "g_thread_join", cast(void**)& g_thread_join},
166 { "g_thread_set_priority", cast(void**)& g_thread_set_priority},
167 { "g_thread_yield", cast(void**)& g_thread_yield},
168 { "g_thread_exit", cast(void**)& g_thread_exit},
169 { "g_thread_foreach", cast(void**)& g_thread_foreach},
170 { "g_static_mutex_init", cast(void**)& g_static_mutex_init},
171 { "g_static_mutex_lock", cast(void**)& g_static_mutex_lock},
172 { "g_static_mutex_trylock", cast(void**)& g_static_mutex_trylock},
173 { "g_static_mutex_unlock", cast(void**)& g_static_mutex_unlock},
174 { "g_static_mutex_get_mutex", cast(void**)& g_static_mutex_get_mutex},
175 { "g_static_mutex_free", cast(void**)& g_static_mutex_free},