Sha256: 55310673da13fca2d54f59b4f63da262b2f5d968e05529f6f44c921e5c443525

Contents?: true

Size: 1.16 KB

Versions: 15

Compression:

Stored size: 1.16 KB

Contents

/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/************************************************
 
  rbgtkfilechooserwidget.c -
 
  $Author: mutoh $
  $Date: 2004/05/30 16:41:13 $
 
  Copyright (C) 2004 Seiya Nishizawa, Masao Mutoh
************************************************/
 
#include "global.h"

#if GTK_CHECK_VERSION(2,4,0)

static VALUE
fchowidget_initialize(argc, argv, self)
    int argc;
    VALUE* argv;
    VALUE self;
{
    VALUE action, back;
    GtkWidget* widget;

    rb_scan_args(argc, argv, "11", &action, &back);

    if (NIL_P(back)){
        widget = gtk_file_chooser_widget_new(RVAL2GENUM(action, GTK_TYPE_FILE_CHOOSER_ACTION));
    } else {
        widget = gtk_file_chooser_widget_new_with_backend(RVAL2GENUM(action, GTK_TYPE_FILE_CHOOSER_ACTION),
                                                          RVAL2CSTR(back));
    }

    RBGTK_INITIALIZE(self, widget);
    return Qnil;
}
#endif

void 
Init_gtk_file_chooser_widget()
{
#if GTK_CHECK_VERSION(2,4,0)

    VALUE gFileChoWidget = G_DEF_CLASS(GTK_TYPE_FILE_CHOOSER_WIDGET, "FileChooserWidget", mGtk);

    rb_define_method(gFileChoWidget, "initialize", fchowidget_initialize, -1);

#endif
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gtk2-0.90.7-x86-mingw32 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.7 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.6 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.6-x86-mingw32 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.5 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.5-x86-mingw32 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.4 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.4-x86-mingw32 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.3 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.3-x86-mingw32 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.2 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.90.2-x86-mingw32 ext/gtk2/rbgtkfilechooserwidget.c
gtk2-0.20.1 src/rbgtkfilechooserwidget.c
gtk2-0.20.0.1 src/rbgtkfilechooserwidget.c
gtk2-0.20.0 src/rbgtkfilechooserwidget.c