Sha256: da9910f826fca3c9bc92d6907412db6845be7e52cf8ece83a68761fe84fff283

Contents?: true

Size: 1.09 KB

Versions: 12

Compression:

Stored size: 1.09 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(VALUE self)
{
    return GOBJ2RVAL(gtk_scale_get_layout(_SELF(self)));
}

static VALUE
rbscale_get_layout_offsets(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

12 entries across 12 versions & 1 rubygems

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