Sha256: 279c83f24b570d7a3922460330584d250a309c6648716ef84475ac877f38419c
Contents?: true
Size: 1.25 KB
Versions: 15
Compression:
Stored size: 1.25 KB
Contents
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */ /************************************************ rbgtkimcontextsimple.c - $Author: mutoh $ $Date: 2003/05/05 16:58:55 $ Copyright (C) 2003 Masao Mutoh ************************************************/ #include "global.h" #define _SELF(self) (GTK_IM_CONTEXT_SIMPLE(RVAL2GOBJ(self))) static VALUE imcsimple_initialize(self) VALUE self; { G_INITIALIZE(self, gtk_im_context_simple_new()); return Qnil; } static VALUE imcsimple_add_table(self, data, max_seq_len, n_seqs) VALUE self, data, max_seq_len, n_seqs; { int i; guint16* gdata = ALLOCA_N(guint16, RARRAY_LEN(data)); for (i = 0; i < RARRAY_LEN(data); i++) { gdata[i] = NUM2INT(RARRAY_PTR(data)[i]); } gtk_im_context_simple_add_table(_SELF(self), gdata, NUM2INT(max_seq_len), NUM2INT(n_seqs)); return self; } void Init_gtk_imcontext_simple() { VALUE gIMContextS = G_DEF_CLASS(GTK_TYPE_IM_CONTEXT_SIMPLE, "IMContextSimple", mGtk); rb_define_method(gIMContextS, "initialize", imcsimple_initialize, 0); rb_define_method(gIMContextS, "add_table", imcsimple_add_table, 3); rb_define_const(gIMContextS, "MAX_COMPOSE_LEN", GTK_MAX_COMPOSE_LEN); }
Version data entries
15 entries across 15 versions & 1 rubygems