1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gtkc.gthread; 26 27 private import std.stdio; 28 private import gtkc.gthreadtypes; 29 private import gtkc.Loader; 30 private import gtkc.paths; 31 32 shared static this() 33 { 34 // gthread.Thread 35 36 Linker.link(g_thread_new, "g_thread_new", LIBRARY.GTHREAD); 37 Linker.link(g_thread_try_new, "g_thread_try_new", LIBRARY.GTHREAD); 38 Linker.link(g_thread_ref, "g_thread_ref", LIBRARY.GTHREAD); 39 Linker.link(g_thread_unref, "g_thread_unref", LIBRARY.GTHREAD); 40 Linker.link(g_thread_join, "g_thread_join", LIBRARY.GTHREAD); 41 Linker.link(g_thread_yield, "g_thread_yield", LIBRARY.GTHREAD); 42 Linker.link(g_thread_exit, "g_thread_exit", LIBRARY.GTHREAD); 43 Linker.link(g_thread_self, "g_thread_self", LIBRARY.GTHREAD); 44 Linker.link(g_bit_lock, "g_bit_lock", LIBRARY.GTHREAD); 45 Linker.link(g_bit_trylock, "g_bit_trylock", LIBRARY.GTHREAD); 46 Linker.link(g_bit_unlock, "g_bit_unlock", LIBRARY.GTHREAD); 47 Linker.link(g_pointer_bit_lock, "g_pointer_bit_lock", LIBRARY.GTHREAD); 48 Linker.link(g_pointer_bit_trylock, "g_pointer_bit_trylock", LIBRARY.GTHREAD); 49 Linker.link(g_pointer_bit_unlock, "g_pointer_bit_unlock", LIBRARY.GTHREAD); 50 Linker.link(g_get_num_processors, "g_get_num_processors", LIBRARY.GTHREAD); 51 52 // gthread.Mutex 53 54 Linker.link(g_mutex_init, "g_mutex_init", LIBRARY.GTHREAD); 55 Linker.link(g_mutex_clear, "g_mutex_clear", LIBRARY.GTHREAD); 56 Linker.link(g_mutex_lock, "g_mutex_lock", LIBRARY.GTHREAD); 57 Linker.link(g_mutex_trylock, "g_mutex_trylock", LIBRARY.GTHREAD); 58 Linker.link(g_mutex_unlock, "g_mutex_unlock", LIBRARY.GTHREAD); 59 60 // gthread.RecMutex 61 62 Linker.link(g_rec_mutex_init, "g_rec_mutex_init", LIBRARY.GTHREAD); 63 Linker.link(g_rec_mutex_clear, "g_rec_mutex_clear", LIBRARY.GTHREAD); 64 Linker.link(g_rec_mutex_lock, "g_rec_mutex_lock", LIBRARY.GTHREAD); 65 Linker.link(g_rec_mutex_trylock, "g_rec_mutex_trylock", LIBRARY.GTHREAD); 66 Linker.link(g_rec_mutex_unlock, "g_rec_mutex_unlock", LIBRARY.GTHREAD); 67 68 // gthread.RWLock 69 70 Linker.link(g_rw_lock_init, "g_rw_lock_init", LIBRARY.GTHREAD); 71 Linker.link(g_rw_lock_clear, "g_rw_lock_clear", LIBRARY.GTHREAD); 72 Linker.link(g_rw_lock_writer_lock, "g_rw_lock_writer_lock", LIBRARY.GTHREAD); 73 Linker.link(g_rw_lock_writer_trylock, "g_rw_lock_writer_trylock", LIBRARY.GTHREAD); 74 Linker.link(g_rw_lock_writer_unlock, "g_rw_lock_writer_unlock", LIBRARY.GTHREAD); 75 Linker.link(g_rw_lock_reader_lock, "g_rw_lock_reader_lock", LIBRARY.GTHREAD); 76 Linker.link(g_rw_lock_reader_trylock, "g_rw_lock_reader_trylock", LIBRARY.GTHREAD); 77 Linker.link(g_rw_lock_reader_unlock, "g_rw_lock_reader_unlock", LIBRARY.GTHREAD); 78 79 // gthread.Cond 80 81 Linker.link(g_cond_init, "g_cond_init", LIBRARY.GTHREAD); 82 Linker.link(g_cond_clear, "g_cond_clear", LIBRARY.GTHREAD); 83 Linker.link(g_cond_wait, "g_cond_wait", LIBRARY.GTHREAD); 84 Linker.link(g_cond_timed_wait, "g_cond_timed_wait", LIBRARY.GTHREAD); 85 Linker.link(g_cond_wait_until, "g_cond_wait_until", LIBRARY.GTHREAD); 86 Linker.link(g_cond_signal, "g_cond_signal", LIBRARY.GTHREAD); 87 Linker.link(g_cond_broadcast, "g_cond_broadcast", LIBRARY.GTHREAD); 88 89 // gthread.Private 90 91 Linker.link(g_private_get, "g_private_get", LIBRARY.GTHREAD); 92 Linker.link(g_private_set, "g_private_set", LIBRARY.GTHREAD); 93 Linker.link(g_private_replace, "g_private_replace", LIBRARY.GTHREAD); 94 95 // gthread.Once 96 97 Linker.link(g_once_init_enter, "g_once_init_enter", LIBRARY.GTHREAD); 98 Linker.link(g_once_init_leave, "g_once_init_leave", LIBRARY.GTHREAD); 99 } 100 101 __gshared extern(C) 102 { 103 // gthread.Thread 104 105 GThread* function(gchar* name, GThreadFunc func, void* data) c_g_thread_new; 106 GThread* function(gchar* name, GThreadFunc func, void* data, GError** error) c_g_thread_try_new; 107 GThread* function(GThread* thread) c_g_thread_ref; 108 void function(GThread* thread) c_g_thread_unref; 109 gpointer function(GThread* thread) c_g_thread_join; 110 void function() c_g_thread_yield; 111 void function(void* retval) c_g_thread_exit; 112 GThread* function() c_g_thread_self; 113 void function(gint* address, gint lockBit) c_g_bit_lock; 114 gboolean function(gint* address, gint lockBit) c_g_bit_trylock; 115 void function(gint* address, gint lockBit) c_g_bit_unlock; 116 void function(void* address, gint lockBit) c_g_pointer_bit_lock; 117 gboolean function(void* address, gint lockBit) c_g_pointer_bit_trylock; 118 void function(void* address, gint lockBit) c_g_pointer_bit_unlock; 119 guint function() c_g_get_num_processors; 120 121 // gthread.Mutex 122 123 void function(GMutex* mutex) c_g_mutex_init; 124 void function(GMutex* mutex) c_g_mutex_clear; 125 void function(GMutex* mutex) c_g_mutex_lock; 126 gboolean function(GMutex* mutex) c_g_mutex_trylock; 127 void function(GMutex* mutex) c_g_mutex_unlock; 128 129 // gthread.RecMutex 130 131 void function(GRecMutex* recMutex) c_g_rec_mutex_init; 132 void function(GRecMutex* recMutex) c_g_rec_mutex_clear; 133 void function(GRecMutex* recMutex) c_g_rec_mutex_lock; 134 gboolean function(GRecMutex* recMutex) c_g_rec_mutex_trylock; 135 void function(GRecMutex* recMutex) c_g_rec_mutex_unlock; 136 137 // gthread.RWLock 138 139 void function(GRWLock* rwLock) c_g_rw_lock_init; 140 void function(GRWLock* rwLock) c_g_rw_lock_clear; 141 void function(GRWLock* rwLock) c_g_rw_lock_writer_lock; 142 gboolean function(GRWLock* rwLock) c_g_rw_lock_writer_trylock; 143 void function(GRWLock* rwLock) c_g_rw_lock_writer_unlock; 144 void function(GRWLock* rwLock) c_g_rw_lock_reader_lock; 145 gboolean function(GRWLock* rwLock) c_g_rw_lock_reader_trylock; 146 void function(GRWLock* rwLock) c_g_rw_lock_reader_unlock; 147 148 // gthread.Cond 149 150 void function(GCond* cond) c_g_cond_init; 151 void function(GCond* cond) c_g_cond_clear; 152 void function(GCond* cond, GMutex* mutex) c_g_cond_wait; 153 gboolean function(GCond* cond, GMutex* mutex, GTimeVal* absTime) c_g_cond_timed_wait; 154 gboolean function(GCond* cond, GMutex* mutex, gint64 endTime) c_g_cond_wait_until; 155 void function(GCond* cond) c_g_cond_signal; 156 void function(GCond* cond) c_g_cond_broadcast; 157 158 // gthread.Private 159 160 gpointer function(GPrivate* key) c_g_private_get; 161 void function(GPrivate* key, void* value) c_g_private_set; 162 void function(GPrivate* key, void* value) c_g_private_replace; 163 164 // gthread.Once 165 166 gboolean function(void* location) c_g_once_init_enter; 167 void function(void* location, gsize result) c_g_once_init_leave; 168 } 169 170 // gthread.Thread 171 172 alias c_g_thread_new g_thread_new; 173 alias c_g_thread_try_new g_thread_try_new; 174 alias c_g_thread_ref g_thread_ref; 175 alias c_g_thread_unref g_thread_unref; 176 alias c_g_thread_join g_thread_join; 177 alias c_g_thread_yield g_thread_yield; 178 alias c_g_thread_exit g_thread_exit; 179 alias c_g_thread_self g_thread_self; 180 alias c_g_bit_lock g_bit_lock; 181 alias c_g_bit_trylock g_bit_trylock; 182 alias c_g_bit_unlock g_bit_unlock; 183 alias c_g_pointer_bit_lock g_pointer_bit_lock; 184 alias c_g_pointer_bit_trylock g_pointer_bit_trylock; 185 alias c_g_pointer_bit_unlock g_pointer_bit_unlock; 186 alias c_g_get_num_processors g_get_num_processors; 187 188 // gthread.Mutex 189 190 alias c_g_mutex_init g_mutex_init; 191 alias c_g_mutex_clear g_mutex_clear; 192 alias c_g_mutex_lock g_mutex_lock; 193 alias c_g_mutex_trylock g_mutex_trylock; 194 alias c_g_mutex_unlock g_mutex_unlock; 195 196 // gthread.RecMutex 197 198 alias c_g_rec_mutex_init g_rec_mutex_init; 199 alias c_g_rec_mutex_clear g_rec_mutex_clear; 200 alias c_g_rec_mutex_lock g_rec_mutex_lock; 201 alias c_g_rec_mutex_trylock g_rec_mutex_trylock; 202 alias c_g_rec_mutex_unlock g_rec_mutex_unlock; 203 204 // gthread.RWLock 205 206 alias c_g_rw_lock_init g_rw_lock_init; 207 alias c_g_rw_lock_clear g_rw_lock_clear; 208 alias c_g_rw_lock_writer_lock g_rw_lock_writer_lock; 209 alias c_g_rw_lock_writer_trylock g_rw_lock_writer_trylock; 210 alias c_g_rw_lock_writer_unlock g_rw_lock_writer_unlock; 211 alias c_g_rw_lock_reader_lock g_rw_lock_reader_lock; 212 alias c_g_rw_lock_reader_trylock g_rw_lock_reader_trylock; 213 alias c_g_rw_lock_reader_unlock g_rw_lock_reader_unlock; 214 215 // gthread.Cond 216 217 alias c_g_cond_init g_cond_init; 218 alias c_g_cond_clear g_cond_clear; 219 alias c_g_cond_wait g_cond_wait; 220 alias c_g_cond_timed_wait g_cond_timed_wait; 221 alias c_g_cond_wait_until g_cond_wait_until; 222 alias c_g_cond_signal g_cond_signal; 223 alias c_g_cond_broadcast g_cond_broadcast; 224 225 // gthread.Private 226 227 alias c_g_private_get g_private_get; 228 alias c_g_private_set g_private_set; 229 alias c_g_private_replace g_private_replace; 230 231 // gthread.Once 232 233 alias c_g_once_init_enter g_once_init_enter; 234 alias c_g_once_init_leave g_once_init_leave;