Sha256: e0daaff33f73c4c9380cfbdcc9c2164666ea3f93d5af5a096771275a445041b8

Contents?: true

Size: 1.07 KB

Versions: 12

Compression:

Stored size: 1.07 KB

Contents

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

  rbgtkaccellabel.c -

  $Author: mutoh $
  $Date: 2003/02/01 16:46:23 $

  Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
  Copyright (C) 2001 Neil Conway
************************************************/

#include "global.h"

static VALUE
alabel_initialize(VALUE self, VALUE string)
{
    RBGTK_INITIALIZE(self, gtk_accel_label_new(RVAL2CSTR(string)));
    return Qnil;
}

static VALUE
alabel_get_accel_width(VALUE self)
{
    return INT2NUM(gtk_accel_label_get_accel_width(GTK_ACCEL_LABEL(RVAL2GOBJ(self))));
}

static VALUE
alabel_refetch(VALUE self)
{
    gtk_accel_label_refetch(GTK_ACCEL_LABEL(RVAL2GOBJ(self)));
    return Qfalse; // always returns false
}

void
Init_gtk_accel_label()
{
  VALUE gAccelLabel = G_DEF_CLASS(GTK_TYPE_ACCEL_LABEL, "AccelLabel", mGtk);

  rb_define_method(gAccelLabel, "initialize", alabel_initialize, 1);
  rb_define_method(gAccelLabel, "accel_width", alabel_get_accel_width, 0);
  rb_define_method(gAccelLabel, "refetch", alabel_refetch, 0);
}

Version data entries

12 entries across 12 versions & 1 rubygems

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