Sha256: 39ecea1b85b1f858b6eaffc411810be3729f342a726811645a8afb8ac600c7fc

Contents?: true

Size: 1.27 KB

Versions: 12

Compression:

Stored size: 1.27 KB

Contents

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

  rbgtkarrow.c -

  $Author: mutoh $
  $Date: 2003/08/31 15:29:44 $

  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
  Copyright (C) 1998-2000 Yukihiro Matsumoto,
                          Daisuke Kanda,
                          Hiroshi Igarashi
************************************************/

#include "global.h"

static VALUE
arrow_initialize(VALUE self, VALUE arrow_t, VALUE shadow_t)
{
    RBGTK_INITIALIZE(self, gtk_arrow_new(RVAL2GENUM(arrow_t, GTK_TYPE_ARROW_TYPE),
                                         RVAL2GENUM(shadow_t, GTK_TYPE_SHADOW_TYPE)));
    return Qnil;
}

static VALUE
arrow_set(VALUE self, VALUE arrow_t, VALUE shadow_t)
{
    gtk_arrow_set(GTK_ARROW(RVAL2GOBJ(self)),
		  RVAL2GENUM(arrow_t, GTK_TYPE_ARROW_TYPE),
		  RVAL2GENUM(shadow_t, GTK_TYPE_SHADOW_TYPE));
    return self;
}

void 
Init_gtk_arrow()
{
    VALUE gArrow = G_DEF_CLASS(GTK_TYPE_ARROW, "Arrow", mGtk);

    rb_define_method(gArrow, "initialize", arrow_initialize, 2);
    rb_define_method(gArrow, "set", arrow_set, 2);

    /* GtkArrowType (from General constants) */
    G_DEF_CLASS(GTK_TYPE_ARROW_TYPE, "Type", gArrow);
    G_DEF_CONSTANTS(gArrow, GTK_TYPE_ARROW_TYPE, "GTK_ARROW_");
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gtk2-1.0.3-x86-mingw32 ext/gtk2/rbgtkarrow.c
gtk2-1.0.3 ext/gtk2/rbgtkarrow.c
gtk2-1.0.2-x86-mingw32 ext/gtk2/rbgtkarrow.c
gtk2-1.0.2 ext/gtk2/rbgtkarrow.c
gtk2-1.0.1 ext/gtk2/rbgtkarrow.c
gtk2-1.0.1-x86-mingw32 ext/gtk2/rbgtkarrow.c
gtk2-1.0.0-x86-mingw32 ext/gtk2/rbgtkarrow.c
gtk2-1.0.0 ext/gtk2/rbgtkarrow.c
gtk2-0.90.9 ext/gtk2/rbgtkarrow.c
gtk2-0.90.9-x86-mingw32 ext/gtk2/rbgtkarrow.c
gtk2-0.90.8-x86-mingw32 ext/gtk2/rbgtkarrow.c
gtk2-0.90.8 ext/gtk2/rbgtkarrow.c