From: Tilman Sauerbeck Date: Sat, 10 Jul 2004 14:07:49 +0000 (+0000) Subject: Macro updates. X-Git-Url: http://git.code-monkey.de/?p=ruby-evas.git;a=commitdiff_plain;h=0ab509cfd10cd260793e7bd6d00ace66b8085962 Macro updates. --- diff --git a/src/rb_evas.c b/src/rb_evas.c index b6d9887..0300f4d 100644 --- a/src/rb_evas.c +++ b/src/rb_evas.c @@ -1,5 +1,5 @@ /* - * $Id: rb_evas.c 29 2004-07-08 18:47:44Z tilman $ + * $Id: rb_evas.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -67,19 +67,12 @@ VALUE TO_EVAS (VALUE parent, Evas *e) static VALUE c_inspect (VALUE self) { - char buf[128]; - - GET_OBJ (self, Evas, e, "Evas"); - - snprintf (buf, sizeof (buf), "#", - (void *) self, *e); - - return rb_str_new2 (buf); + INSPECT (self, Evas); } static VALUE c_render (VALUE self) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); evas_render (*e); @@ -88,7 +81,7 @@ static VALUE c_render (VALUE self) static VALUE c_font_path_clear (VALUE self) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); evas_font_path_clear (*e); @@ -97,7 +90,7 @@ static VALUE c_font_path_clear (VALUE self) static VALUE c_font_path_append (VALUE self, VALUE path) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); Check_Type (path, T_STRING); @@ -108,7 +101,7 @@ static VALUE c_font_path_append (VALUE self, VALUE path) static VALUE c_font_path_prepend (VALUE self, VALUE path) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); Check_Type (path, T_STRING); @@ -122,7 +115,7 @@ static VALUE c_font_path_get (VALUE self) VALUE ary; const Evas_List *list, *l; - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); if (!(list = evas_font_path_list (*e))) return rb_ary_new (); @@ -137,14 +130,14 @@ static VALUE c_font_path_get (VALUE self) static VALUE c_font_cache_get (VALUE self) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); return INT2FIX (evas_font_cache_get (*e)); } static VALUE c_font_cache_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); Check_Type (val, T_FIXNUM); @@ -155,7 +148,7 @@ static VALUE c_font_cache_set (VALUE self, VALUE val) static VALUE c_font_cache_flush (VALUE self) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); evas_font_cache_flush (*e); @@ -164,14 +157,14 @@ static VALUE c_font_cache_flush (VALUE self) static VALUE c_image_cache_get (VALUE self) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); return INT2FIX (evas_image_cache_get (*e)); } static VALUE c_image_cache_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); Check_Type (val, T_FIXNUM); @@ -182,7 +175,7 @@ static VALUE c_image_cache_set (VALUE self, VALUE val) static VALUE c_image_cache_reload (VALUE self) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); evas_image_cache_reload (*e); @@ -191,7 +184,7 @@ static VALUE c_image_cache_reload (VALUE self) static VALUE c_image_cache_flush (VALUE self) { - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); evas_image_cache_flush (*e); @@ -203,7 +196,7 @@ static VALUE c_top_get (VALUE self) Evas_Object *o; void *obj; - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); if (!(o = evas_object_top_get (*e))) return Qnil; @@ -221,7 +214,7 @@ static VALUE c_bottom_get (VALUE self) Evas_Object *o; void *obj; - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); if (!(o = evas_object_bottom_get (*e))) return Qnil; @@ -239,7 +232,7 @@ static VALUE c_find_object (VALUE self, VALUE name) Evas_Object *o; void *obj; - GET_OBJ (self, Evas, e, "Evas"); + GET_OBJ (self, Evas, e); Check_Type (name, T_STRING); diff --git a/src/rb_evas_main.h b/src/rb_evas_main.h index 2180546..762c3a6 100644 --- a/src/rb_evas_main.h +++ b/src/rb_evas_main.h @@ -1,5 +1,5 @@ /* - * $Id: rb_evas_main.h 23 2004-06-26 22:55:31Z tilman $ + * $Id: rb_evas_main.h 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -21,13 +21,15 @@ #ifndef __RB_EVAS_MAIN_H #define __RB_EVAS_MAIN_H -#define GET_OBJ(obj, type, o, desc) \ +#define GET_OBJ(obj, type, o) \ type **(o) = NULL; \ \ Data_Get_Struct ((obj), type *, (o)); \ \ if (!*(o)) { \ - rb_raise (rb_eException, desc " destroyed already"); \ + rb_raise (rb_eException, \ + "%s destroyed already", \ + rb_obj_classname ((obj))); \ return Qnil; \ } @@ -39,6 +41,26 @@ return Qnil; \ } +#define CHECK_CLASS(val, klass) \ + if (!rb_obj_is_kind_of ((val), (klass))) { \ + rb_raise (rb_eTypeError, \ + "wrong argument type %s (expected %s)", \ + rb_obj_classname ((val)), \ + rb_obj_classname ((klass))); \ + return Qnil; \ + } + +#define INSPECT(obj, type) \ + char buf[128]; \ +\ + GET_OBJ (obj, type, o); \ +\ + snprintf (buf, sizeof (buf), \ + "#<%s:%p ptr=%p>", rb_obj_classname ((obj)), \ + (void *) obj, *o); \ +\ + return rb_str_new2 (buf); + VALUE mEvas; #endif diff --git a/src/rb_evas_object.c b/src/rb_evas_object.c index 79dc66f..abba083 100644 --- a/src/rb_evas_object.c +++ b/src/rb_evas_object.c @@ -1,5 +1,5 @@ /* - * $Id: rb_evas_object.c 29 2004-07-08 18:47:44Z tilman $ + * $Id: rb_evas_object.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -50,7 +50,7 @@ void c_evas_object_mark (Evas_Object **e) static VALUE c_init (VALUE self, VALUE parent) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_data_set (*e, RUBY_EVAS_OBJECT_KEY, (void *) self); @@ -61,19 +61,12 @@ static VALUE c_init (VALUE self, VALUE parent) static VALUE c_inspect (VALUE self) { - char buf[128]; - - GET_OBJ (self, Evas_Object, e, "EvasObject"); - - snprintf (buf, sizeof (buf), "#", - (void *) self, *e); - - return rb_str_new2 (buf); + INSPECT (self, Evas_Object); } static VALUE c_delete (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_del (*e); *e = NULL; @@ -83,7 +76,7 @@ static VALUE c_delete (VALUE self) static VALUE c_resize (VALUE self, VALUE w, VALUE h) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); Check_Type (w, T_FIXNUM); Check_Type (h, T_FIXNUM); @@ -96,7 +89,7 @@ static VALUE c_resize (VALUE self, VALUE w, VALUE h) static VALUE c_move (VALUE self, VALUE x, VALUE y) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); Check_Type (x, T_FIXNUM); Check_Type (y, T_FIXNUM); @@ -111,7 +104,7 @@ static VALUE c_geometry_get (VALUE self) { int x = 0, y = 0, w = 0, h = 0; - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_geometry_get (*e, (Evas_Coord *) &x, (Evas_Coord *) &y, (Evas_Coord *) & w, (Evas_Coord *) &h); @@ -122,7 +115,7 @@ static VALUE c_geometry_get (VALUE self) static VALUE c_show (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_show (*e); @@ -131,7 +124,7 @@ static VALUE c_show (VALUE self) static VALUE c_hide (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_hide (*e); @@ -140,14 +133,14 @@ static VALUE c_hide (VALUE self) static VALUE c_visible_get (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); return evas_object_visible_get (*e) ? Qtrue : Qfalse; } static VALUE c_evas_get (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); return rb_hash_aref (parents, INT2NUM ((long) (e))); } @@ -156,7 +149,7 @@ static VALUE c_name_get (VALUE self) { const char *name; - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); if (!(name = evas_object_name_get (*e))) return Qnil; @@ -166,7 +159,7 @@ static VALUE c_name_get (VALUE self) static VALUE c_name_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); Check_Type (val, T_STRING); @@ -177,14 +170,14 @@ static VALUE c_name_set (VALUE self, VALUE val) static VALUE c_layer_get (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); return INT2FIX (evas_object_layer_get (*e)); } static VALUE c_layer_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); Check_Type (val, T_FIXNUM); @@ -197,7 +190,7 @@ static VALUE c_get_color (VALUE self) { int r = 0, g = 0, b = 0, a = 0; - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_color_get (*e, &r, &g, &b, &a); @@ -208,7 +201,7 @@ static VALUE c_get_color (VALUE self) static VALUE c_set_color (VALUE self, VALUE r, VALUE g, VALUE b, VALUE a) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); Check_Type (r, T_FIXNUM); Check_Type (g, T_FIXNUM); @@ -223,14 +216,14 @@ static VALUE c_set_color (VALUE self, VALUE r, VALUE g, VALUE b, static VALUE c_pass_events_get (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); return evas_object_pass_events_get (*e) ? Qtrue : Qfalse; } static VALUE c_pass_events_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); CHECK_BOOL (val); @@ -241,7 +234,7 @@ static VALUE c_pass_events_set (VALUE self, VALUE val) static VALUE c_raise (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_raise (*e); @@ -250,7 +243,7 @@ static VALUE c_raise (VALUE self) static VALUE c_lower (VALUE self) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); evas_object_lower (*e); @@ -259,7 +252,7 @@ static VALUE c_lower (VALUE self) static VALUE c_stack_above (VALUE self, VALUE target) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); if (!rb_obj_is_kind_of (target, cEvasObject)) { rb_raise (rb_eTypeError, @@ -268,7 +261,7 @@ static VALUE c_stack_above (VALUE self, VALUE target) return Qnil; } - GET_OBJ (target, Evas_Object, target2, "EvasObject"); + GET_OBJ (target, Evas_Object, target2); evas_object_stack_above (*e, *target2); @@ -277,7 +270,7 @@ static VALUE c_stack_above (VALUE self, VALUE target) static VALUE c_stack_below (VALUE self, VALUE target) { - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); if (!rb_obj_is_kind_of (target, cEvasObject)) { rb_raise (rb_eTypeError, @@ -286,7 +279,7 @@ static VALUE c_stack_below (VALUE self, VALUE target) return Qnil; } - GET_OBJ (target, Evas_Object, target2, "EvasObject"); + GET_OBJ (target, Evas_Object, target2); evas_object_stack_below (*e, *target2); @@ -298,7 +291,7 @@ static VALUE c_above_get (VALUE self) Evas_Object *o; void *obj; - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); if (!(evas_object_above_get (*e))) return Qnil; @@ -316,7 +309,7 @@ static VALUE c_below_get (VALUE self) Evas_Object *o; void *obj; - GET_OBJ (self, Evas_Object, e, "EvasObject"); + GET_OBJ (self, Evas_Object, e); if (!(evas_object_below_get (*e))) return Qnil; diff --git a/src/rb_gradient.c b/src/rb_gradient.c index 4c745e3..bd3fd6c 100644 --- a/src/rb_gradient.c +++ b/src/rb_gradient.c @@ -1,5 +1,5 @@ /* - * $Id: rb_gradient.c 23 2004-06-26 22:55:31Z tilman $ + * $Id: rb_gradient.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -31,14 +31,8 @@ static VALUE c_new (VALUE klass, VALUE evas) VALUE self, argv[1]; Evas_Object **rect; - if (!rb_obj_is_kind_of (evas, cEvas)) { - rb_raise (rb_eTypeError, - "wrong argument type %s (expected Evas)", - rb_obj_classname (evas)); - return Qnil; - } - - GET_OBJ (evas, Evas, e, "Evas"); + CHECK_CLASS (evas, cEvas); + GET_OBJ (evas, Evas, e); self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark, c_evas_object_free, rect); @@ -53,7 +47,7 @@ static VALUE c_new (VALUE klass, VALUE evas) static VALUE c_color_add (VALUE self, VALUE r, VALUE g, VALUE b, VALUE a, VALUE distance) { - GET_OBJ (self, Evas_Object, e, "Gradient"); + GET_OBJ (self, Evas_Object, e); Check_Type (r, T_FIXNUM); Check_Type (g, T_FIXNUM); @@ -70,7 +64,7 @@ static VALUE c_color_add (VALUE self, VALUE r, VALUE g, VALUE b, static VALUE c_colors_clear (VALUE self) { - GET_OBJ (self, Evas_Object, e, "Gradient"); + GET_OBJ (self, Evas_Object, e); evas_object_gradient_colors_clear (*e); @@ -79,14 +73,14 @@ static VALUE c_colors_clear (VALUE self) static VALUE c_angle_get (VALUE self) { - GET_OBJ (self, Evas_Object, e, "Gradient"); + GET_OBJ (self, Evas_Object, e); return INT2FIX (evas_object_gradient_angle_get (*e)); } static VALUE c_angle_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas_Object, e, "Gradient"); + GET_OBJ (self, Evas_Object, e); Check_Type (val, T_FIXNUM); diff --git a/src/rb_image.c b/src/rb_image.c index 1f894dc..e88eddc 100644 --- a/src/rb_image.c +++ b/src/rb_image.c @@ -1,5 +1,5 @@ /* - * $Id: rb_image.c 23 2004-06-26 22:55:31Z tilman $ + * $Id: rb_image.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -31,14 +31,8 @@ static VALUE c_new (VALUE klass, VALUE evas) VALUE self, argv[1]; Evas_Object **rect; - if (!rb_obj_is_kind_of (evas, cEvas)) { - rb_raise (rb_eTypeError, - "wrong argument type %s (expected Evas)", - rb_obj_classname (evas)); - return Qnil; - } - - GET_OBJ (evas, Evas, e, "Evas"); + CHECK_CLASS (evas, cEvas); + GET_OBJ (evas, Evas, e); self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark, c_evas_object_free, rect); diff --git a/src/rb_line.c b/src/rb_line.c index e75f2bc..0710836 100644 --- a/src/rb_line.c +++ b/src/rb_line.c @@ -1,5 +1,5 @@ /* - * $Id: rb_line.c 23 2004-06-26 22:55:31Z tilman $ + * $Id: rb_line.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -31,14 +31,8 @@ static VALUE c_new (VALUE klass, VALUE evas) VALUE self, argv[1]; Evas_Object **rect; - if (!rb_obj_is_kind_of (evas, cEvas)) { - rb_raise (rb_eTypeError, - "wrong argument type %s (expected Evas)", - rb_obj_classname (evas)); - return Qnil; - } - - GET_OBJ (evas, Evas, e, "Evas"); + CHECK_CLASS (evas, cEvas); + GET_OBJ (evas, Evas, e); self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark, c_evas_object_free, rect); @@ -54,7 +48,7 @@ static VALUE c_get_xy (VALUE self) { int coord[4] = {0, 0, 0, 0}; - GET_OBJ (self, Evas_Object, e, "Line"); + GET_OBJ (self, Evas_Object, e); evas_object_line_xy_get (*e, &coord[0], &coord[1], &coord[2], &coord[3]); @@ -66,7 +60,7 @@ static VALUE c_get_xy (VALUE self) static VALUE c_set_xy (VALUE self, VALUE x1, VALUE y1, VALUE x2, VALUE y2) { - GET_OBJ (self, Evas_Object, e, "Line"); + GET_OBJ (self, Evas_Object, e); Check_Type (x1, T_FIXNUM); Check_Type (y1, T_FIXNUM); diff --git a/src/rb_polygon.c b/src/rb_polygon.c index d0b918a..438fd3a 100644 --- a/src/rb_polygon.c +++ b/src/rb_polygon.c @@ -1,5 +1,5 @@ /* - * $Id: rb_polygon.c 23 2004-06-26 22:55:31Z tilman $ + * $Id: rb_polygon.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -31,14 +31,8 @@ static VALUE c_new (VALUE klass, VALUE evas) VALUE self, argv[1]; Evas_Object **rect; - if (!rb_obj_is_kind_of (evas, cEvas)) { - rb_raise (rb_eTypeError, - "wrong argument type %s (expected Evas)", - rb_obj_classname (evas)); - return Qnil; - } - - GET_OBJ (evas, Evas, e, "Evas"); + CHECK_CLASS (evas, cEvas); + GET_OBJ (evas, Evas, e); self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark, c_evas_object_free, rect); @@ -52,7 +46,7 @@ static VALUE c_new (VALUE klass, VALUE evas) static VALUE c_point_add (VALUE self, VALUE x, VALUE y) { - GET_OBJ (self, Evas_Object, e, "Polygon"); + GET_OBJ (self, Evas_Object, e); Check_Type (x, T_FIXNUM); Check_Type (y, T_FIXNUM); @@ -64,7 +58,7 @@ static VALUE c_point_add (VALUE self, VALUE x, VALUE y) static VALUE c_points_clear (VALUE self) { - GET_OBJ (self, Evas_Object, e, "Polygon"); + GET_OBJ (self, Evas_Object, e); evas_object_polygon_points_clear (*e); diff --git a/src/rb_rectangle.c b/src/rb_rectangle.c index e2e307b..2c4901e 100644 --- a/src/rb_rectangle.c +++ b/src/rb_rectangle.c @@ -1,5 +1,5 @@ /* - * $Id: rb_rectangle.c 23 2004-06-26 22:55:31Z tilman $ + * $Id: rb_rectangle.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -31,14 +31,8 @@ static VALUE c_new (VALUE klass, VALUE evas) VALUE self, argv[1]; Evas_Object **rect; - if (!rb_obj_is_kind_of (evas, cEvas)) { - rb_raise (rb_eTypeError, - "wrong argument type %s (expected Evas)", - rb_obj_classname (evas)); - return Qnil; - } - - GET_OBJ (evas, Evas, e, "Evas"); + CHECK_CLASS(evas, cEvas); + GET_OBJ (evas, Evas, e); self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark, c_evas_object_free, rect); diff --git a/src/rb_text.c b/src/rb_text.c index c6ffa42..dfb5cc7 100644 --- a/src/rb_text.c +++ b/src/rb_text.c @@ -1,5 +1,5 @@ /* - * $Id: rb_text.c 23 2004-06-26 22:55:31Z tilman $ + * $Id: rb_text.c 32 2004-07-10 14:07:49Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -31,14 +31,8 @@ static VALUE c_new (VALUE klass, VALUE evas) VALUE self, argv[1]; Evas_Object **rect; - if (!rb_obj_is_kind_of (evas, cEvas)) { - rb_raise (rb_eTypeError, - "wrong argument type %s (expected Evas)", - rb_obj_classname (evas)); - return Qnil; - } - - GET_OBJ (evas, Evas, e, "Evas"); + CHECK_CLASS(evas, cEvas); + GET_OBJ (evas, Evas, e); self = Data_Make_Struct (klass, Evas_Object *, c_evas_object_mark, c_evas_object_free, rect); @@ -54,7 +48,7 @@ static VALUE c_font_source_get (VALUE self) { const char *tmp; - GET_OBJ (self, Evas_Object, e, "Text"); + GET_OBJ (self, Evas_Object, e); if (!(tmp = evas_object_text_font_source_get (*e))) return Qnil; @@ -64,7 +58,7 @@ static VALUE c_font_source_get (VALUE self) static VALUE c_font_source_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas_Object, e, "Text"); + GET_OBJ (self, Evas_Object, e); Check_Type (val, T_STRING); @@ -78,7 +72,7 @@ static VALUE c_get_font (VALUE self) char *font = NULL; Evas_Font_Size size = 0; - GET_OBJ (self, Evas_Object, e, "Text"); + GET_OBJ (self, Evas_Object, e); evas_object_text_font_get (*e, &font, &size); @@ -88,7 +82,7 @@ static VALUE c_get_font (VALUE self) static VALUE c_set_font (VALUE self, VALUE font, VALUE size) { - GET_OBJ (self, Evas_Object, e, "Text"); + GET_OBJ (self, Evas_Object, e); Check_Type (font, T_STRING); Check_Type (font, T_FIXNUM); @@ -103,7 +97,7 @@ static VALUE c_text_get (VALUE self) { const char *tmp; - GET_OBJ (self, Evas_Object, e, "Text"); + GET_OBJ (self, Evas_Object, e); if (!(tmp = evas_object_text_text_get (*e))) return Qnil; @@ -113,7 +107,7 @@ static VALUE c_text_get (VALUE self) static VALUE c_text_set (VALUE self, VALUE val) { - GET_OBJ (self, Evas_Object, e, "Text"); + GET_OBJ (self, Evas_Object, e); Check_Type (val, T_STRING);