Module: Gdk::Pango

Defined in:
ext/gtk2/rbgdkpango.c

Class Method Summary collapse

Class Method Details

.context(*args) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'ext/gtk2/rbgdkpango.c', line 15

static VALUE
gdkpango_s_context_get(int argc, VALUE *argv, VALUE self)
{
    VALUE screen, ret;
    rb_scan_args(argc, argv, "01", &screen);
    if (NIL_P(screen)){
        ret = GOBJ2RVAL(gdk_pango_context_get());
    } else {
#if GTK_CHECK_VERSION(2,2,0)
        ret = GOBJ2RVAL(gdk_pango_context_get_for_screen(GDK_SCREEN(RVAL2GOBJ(screen))));
#else
        rb_warn("Gdk::Pango.context_get: Not supported arguments in GTK+-2.0.x.");
        ret = GOBJ2RVAL(gdk_pango_context_get());
#endif
    }
    return ret;
}