diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efl/evas.rb | 63 | ||||
-rw-r--r-- | lib/efl/native/evas.rb | 4 |
2 files changed, 64 insertions, 3 deletions
diff --git a/lib/efl/evas.rb b/lib/efl/evas.rb index bc4b0e4..a0067e7 100644 --- a/lib/efl/evas.rb +++ b/lib/efl/evas.rb @@ -137,9 +137,12 @@ module Efl REvasObject.release @ptr @ptr=nil end - def name + def evas_name Native.evas_object_name_get @ptr end + def evas_type + Native.evas_object_type_get @ptr + end def geometry_get x = FFI::MemoryPointer.new :int y = FFI::MemoryPointer.new :int @@ -176,6 +179,64 @@ module Efl REvasObject.new Native.evas_object_below_get @ptr end alias :below :below_get + def size_hint_min_get + w = FFI::MemoryPointer.new :int + h = FFI::MemoryPointer.new :int + Native.evas_object_size_hint_min_get @ptr, w, h + [ w.read_int, h.read_int ] + end + alias :size_hint_min :size_hint_min_get + def size_hint_max_get + w = FFI::MemoryPointer.new :int + h = FFI::MemoryPointer.new :int + Native.evas_object_size_hint_max_get @ptr, w, h + [ w.read_int, h.read_int ] + end + alias :size_hint_max :size_hint_max_get + def size_hint_request_get + w = FFI::MemoryPointer.new :int + h = FFI::MemoryPointer.new :int + Native.evas_object_size_hint_request_get @ptr, w, h + [ w.read_int, h.read_int ] + end + alias :size_hint_request :size_hint_request_get + def size_hint_aspect_get + a = FFI::MemoryPointer.new :int + w = FFI::MemoryPointer.new :int + h = FFI::MemoryPointer.new :int + Native.evas_object_size_hint_aspect_get @ptr, a, w, h + [ Native.enum_type(:evas_aspect_control)[a.read_int], w.read_int, h.read_int ] + end + alias :size_hint_aspect :size_hint_aspect_get + def size_hint_align_get + w = FFI::MemoryPointer.new :double + h = FFI::MemoryPointer.new :double + Native.evas_object_size_hint_align_get @ptr, w, h + [ w.read_double, h.read_double ] + end + alias :size_hint_align :size_hint_align_get + def size_hint_weight_get + w = FFI::MemoryPointer.new :double + h = FFI::MemoryPointer.new :double + Native.evas_object_size_hint_weight_get @ptr, w, h + [ w.read_double, h.read_double ] + end + alias :size_hint_weight :size_hint_weight_get + def size_hint_padding_get + l = FFI::MemoryPointer.new :int + r = FFI::MemoryPointer.new :int + t = FFI::MemoryPointer.new :int + b = FFI::MemoryPointer.new :int + Native.evas_object_size_hint_padding_get @ptr, l, r, t, b + [ l.read_int, r.read_int, t.read_int, b.read_int ] + end + alias :size_hint_padding :size_hint_padding_get + def data_get k + r = Native.evas_object_data_get @ptr, k + return nil if r==FFI::Pointer::NULL + r.read_string + end + alias :data :data_get end end end diff --git a/lib/efl/native/evas.rb b/lib/efl/native/evas.rb index c392b9a..3505844 100644 --- a/lib/efl/native/evas.rb +++ b/lib/efl/native/evas.rb @@ -65,8 +65,8 @@ module Efl enum :evas_native_surface_type, [ :evas_native_surface_none, :evas_native_surface_x11, :evas_native_surface_opengl ] # typedef enum _Evas_Render_Op {...} Evas_Render_Op; enum :evas_render_op, [ :evas_render_blend, 0, :evas_render_blend_rel, 1, :evas_render_copy, 2, :evas_render_copy_rel, 3, :evas_render_add, 4, - :evas_render_add_rel, 5, :evas_render_sub, 6, :evas_render_sub_rel, 7, :evas_render_tint, 8, :evas_render_tint_rel, 9, :evas_render_mask, 1, - :evas_render_mul, 1 ] + :evas_render_add_rel, 5, :evas_render_sub, 6, :evas_render_sub_rel, 7, :evas_render_tint, 8, :evas_render_tint_rel, 9, :evas_render_mask, 10, + :evas_render_mul, 11 ] # typedef enum _Evas_Border_Fill_Mode {...} Evas_Border_Fill_Mode; enum :evas_border_fill_mode, [ :evas_border_fill_none, 0, :evas_border_fill_default, 1, :evas_border_fill_solid, 2 ] # typedef enum _Evas_Image_Scale_Hint {...} Evas_Image_Scale_Hint; |