diff options
Diffstat (limited to 'lib/efl/native/evas.rb')
-rw-r--r-- | lib/efl/native/evas.rb | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/lib/efl/native/evas.rb b/lib/efl/native/evas.rb index 20103b7..bd316e0 100644 --- a/lib/efl/native/evas.rb +++ b/lib/efl/native/evas.rb @@ -8,8 +8,29 @@ module Efl module Evas # def self.method_missing m, *args, &block - sym = 'evas_'+m.to_s - raise NameError.new "#{self.name}.#{sym} (#{m})" if not Efl::Native.respond_to? sym + m_s = m.to_s + if m_s =~/^(.*)=$/ + m_s = $1+'_set' + args_s = '*args[0]' + elsif m_s =~/^(.*)\?$/ + m_s = $1+'_get' + args_s = '*args' + else + args_s = '*args' + end + sym = ( + if Efl::Native.respond_to? 'evas_'+m_s + 'evas_'+m_s + elsif Efl::Native.respond_to? m_s + m_s + elsif Efl::Native.respond_to? 'evas_'+m_s+'_get' + 'evas_'+m_s+'_get' + elsif Efl::Native.respond_to? m_s+'_get' + m_s+'_get' + else + raise NameError.new "#{self.name}.#{m_s} (#{m})" + end + ) self.module_eval "def self.#{m} *args, █ r=Efl::Native.#{sym}(*args); yield r if block_given?; r; end" self.send m, *args, &block end @@ -920,6 +941,8 @@ module Efl [ :evas_textblock_cursor_paragraph_next, [ :evas_textblock_cursor_p ], :eina_bool ], # EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur); [ :evas_textblock_cursor_paragraph_prev, [ :evas_textblock_cursor_p ], :eina_bool ], + # EAPI const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor); + [ :evas_textblock_node_format_list_get, [ :evas_object_p, :string ], :eina_list_p ], # EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj); [ :evas_textblock_node_format_first_get, [ :evas_object_p ], :evas_object_textblock_node_format_p ], # EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj); @@ -1042,6 +1065,8 @@ module Efl [ :evas_smart_callback_description_find, [ :evas_smart_p, :string ], :evas_smart_cb_description_p ], # EAPI Eina_Bool evas_smart_class_inherit_full (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size); [ :evas_smart_class_inherit_full, [ :evas_smart_class_p, :evas_smart_class_p, :uint ], :eina_bool ], + # EAPI int evas_smart_usage_get(const Evas_Smart *s); + [ :evas_smart_usage_get, [ :evas_smart_p ], :int ], # EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s); [ :evas_object_smart_add, [ :evas_p, :evas_smart_p ], :evas_object_p ], # EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj); @@ -1198,6 +1223,32 @@ module Efl [ :evas_object_table_children_get, [ :evas_object_p ], :eina_list_p ], # EAPI Evas_Object *evas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row); [ :evas_object_table_child_get, [ :evas_object_p, :ushort, :ushort ], :evas_object_p ], + # EAPI Evas_Object *evas_object_grid_add (Evas *evas); + [ :evas_object_grid_add, [ :evas_p ], :evas_object_p ], + # EAPI Evas_Object *evas_object_grid_add_to (Evas_Object *parent); + [ :evas_object_grid_add_to, [ :evas_object_p ], :evas_object_p ], + # EAPI void evas_object_grid_size_set (Evas_Object *o, int w, int h); + [ :evas_object_grid_size_set, [ :evas_object_p, :int, :int ], :void ], + # EAPI void evas_object_grid_size_get (const Evas_Object *o, int *w, int *h); + [ :evas_object_grid_size_get, [ :evas_object_p, :int_p, :int_p ], :void ], + # EAPI void evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored); + [ :evas_object_grid_mirrored_set, [ :evas_object_p, :eina_bool ], :void ], + # EAPI Eina_Bool evas_object_grid_mirrored_get (const Evas_Object *o); + [ :evas_object_grid_mirrored_get, [ :evas_object_p ], :eina_bool ], + # EAPI Eina_Bool evas_object_grid_pack (Evas_Object *o, Evas_Object *child, int x, int y, int w, int h); + [ :evas_object_grid_pack, [ :evas_object_p, :evas_object_p, :int, :int, :int, :int ], :eina_bool ], + # EAPI Eina_Bool evas_object_grid_unpack (Evas_Object *o, Evas_Object *child); + [ :evas_object_grid_unpack, [ :evas_object_p, :evas_object_p ], :eina_bool ], + # EAPI void evas_object_grid_clear (Evas_Object *o, Eina_Bool clear); + [ :evas_object_grid_clear, [ :evas_object_p, :eina_bool ], :void ], + # EAPI Eina_Bool evas_object_grid_pack_get (Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h); + [ :evas_object_grid_pack_get, [ :evas_object_p, :evas_object_p, :int_p, :int_p, :int_p, :int_p ], :eina_bool ], + # EAPI Eina_Iterator *evas_object_grid_iterator_new (const Evas_Object *o); + [ :evas_object_grid_iterator_new, [ :evas_object_p ], :eina_iterator_p ], + # EAPI Eina_Accessor *evas_object_grid_accessor_new (const Evas_Object *o); + [ :evas_object_grid_accessor_new, [ :evas_object_p ], :eina_accessor_p ], + # EAPI Eina_List *evas_object_grid_children_get (const Evas_Object *o); + [ :evas_object_grid_children_get, [ :evas_object_p ], :eina_list_p ], # EAPI Eina_Bool evas_object_filter_mode_set (Evas_Object *o, Evas_Filter_Mode mode); [ :evas_object_filter_mode_set, [ :evas_object_p, :evas_filter_mode ], :eina_bool ], # EAPI Evas_Filter_Mode evas_object_filter_mode_get (Evas_Object *o); |