Sha256: 2b69cd81d83746576df3a40123524715c8c00e99578d135858667711f68c97ee

Contents?: true

Size: 1.76 KB

Versions: 6

Compression:

Stored size: 1.76 KB

Contents

/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/************************************************

  rbgtkcolorselectiondialog.c -

  $Author: mutoh $
  $Date: 2003/01/19 14:28:24 $

  Copyright (C) 2002,2003 Masao Mutoh

  This file is devided from rbgtkcolorsel.c.
  rbgtkcolorsel.c:
  Copyright (C) 1998-2000 Yukihiro Matsumoto,
                          Daisuke Kanda,
                          Hiroshi Igarashi
************************************************/
#include "global.h"

#define _SELF(s) (GTK_COLOR_SELECTION_DIALOG(RVAL2GOBJ(s)))

static VALUE
cdialog_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE title;
    rb_scan_args(argc, argv, "01", &title);
    RBGTK_INITIALIZE(self, gtk_color_selection_dialog_new(NIL_P(title) ? NULL : RVAL2CSTR(title)));
    return Qnil;
}

static VALUE
cdialog_get_colorsel(VALUE self)
{
    return GOBJ2RVAL(_SELF(self)->colorsel);
}

static VALUE
cdialog_get_ok_button(VALUE self)
{
    return GOBJ2RVAL(_SELF(self)->ok_button);
}

static VALUE
cdialog_get_cancel_button(VALUE self)
{
    return GOBJ2RVAL(_SELF(self)->cancel_button);
}

static VALUE
cdialog_get_help_button(VALUE self)
{
    return GOBJ2RVAL(_SELF(self)->help_button);
}

void 
Init_gtk_color_selection_dialog()
{
    VALUE gColorSelDialog = G_DEF_CLASS(GTK_TYPE_COLOR_SELECTION_DIALOG, 
                                        "ColorSelectionDialog", mGtk);

    rb_define_method(gColorSelDialog, "initialize", cdialog_initialize, -1);
    rb_define_method(gColorSelDialog, "colorsel", cdialog_get_colorsel, 0);
    rb_define_method(gColorSelDialog, "ok_button", cdialog_get_ok_button, 0);
    rb_define_method(gColorSelDialog, "cancel_button", cdialog_get_cancel_button, 0);
    rb_define_method(gColorSelDialog, "help_button", cdialog_get_help_button, 0);
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gtk2-1.0.0-x86-mingw32 ext/gtk2/rbgtkcolorselectiondialog.c
gtk2-1.0.0 ext/gtk2/rbgtkcolorselectiondialog.c
gtk2-0.90.9 ext/gtk2/rbgtkcolorselectiondialog.c
gtk2-0.90.9-x86-mingw32 ext/gtk2/rbgtkcolorselectiondialog.c
gtk2-0.90.8-x86-mingw32 ext/gtk2/rbgtkcolorselectiondialog.c
gtk2-0.90.8 ext/gtk2/rbgtkcolorselectiondialog.c