Module: Gdk::Threads
- Defined in:
- ext/gtk2/rbgdkthreads.c
Class Method Summary collapse
Class Method Details
.enter ⇒ Object
27 28 29 30 31 32 |
# File 'ext/gtk2/rbgdkthreads.c', line 27
static VALUE
rbgdk_threads_enter(VALUE self)
{
gdk_threads_enter();
return self;
}
|
.init ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'ext/gtk2/rbgdkthreads.c', line 15
static VALUE
rbgdk_threads_init(VALUE self)
{
#ifndef GDK_WINDOWING_WIN32
if (!g_thread_supported()){
g_thread_init(NULL);
}
gdk_threads_init();
#endif
return self;
}
|
.leave ⇒ Object
34 35 36 37 38 39 |
# File 'ext/gtk2/rbgdkthreads.c', line 34
static VALUE
rbgdk_threads_leave(VALUE self)
{
gdk_threads_leave();
return self;
}
|
.synchronize ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'ext/gtk2/rbgdkthreads.c', line 41
static VALUE
rbgdk_threads_synchronize(VALUE self)
{
VALUE func = rb_block_proc();
gdk_threads_enter();
func = rb_block_proc();
rb_funcall(func, id_call, 0);
gdk_threads_leave();
return Qnil;
}
|