예제 #1
0
static VALUE
targets_include_uri(VALUE self, VALUE rbtargets)
{
    long n;
    GdkAtom *targets = RVAL2GDKATOMS(rbtargets, &n);
    gboolean result;

    result = gtk_targets_include_uri(targets, n);

    g_free(targets);

    return result;
}
예제 #2
0
static VALUE
targets_include_image(VALUE self, VALUE rbtargets, VALUE rbwritable)
{
    gboolean writable = RVAL2CBOOL(rbwritable);
    long n;
    GdkAtom *targets = RVAL2GDKATOMS(rbtargets, &n);
    gboolean result;

    result = gtk_targets_include_image(targets, n, writable);

    g_free(targets);

    return result;
}
예제 #3
0
static VALUE
targets_include_rich_text(VALUE self, VALUE rbtargets, VALUE rbbuffer)
{
    GtkTextBuffer *buffer = GTK_TEXT_BUFFER(RVAL2GOBJ(rbbuffer));
    long n;
    GdkAtom *targets = RVAL2GDKATOMS(rbtargets, &n);
    gboolean result;

    result = gtk_targets_include_rich_text(targets, n, buffer);

    g_free(targets);

    return result;
}
예제 #4
0
static VALUE
rg_store_clipboard(VALUE self, VALUE rbclipboard_window, VALUE rbtime_, VALUE rbtargets)
{
    GdkDisplay *display = _SELF(self);
    GdkWindow *clipboard_window = RVAL2GDKWINDOW(rbclipboard_window);
    guint32 time_ = NUM2UINT(rbtime_);
    long n;
    GdkAtom *targets = RVAL2GDKATOMS(rbtargets, &n);

    gdk_display_store_clipboard(display, clipboard_window, time_, targets, n);

    g_free(targets);

    return self;
}