Sha256: ff186804d57151767ff101c292004a0310b3a4e328d6786a85165ca76a3a2010

Contents?: true

Size: 1.11 KB

Versions: 15

Compression:

Stored size: 1.11 KB

Contents

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

  rbgtkscale.c -

  $Author: mutoh $
  $Date: 2004/11/14 11:01:43 $

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

#include "global.h"

#define _SELF(self) (GTK_SCALE(RVAL2GOBJ(self)))

#if GTK_CHECK_VERSION(2,4,0)
static VALUE
rbscale_get_layout(self)
    VALUE self;
{
    return GOBJ2RVAL(gtk_scale_get_layout(_SELF(self)));
}

static VALUE
rbscale_get_layout_offsets(self)
    VALUE self;
{
    gint x, y;
    gtk_scale_get_layout_offsets(_SELF(self), &x, &y);
    return rb_assoc_new(INT2NUM(x), INT2NUM(y));
}
#endif

void 
Init_gtk_scale()
{
#if GTK_CHECK_VERSION(2,4,0)
    VALUE gScale = G_DEF_CLASS(GTK_TYPE_SCALE, "Scale", mGtk);
    rb_define_method(gScale, "layout", rbscale_get_layout, 0);
    rb_define_method(gScale, "layout_offsets", rbscale_get_layout_offsets, 0);
#else
    G_DEF_CLASS(GTK_TYPE_SCALE, "Scale", mGtk);
#endif
}

Version data entries

15 entries across 15 versions & 1 rubygems

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