From 63df15daae7a3b86478d635128e814149918bb09 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 12:35:14 +0100 Subject: add elementary,elementary_all,elm/elm_bg,elm/elm_label,elm/elm_object,elm/elm_win --- lib/efl/elm/elm_bg.rb | 37 ++++++++++++++++++++++++++ lib/efl/elm/elm_label.rb | 22 +++++++++++++++ lib/efl/elm/elm_object.rb | 68 +++++++++++++++++++++++++++++++++++++++++++++++ lib/efl/elm/elm_win.rb | 33 +++++++++++++++++++++++ 4 files changed, 160 insertions(+) create mode 100644 lib/efl/elm/elm_bg.rb create mode 100644 lib/efl/elm/elm_label.rb create mode 100644 lib/efl/elm/elm_object.rb create mode 100644 lib/efl/elm/elm_win.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_bg.rb b/lib/efl/elm/elm_bg.rb new file mode 100644 index 0000000..1eea4ce --- /dev/null +++ b/lib/efl/elm/elm_bg.rb @@ -0,0 +1,37 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_bg' +# +module Efl + # + module Elm + # + class ElmBg < ElmObject + # + include Helper + constructor :elm_bg_add + search_prefixes 'elm_bg_' + # + def file_get + f = FFI::MemoryPointer.new :pointer + g = FFI::MemoryPointer.new :pointer + Native.elm_bg_file_get @ptr, f, g + [ f.read_pointer.read_string, g.read_pointer.read_string ] + end + alias :file :file_get + def color_get + r = FFI::MemoryPointer.new :int + g = FFI::MemoryPointer.new :int + b = FFI::MemoryPointer.new :int + Native.elm_bg_color_get @ptr, r, g, b + [ r.read_int, g.read_int, b.read_int ] + end + alias :color :color_get + end + # + end +end +# +# EOF diff --git a/lib/efl/elm/elm_label.rb b/lib/efl/elm/elm_label.rb new file mode 100644 index 0000000..57460c4 --- /dev/null +++ b/lib/efl/elm/elm_label.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_label' +# +module Efl + # + module Elm + # + class ElmLabel < ElmObject + # + include Helper + constructor :elm_label_add + search_prefixes 'elm_label_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/elm/elm_object.rb b/lib/efl/elm/elm_object.rb new file mode 100644 index 0000000..f640da5 --- /dev/null +++ b/lib/efl/elm/elm_object.rb @@ -0,0 +1,68 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elementary' +require 'efl/native/elm/elm_object' +# +module Efl + # + module Elm + # + module Helper + def self.included kls + def kls.constructor meth + self.class_eval <<-EOF + def initialize ptr, &block + if ptr.is_a? FFI::Pointer + super ptr, &block + else + super Native.method(:#{meth}), ptr, &block + end + end + EOF + end + end + end + # + class ElmObject < Efl::Evas::REvasObject + # + search_prefixes 'elm_object_' + # + def smart_callback_add event_str, cb, data=FFI::MemoryPointer::NULL + Native.evas_object_smart_callback_add @ptr, event_str, cb, data + end + # + def text_set label + Native.elm_object_part_text_set @ptr, nil, label + end + alias :text= :text_set + # + def text_get + Native.elm_object_part_text_get @ptr, nil + end + alias :text :text_get + # + def content_set content + Native.elm_object_part_content_set @ptr, nil, content + end + alias :content= :content_set + # + def content_get + Native.elm_object_part_content_get @ptr, nil + end + alias :content :content_get + # + def content_unset + Native.elm_object_part_content_unset @ptr, nil + end + # + def parent_widget_get + ElmObject.new Native.elm_object_parent_widget_get @ptr + end + alias :parent_widget :parent_widget_get + end + # + end +end +# +# EOF diff --git a/lib/efl/elm/elm_win.rb b/lib/efl/elm/elm_win.rb new file mode 100644 index 0000000..daac677 --- /dev/null +++ b/lib/efl/elm/elm_win.rb @@ -0,0 +1,33 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_win' +# +module Efl + # + module Elm + # + class ElmWin < ElmObject + # + search_prefixes 'elm_win_' + # + def initialize parent, title, type=:elm_win_basic, &block + super Native.method(:elm_win_add), parent, title, type, &block + end +# def inwin_add +# ElmInWin.new @ptr +# end + def screen_position_get + x = FFI::MemoryPointer.new :int + y = FFI::MemoryPointer.new :int + Native.elm_win_screen_position_get @ptr, x, y + [ x.read_int, y.read_int ] + end + alias :screen_position :screen_position_get + end + # + end +end +# +# EOF -- cgit v1.2.3 From 5eb017c40d7d41c1be5964052572cce3cbd9ae66 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:37:26 +0100 Subject: add lib/efl/elm/elm_object_item.rb --- lib/efl/elm/elm_object_item.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/efl/elm/elm_object_item.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_object_item.rb b/lib/efl/elm/elm_object_item.rb new file mode 100644 index 0000000..eacedf0 --- /dev/null +++ b/lib/efl/elm/elm_object_item.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_object_item' +# +module Efl + # + module Elm + # + class ElmObjectItem < ElmObject + # + search_prefixes 'elm_object_item_' + # + end + # + end +end +# +# EOF -- cgit v1.2.3 From 2825a689ad8fbbaaca8497e6575f0404b74c782f Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:38:27 +0100 Subject: add lib/efl/elm/elm_entry.rb --- lib/efl/elm/elm_entry.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/efl/elm/elm_entry.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_entry.rb b/lib/efl/elm/elm_entry.rb new file mode 100644 index 0000000..0d2b287 --- /dev/null +++ b/lib/efl/elm/elm_entry.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_entry' +# +module Efl + # + module Elm + # + class ElmEntry < ElmObject + # + include Helper + constructor :elm_entry_add + search_prefixes 'elm_entry_' + # + end + # + end +end +# +# EOF -- cgit v1.2.3 From a36de17212b556f43f0fdba1e604f0e096215998 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:39:02 +0100 Subject: add lib/efl/elm/elm_icon.rb --- lib/efl/elm/elm_icon.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/efl/elm/elm_icon.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_icon.rb b/lib/efl/elm/elm_icon.rb new file mode 100644 index 0000000..89a00ec --- /dev/null +++ b/lib/efl/elm/elm_icon.rb @@ -0,0 +1,26 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_icon' +# +module Efl + # + module Elm + # + class ElmIcon < ElmObject + # + include Helper + constructor :elm_icon_add + search_prefixes 'elm_icon_' + # + def scale_set args + Native.elm_icon_scale_set @ptr, *args + end + alias :scale= :scale_set + end + # + end +end +# +# EOF -- cgit v1.2.3 From 644b93ab39f419cdac33e738fa812e667eab63ba Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:39:28 +0100 Subject: add lib/efl/elm/elm_list.rb --- lib/efl/elm/elm_list.rb | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 lib/efl/elm/elm_list.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_list.rb b/lib/efl/elm/elm_list.rb new file mode 100644 index 0000000..dfdf7f9 --- /dev/null +++ b/lib/efl/elm/elm_list.rb @@ -0,0 +1,54 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/elm/elm_object_item' +require 'efl/native/elm/elm_list' +# +module Efl + # + module Elm + # + class ElmList < ElmObject + # + include Helper + constructor :elm_list_add + search_prefixes 'elm_list_' + # + def item_append label, left_icon=nil, right_icon=nil, cb=nil, data=nil + ElmObjectItem.new Native::elm_list_item_append @ptr, label, left_icon, right_icon, cb, data + end + # + def item_prepend label, left_icon=nil, right_icon=nil, cb=nil, data=nil + ElmObjectItem.new Native::elm_list_item_prepend @ptr, label, left_icon, right_icon, cb, data + end + # + def item_insert_before before, label, left_icon=nil, right_icon=nil, cb=nil, data=nil + ElmObjectItem.new Native::elm_list_item_insert_before @ptr, before, label, left_icon, right_icon, cb, data + end + # + def item_insert_after after, label, left_icon=nil, right_icon=nil, cb=nil, data=nil + ElmObjectItem.new Native::elm_list_item_insert_after @ptr, after, label, left_icon, right_icon, cb, data + end + # + def item_sorted_insert label, left_icon, right_icon, cb, data, cmp_fct + ElmObjectItem.new Native::elm_list_item_sorted_insert @ptr, label, left_icon, right_icon, cb, data, cmp_fct + end + # + def selected_item_get + ElmObjectItem.new Native::elm_list_selected_item_get @ptr + end + # + def item_prev + ElmObjectItem.new Native::elm_list_item_prev @ptr + end + # + def item_next + ElmObjectItem.new Native::elm_list_item_next @ptr + end + end + # + end +end +# +# EOF -- cgit v1.2.3 From 3bf8f5879ae17e7ccb084784d3e1c2dc0261ec13 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:39:47 +0100 Subject: add lib/efl/elm/elm_scroller.rb --- lib/efl/elm/elm_scroller.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/efl/elm/elm_scroller.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_scroller.rb b/lib/efl/elm/elm_scroller.rb new file mode 100644 index 0000000..9cd855a --- /dev/null +++ b/lib/efl/elm/elm_scroller.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_scroller' +# +module Efl + # + module Elm + # + class ElmScroller < ElmObject + # + include Helper + constructor :elm_scroller_add + search_prefixes 'elm_scroller_' + # + end + # + end +end +# +# EOF -- cgit v1.2.3 From e2e79d4b6ca8bfd031bf764ee45c44a68ae6287b Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:40:47 +0100 Subject: add lib/efl/elm/elm_tooltip.rb --- lib/efl/elm/elm_tooltip.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/efl/elm/elm_tooltip.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_tooltip.rb b/lib/efl/elm/elm_tooltip.rb new file mode 100644 index 0000000..3938586 --- /dev/null +++ b/lib/efl/elm/elm_tooltip.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_tooltip' +# +module Efl + # + module Elm + # + class ElmTooltip < ElmObject + # + search_prefixes 'elm_tooltip_', 'elm_object_tooltip_' + # + end + # + end +end +# +# EOF -- cgit v1.2.3 From c858ea430f766c94b5f9ca1cb716306b8b6d7031 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:52:35 +0100 Subject: parse elm_box.h, generate elm_box.rb --- lib/efl/elm/elm_box.rb | 42 ++++++++++++++++++++++ lib/efl/native/elm/elm_box.rb | 81 +++++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++ 4 files changed, 129 insertions(+) create mode 100644 lib/efl/elm/elm_box.rb create mode 100644 lib/efl/native/elm/elm_box.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_box.rb b/lib/efl/elm/elm_box.rb new file mode 100644 index 0000000..b0539a2 --- /dev/null +++ b/lib/efl/elm/elm_box.rb @@ -0,0 +1,42 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_box' +# +module Efl + # + module Elm + # + class ElmBox < ElmObject + # + include Helper + constructor :elm_box_add + search_prefixes 'elm_box_' + # + def padding_get + x = FFI::MemoryPointer.new :int + y = FFI::MemoryPointer.new :int + Native::elm_box_padding_get @ptr, x, y + [ x.read_int, y.read_int ] + end + alias :padding :padding_get + # + def align_get + x = FFI::MemoryPointer.new :float + y = FFI::MemoryPointer.new :float + Native::elm_box_align_get @ptr, x, y + [ x.read_float, y.read_float ] + end + alias :align :padding_get + # + def children_get + Efl::EinaList::REinaList.new Native.elm_box_children_get @ptr + end + alias :children :children_get + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_box.rb b/lib/efl/native/elm/elm_box.rb new file mode 100644 index 0000000..4b776cd --- /dev/null +++ b/lib/efl/native/elm/elm_box.rb @@ -0,0 +1,81 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmBox + # + FCT_PREFIX = 'elm_box_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # TYPEDEFS + # typedef struct _Elm_Box_Transition Elm_Box_Transition; + typedef :pointer, :elm_box_transition + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_box_add(Evas_Object *parent); + [ :elm_box_add, [ :evas_object ], :evas_object ], + # EAPI void elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); + [ :elm_box_horizontal_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_box_horizontal_get(const Evas_Object *obj); + [ :elm_box_horizontal_get, [ :evas_object ], :bool ], + # EAPI void elm_box_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous); + [ :elm_box_homogeneous_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_box_homogeneous_get(const Evas_Object *obj); + [ :elm_box_homogeneous_get, [ :evas_object ], :bool ], + # EAPI void elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj); + [ :elm_box_pack_start, [ :evas_object, :evas_object ], :void ], + # EAPI void elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj); + [ :elm_box_pack_end, [ :evas_object, :evas_object ], :void ], + # EAPI void elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before); + [ :elm_box_pack_before, [ :evas_object, :evas_object, :evas_object ], :void ], + # EAPI void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after); + [ :elm_box_pack_after, [ :evas_object, :evas_object, :evas_object ], :void ], + # EAPI void elm_box_clear(Evas_Object *obj); + [ :elm_box_clear, [ :evas_object ], :void ], + # EAPI void elm_box_unpack(Evas_Object *obj, Evas_Object *subobj); + [ :elm_box_unpack, [ :evas_object, :evas_object ], :void ], + # EAPI void elm_box_unpack_all(Evas_Object *obj); + [ :elm_box_unpack_all, [ :evas_object ], :void ], + # EAPI Eina_List *elm_box_children_get(const Evas_Object *obj); + [ :elm_box_children_get, [ :evas_object ], :eina_list ], + # EAPI void elm_box_padding_set(Evas_Object *obj, Evas_Coord horizontal, Evas_Coord vertical); + [ :elm_box_padding_set, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_box_padding_get(const Evas_Object *obj, Evas_Coord *horizontal, Evas_Coord *vertical); + [ :elm_box_padding_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_box_align_set(Evas_Object *obj, double horizontal, double vertical); + [ :elm_box_align_set, [ :evas_object, :double, :double ], :void ], + # EAPI void elm_box_align_get(const Evas_Object *obj, double *horizontal, double *vertical); + [ :elm_box_align_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_box_recalculate(Evas_Object *obj); + [ :elm_box_recalculate, [ :evas_object ], :void ], + # EAPI void elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)); + # FIXME + # EAPI void elm_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data); + [ :elm_box_layout_transition, [ :evas_object, :evas_object_box_data, :pointer ], :void ], + # EAPI Elm_Box_Transition *elm_box_transition_new(const double duration, Evas_Object_Box_Layout start_layout, void *start_layout_data, void (*start_layout_free_data)(void *data), Evas_Object_Box_Layout end_layout, void *end_layout_data, void (*end_layout_free_data)(void *data), void (*transition_end_cb)(void *data), void *transition_end_data); + # FIXME + # EAPI void elm_box_transition_free(void *data); + [ :elm_box_transition_free, [ :pointer ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index de52d7d..adf3a67 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -54,6 +54,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_bg.h" \ "${INCLUDE}/elementary-0/elm_label.h" \ "${INCLUDE}/elementary-0/elm_object.h" \ + "${INCLUDE}/elementary-0/elm_box.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index b044f62..a706e5e 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -390,6 +390,11 @@ libs << { :modname=>'ElmObject', :prefix=>'elm_object', :outfile=>'elm/elm_object.rb', :requires=>["#{NATIVE}/edje","#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_box.h', + :modname=>'ElmBox', :prefix=>'elm_box', :outfile=>'elm/elm_box.rb', + :requires=>["#{NATIVE}/edje","#{NATIVE}/elementary"], :constants=>[] +} Dir.mkdir lib_path unless (File.exists? lib_path) # libs.each do |lib| -- cgit v1.2.3 From 31656c652ea2dd77ed0aa2180635a2b41a543c01 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 14:53:14 +0100 Subject: parse elm_button.h, generate elm_button.rb --- lib/efl/elm/elm_button.rb | 22 +++++++++++++++++++ lib/efl/native/elm/elm_button.rb | 47 ++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 7 +++++- 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 lib/efl/elm/elm_button.rb create mode 100644 lib/efl/native/elm/elm_button.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_button.rb b/lib/efl/elm/elm_button.rb new file mode 100644 index 0000000..dbf9c86 --- /dev/null +++ b/lib/efl/elm/elm_button.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_button' +# +module Efl + # + module Elm + # + class ElmButton < ElmObject + # + include Helper + constructor :elm_button_add + search_prefixes 'elm_button_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_button.rb b/lib/efl/native/elm/elm_button.rb new file mode 100644 index 0000000..c850123 --- /dev/null +++ b/lib/efl/native/elm/elm_button.rb @@ -0,0 +1,47 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmButton + # + FCT_PREFIX = 'elm_button_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_button_add(Evas_Object *parent); + [ :elm_button_add, [ :evas_object ], :evas_object ], + # EAPI void elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on); + [ :elm_button_autorepeat_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_button_autorepeat_get(const Evas_Object *obj); + [ :elm_button_autorepeat_get, [ :evas_object ], :bool ], + # EAPI void elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t); + [ :elm_button_autorepeat_initial_timeout_set, [ :evas_object, :double ], :void ], + # EAPI double elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj); + [ :elm_button_autorepeat_initial_timeout_get, [ :evas_object ], :double ], + # EAPI void elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t); + [ :elm_button_autorepeat_gap_timeout_set, [ :evas_object, :double ], :void ], + # EAPI double elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj); + [ :elm_button_autorepeat_gap_timeout_get, [ :evas_object ], :double ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index adf3a67..75b4076 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -55,6 +55,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_label.h" \ "${INCLUDE}/elementary-0/elm_object.h" \ "${INCLUDE}/elementary-0/elm_box.h" \ + "${INCLUDE}/elementary-0/elm_button.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index a706e5e..0874c59 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -393,7 +393,12 @@ libs << { libs << { :lib=>ELM_LIB,:header=>'elm_box.h', :modname=>'ElmBox', :prefix=>'elm_box', :outfile=>'elm/elm_box.rb', - :requires=>["#{NATIVE}/edje","#{NATIVE}/elementary"], :constants=>[] + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} +libs << { + :lib=>ELM_LIB,:header=>'elm_button.h', + :modname=>'ElmButton', :prefix=>'elm_button', :outfile=>'elm/elm_button.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] } Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From 85de83d793de3e09cdce18cb6034047db400788a Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:00:28 +0100 Subject: parse elm_frame.h, generate elm_frame.rb --- lib/efl/elm/elm_frame.rb | 22 ++++++++++++++++++++ lib/efl/native/elm/elm_frame.rb | 45 +++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++++ 4 files changed, 73 insertions(+) create mode 100644 lib/efl/elm/elm_frame.rb create mode 100644 lib/efl/native/elm/elm_frame.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_frame.rb b/lib/efl/elm/elm_frame.rb new file mode 100644 index 0000000..f1eb7a7 --- /dev/null +++ b/lib/efl/elm/elm_frame.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_frame' +# +module Efl + # + module Elm + # + class ElmFrame < ElmObject + # + include Helper + constructor :elm_frame_add + search_prefixes 'elm_frame_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_frame.rb b/lib/efl/native/elm/elm_frame.rb new file mode 100644 index 0000000..e941b82 --- /dev/null +++ b/lib/efl/native/elm/elm_frame.rb @@ -0,0 +1,45 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmFrame + # + FCT_PREFIX = 'elm_frame_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_frame_add(Evas_Object *parent); + [ :elm_frame_add, [ :evas_object ], :evas_object ], + # EAPI void elm_frame_autocollapse_set(Evas_Object *obj, Eina_Bool autocollapse); + [ :elm_frame_autocollapse_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_frame_autocollapse_get(const Evas_Object *obj); + [ :elm_frame_autocollapse_get, [ :evas_object ], :bool ], + # EAPI void elm_frame_collapse_set(Evas_Object *obj, Eina_Bool collapse); + [ :elm_frame_collapse_set, [ :evas_object, :bool ], :void ], + # EAPI void elm_frame_collapse_go(Evas_Object *obj, Eina_Bool collapse); + [ :elm_frame_collapse_go, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_frame_collapse_get(const Evas_Object *obj); + [ :elm_frame_collapse_get, [ :evas_object ], :bool ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 75b4076..39097a6 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -56,6 +56,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_object.h" \ "${INCLUDE}/elementary-0/elm_box.h" \ "${INCLUDE}/elementary-0/elm_button.h" \ + "${INCLUDE}/elementary-0/elm_frame.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 0874c59..f4d523d 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -400,6 +400,11 @@ libs << { :modname=>'ElmButton', :prefix=>'elm_button', :outfile=>'elm/elm_button.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_frame.h', + :modname=>'ElmFrame', :prefix=>'elm_frame', :outfile=>'elm/elm_frame.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} Dir.mkdir lib_path unless (File.exists? lib_path) # libs.each do |lib| -- cgit v1.2.3 From 41f77c375f4bfcc6395425aa86158bdad93108ad Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:03:43 +0100 Subject: parse elm_panel.h, generate elm_panel.rb --- lib/efl/elm/elm_panel.rb | 22 +++++++++++++++++ lib/efl/native/elm/elm_panel.rb | 55 +++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 6 +++++ 4 files changed, 84 insertions(+) create mode 100644 lib/efl/elm/elm_panel.rb create mode 100644 lib/efl/native/elm/elm_panel.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_panel.rb b/lib/efl/elm/elm_panel.rb new file mode 100644 index 0000000..41dbcc5 --- /dev/null +++ b/lib/efl/elm/elm_panel.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_panel' +# +module Efl + # + module Elm + # + class ElmPanel < ElmObject + # + include Helper + constructor :elm_panel_add + search_prefixes 'elm_panel_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_panel.rb b/lib/efl/native/elm/elm_panel.rb new file mode 100644 index 0000000..4fe40a4 --- /dev/null +++ b/lib/efl/native/elm/elm_panel.rb @@ -0,0 +1,55 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmPanel + # + FCT_PREFIX = 'elm_panel_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # ENUMS + # typedef enum {...} Elm_Panel_Orient; + enum :elm_panel_orient, [ :elm_panel_orient_top, :elm_panel_orient_bottom, :elm_panel_orient_left, :elm_panel_orient_right ] + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_panel_add(Evas_Object *parent); + [ :elm_panel_add, [ :evas_object ], :evas_object ], + # EAPI void elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient); + [ :elm_panel_orient_set, [ :evas_object, :elm_panel_orient ], :void ], + # EAPI Elm_Panel_Orient elm_panel_orient_get(const Evas_Object *obj); + [ :elm_panel_orient_get, [ :evas_object ], :elm_panel_orient ], + # EAPI void elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden); + [ :elm_panel_hidden_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_panel_hidden_get(const Evas_Object *obj); + [ :elm_panel_hidden_get, [ :evas_object ], :bool ], + # EAPI void elm_panel_toggle(Evas_Object *obj); + [ :elm_panel_toggle, [ :evas_object ], :void ], + # EAPI void elm_panel_content_set(Evas_Object *obj, Evas_Object *content); + [ :elm_panel_content_set, [ :evas_object, :evas_object ], :void ], + # EAPI Evas_Object * elm_panel_content_get(const Evas_Object *obj); + [ :elm_panel_content_get, [ :evas_object ], :evas_object ], + # EAPI Evas_Object * elm_panel_content_unset(Evas_Object *obj); + [ :elm_panel_content_unset, [ :evas_object ], :evas_object ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 39097a6..ce754e3 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -57,6 +57,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_box.h" \ "${INCLUDE}/elementary-0/elm_button.h" \ "${INCLUDE}/elementary-0/elm_frame.h" \ + "${INCLUDE}/elementary-0/elm_panel.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index f4d523d..1be9b57 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -405,6 +405,12 @@ libs << { :modname=>'ElmFrame', :prefix=>'elm_frame', :outfile=>'elm/elm_frame.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_panel.h', + :modname=>'ElmPanel', :prefix=>'elm_panel', :outfile=>'elm/elm_panel.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} +# Dir.mkdir lib_path unless (File.exists? lib_path) # libs.each do |lib| -- cgit v1.2.3 From 8af4c2366a9685c06f3114203cb21da42de6b53f Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:09:12 +0100 Subject: parse elm_image.h, generate elm_image.rb --- lib/efl/elm/elm_image.rb | 22 ++++++++++++ lib/efl/native/elm/elm_image.rb | 80 +++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++ 4 files changed, 108 insertions(+) create mode 100644 lib/efl/elm/elm_image.rb create mode 100644 lib/efl/native/elm/elm_image.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_image.rb b/lib/efl/elm/elm_image.rb new file mode 100644 index 0000000..6a37ee9 --- /dev/null +++ b/lib/efl/elm/elm_image.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_image' +# +module Efl + # + module Elm + # + class ElmImage < ElmObject + # + include Helper + constructor :elm_image_add + search_prefixes 'elm_image_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_image.rb b/lib/efl/native/elm/elm_image.rb new file mode 100644 index 0000000..356c5dd --- /dev/null +++ b/lib/efl/native/elm/elm_image.rb @@ -0,0 +1,80 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmImage + # + FCT_PREFIX = 'elm_image_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # ENUMS + # typedef enum {...} Elm_Image_Orient; + enum :elm_image_orient, [ :elm_image_orient_none, 0, :elm_image_orient_0, 0, :elm_image_rotate_90, 1, :elm_image_rotate_180, 2, + :elm_image_rotate_270, 3, :elm_image_flip_horizontal, 4, :elm_image_flip_vertical, 5, :elm_image_flip_transpose, 6, :elm_image_flip_transverse, 7 ] + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_image_add(Evas_Object *parent); + [ :elm_image_add, [ :evas_object ], :evas_object ], + # EAPI Eina_Bool elm_image_file_set(Evas_Object *obj, const char *file, const char *group); + [ :elm_image_file_set, [ :evas_object, :string, :string ], :bool ], + # EAPI void elm_image_file_get(const Evas_Object *obj, const char **file, const char **group); + [ :elm_image_file_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth); + [ :elm_image_smooth_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_image_smooth_get(const Evas_Object *obj); + [ :elm_image_smooth_get, [ :evas_object ], :bool ], + # EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h); + [ :elm_image_object_size_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale); + [ :elm_image_no_scale_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_image_no_scale_get(const Evas_Object *obj); + [ :elm_image_no_scale_get, [ :evas_object ], :bool ], + # EAPI void elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down); + [ :elm_image_scale_set, [ :evas_object, :bool, :bool ], :void ], + # EAPI void elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down); + [ :elm_image_scale_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside); + [ :elm_image_fill_outside_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj); + [ :elm_image_fill_outside_get, [ :evas_object ], :bool ], + # EAPI void elm_image_prescale_set(Evas_Object *obj, int size); + [ :elm_image_prescale_set, [ :evas_object, :int ], :void ], + # EAPI int elm_image_prescale_get(const Evas_Object *obj); + [ :elm_image_prescale_get, [ :evas_object ], :int ], + # EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient); + [ :elm_image_orient_set, [ :evas_object, :elm_image_orient ], :void ], + # EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj); + [ :elm_image_orient_get, [ :evas_object ], :elm_image_orient ], + # EAPI void elm_image_editable_set(Evas_Object *obj, Eina_Bool set); + [ :elm_image_editable_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj); + [ :elm_image_editable_get, [ :evas_object ], :bool ], + # EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj); + [ :elm_image_object_get, [ :evas_object ], :evas_object ], + # EAPI void elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed); + [ :elm_image_aspect_fixed_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_image_aspect_fixed_get(const Evas_Object *obj); + [ :elm_image_aspect_fixed_get, [ :evas_object ], :bool ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index ce754e3..4c50504 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -58,6 +58,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_button.h" \ "${INCLUDE}/elementary-0/elm_frame.h" \ "${INCLUDE}/elementary-0/elm_panel.h" \ + "${INCLUDE}/elementary-0/elm_image.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 1be9b57..e963dfa 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -410,6 +410,11 @@ libs << { :modname=>'ElmPanel', :prefix=>'elm_panel', :outfile=>'elm/elm_panel.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_image.h', + :modname=>'ElmImage', :prefix=>'elm_image', :outfile=>'elm/elm_image.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From 979cdad00dc4617cf1614f4d4bbdc07a1e7bc1d1 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:13:17 +0100 Subject: parse elm_grid.h, generate elm_grid.rb --- lib/efl/elm/elm_grid.rb | 22 ++++++++++++++++++ lib/efl/native/elm/elm_grid.rb | 51 ++++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++++ 4 files changed, 79 insertions(+) create mode 100644 lib/efl/elm/elm_grid.rb create mode 100644 lib/efl/native/elm/elm_grid.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_grid.rb b/lib/efl/elm/elm_grid.rb new file mode 100644 index 0000000..9b00a35 --- /dev/null +++ b/lib/efl/elm/elm_grid.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_grid' +# +module Efl + # + module Elm + # + class ElmGrid < ElmObject + # + include Helper + constructor :elm_grid_add + search_prefixes 'elm_grid_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_grid.rb b/lib/efl/native/elm/elm_grid.rb new file mode 100644 index 0000000..0b02565 --- /dev/null +++ b/lib/efl/native/elm/elm_grid.rb @@ -0,0 +1,51 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmGrid + # + FCT_PREFIX = 'elm_grid_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_grid_add(Evas_Object *parent); + [ :elm_grid_add, [ :evas_object ], :evas_object ], + # EAPI void elm_grid_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h); + [ :elm_grid_size_set, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_grid_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); + [ :elm_grid_size_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_grid_pack(Evas_Object *obj, Evas_Object *subobj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + [ :elm_grid_pack, [ :evas_object, :evas_object, :int, :int, :int, :int ], :void ], + # EAPI void elm_grid_unpack(Evas_Object *obj, Evas_Object *subobj); + [ :elm_grid_unpack, [ :evas_object, :evas_object ], :void ], + # EAPI void elm_grid_clear(Evas_Object *obj, Eina_Bool clear); + [ :elm_grid_clear, [ :evas_object, :bool ], :void ], + # EAPI void elm_grid_pack_set(Evas_Object *subobj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + [ :elm_grid_pack_set, [ :evas_object, :int, :int, :int, :int ], :void ], + # EAPI void elm_grid_pack_get(Evas_Object *subobj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); + [ :elm_grid_pack_get, [ :evas_object, :pointer, :pointer, :pointer, :pointer ], :void ], + # EAPI Eina_List *elm_grid_children_get(const Evas_Object *obj); + [ :elm_grid_children_get, [ :evas_object ], :eina_list ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 4c50504..e830d2a 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -59,6 +59,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_frame.h" \ "${INCLUDE}/elementary-0/elm_panel.h" \ "${INCLUDE}/elementary-0/elm_image.h" \ + "${INCLUDE}/elementary-0/elm_grid.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index e963dfa..2d80a8d 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -415,6 +415,11 @@ libs << { :modname=>'ElmImage', :prefix=>'elm_image', :outfile=>'elm/elm_image.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_grid.h', + :modname=>'ElmGrid', :prefix=>'elm_grid', :outfile=>'elm/elm_grid.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From 7d085da91d5c2c7da74f9eaca50cca9faa4e33ef Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:25:27 +0100 Subject: parse elm_menu.h, generate elm_menu.rb --- lib/efl/elm/elm_menu.rb | 55 ++++++++++++++++++++++++++++++ lib/efl/native/elm/elm_menu.rb | 77 ++++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++ 4 files changed, 138 insertions(+) create mode 100644 lib/efl/elm/elm_menu.rb create mode 100644 lib/efl/native/elm/elm_menu.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_menu.rb b/lib/efl/elm/elm_menu.rb new file mode 100644 index 0000000..f285011 --- /dev/null +++ b/lib/efl/elm/elm_menu.rb @@ -0,0 +1,55 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/elm/elm_object_item' +require 'efl/native/elm/elm_menu' +# +module Efl + # + module Elm + # + class ElmMenu < ElmObject + # + include Helper + constructor :elm_menu_add + search_prefixes 'elm_menu_' + # + def item_add parent, icon=nil, label=nil, cb=nil, data=nil + ElmObjectItem.new Native::elm_menu_item_add @ptr, parent, icon, label, cb, data + end + # + def item_add_object parent, subobj, cb=nil, data=nil + ElmObjectItem.new Native::elm_menu_item_add_object @ptr, parent, subobj, cb, data + end + # + def item_separator_add parent + ElmObjectItem.new Native::elm_menu_item_separator_add @ptr, parent + end + # + def selected_item_get + ElmObjectItem.new Native::elm_menu_selected_item_get @ptr + end + # + def last_item_get + ElmObjectItem.new Native::elm_menu_last_item_get @ptr + end + # + def first_item_get + ElmObjectItem.new Native::elm_menu_first_item_get @ptr + end + # + def item_next_get it + ElmObjectItem.new Native::elm_menu_item_next_get it + end + # + def item_prev_get it + ElmObjectItem.new Native::elm_menu_item_prev_get it + end + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_menu.rb b/lib/efl/native/elm/elm_menu.rb new file mode 100644 index 0000000..bb981a6 --- /dev/null +++ b/lib/efl/native/elm/elm_menu.rb @@ -0,0 +1,77 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmMenu + # + FCT_PREFIX = 'elm_menu_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_menu_add(Evas_Object *parent); + [ :elm_menu_add, [ :evas_object ], :evas_object ], + # EAPI void elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent); + [ :elm_menu_parent_set, [ :evas_object, :evas_object ], :void ], + # EAPI Evas_Object *elm_menu_parent_get(const Evas_Object *obj); + [ :elm_menu_parent_get, [ :evas_object ], :evas_object ], + # EAPI void elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y); + [ :elm_menu_move, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_menu_close(Evas_Object *obj); + [ :elm_menu_close, [ :evas_object ], :void ], + # EAPI const Eina_List *elm_menu_items_get(const Evas_Object *obj); + [ :elm_menu_items_get, [ :evas_object ], :eina_list ], + # EAPI Evas_Object *elm_menu_item_object_get(const Elm_Object_Item *it); + [ :elm_menu_item_object_get, [ :elm_object_item ], :evas_object ], + # EAPI Elm_Object_Item *elm_menu_item_add(Evas_Object *obj, Elm_Object_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); + [ :elm_menu_item_add, [ :evas_object, :elm_object_item, :string, :string, :evas_smart_cb, :pointer ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_menu_item_add_object(Evas_Object *obj, Elm_Object_Item *parent, Evas_Object *subobj, Evas_Smart_Cb func, const void *data); + [ :elm_menu_item_add_object, [ :evas_object, :elm_object_item, :evas_object, :evas_smart_cb, :pointer ], :elm_object_item ], + # EAPI void elm_menu_item_object_icon_name_set(Elm_Object_Item *it, const char *icon); + [ :elm_menu_item_object_icon_name_set, [ :elm_object_item, :string ], :void ], + # EAPI const char *elm_menu_item_object_icon_name_get(const Elm_Object_Item *it); + [ :elm_menu_item_object_icon_name_get, [ :elm_object_item ], :string ], + # EAPI void elm_menu_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); + [ :elm_menu_item_selected_set, [ :elm_object_item, :bool ], :void ], + # EAPI Eina_Bool elm_menu_item_selected_get(const Elm_Object_Item *it); + [ :elm_menu_item_selected_get, [ :elm_object_item ], :bool ], + # EAPI Elm_Object_Item *elm_menu_item_separator_add(Evas_Object *obj, Elm_Object_Item *parent); + [ :elm_menu_item_separator_add, [ :evas_object, :elm_object_item ], :elm_object_item ], + # EAPI Eina_Bool elm_menu_item_is_separator(Elm_Object_Item *it); + [ :elm_menu_item_is_separator, [ :elm_object_item ], :bool ], + # EAPI const Eina_List *elm_menu_item_subitems_get(const Elm_Object_Item *it); + [ :elm_menu_item_subitems_get, [ :elm_object_item ], :eina_list ], + # EAPI unsigned int elm_menu_item_index_get(const Elm_Object_Item *it); + [ :elm_menu_item_index_get, [ :elm_object_item ], :uint ], + # EAPI Elm_Object_Item *elm_menu_selected_item_get(const Evas_Object *obj); + [ :elm_menu_selected_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_menu_last_item_get(const Evas_Object *obj); + [ :elm_menu_last_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_menu_first_item_get(const Evas_Object *obj); + [ :elm_menu_first_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_menu_item_next_get(const Elm_Object_Item *it); + [ :elm_menu_item_next_get, [ :elm_object_item ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_menu_item_prev_get(const Elm_Object_Item *it); + [ :elm_menu_item_prev_get, [ :elm_object_item ], :elm_object_item ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index e830d2a..501fc6e 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -60,6 +60,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_panel.h" \ "${INCLUDE}/elementary-0/elm_image.h" \ "${INCLUDE}/elementary-0/elm_grid.h" \ + "${INCLUDE}/elementary-0/elm_menu.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 2d80a8d..a58c294 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -420,6 +420,11 @@ libs << { :modname=>'ElmGrid', :prefix=>'elm_grid', :outfile=>'elm/elm_grid.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_menu.h', + :modname=>'ElmMenu', :prefix=>'elm_menu', :outfile=>'elm/elm_menu.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From da1ba75528a8366db7a3d09a8c67070dd0b47b90 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:27:30 +0100 Subject: parse elm_check.h, generate elm_check.rb --- lib/efl/elm/elm_check.rb | 22 ++++++++++++++++++++++ lib/efl/native/elm/elm_check.rb | 41 +++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++++ 4 files changed, 69 insertions(+) create mode 100644 lib/efl/elm/elm_check.rb create mode 100644 lib/efl/native/elm/elm_check.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_check.rb b/lib/efl/elm/elm_check.rb new file mode 100644 index 0000000..141890a --- /dev/null +++ b/lib/efl/elm/elm_check.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_check' +# +module Efl + # + module Elm + # + class ElmCheck < ElmObject + # + include Helper + constructor :elm_check_add + search_prefixes 'elm_check_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_check.rb b/lib/efl/native/elm/elm_check.rb new file mode 100644 index 0000000..9165d30 --- /dev/null +++ b/lib/efl/native/elm/elm_check.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmCheck + # + FCT_PREFIX = 'elm_check_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object * elm_check_add(Evas_Object *parent); + [ :elm_check_add, [ :evas_object ], :evas_object ], + # EAPI void elm_check_state_set(Evas_Object *obj, Eina_Bool state); + [ :elm_check_state_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_check_state_get(const Evas_Object *obj); + [ :elm_check_state_get, [ :evas_object ], :bool ], + # EAPI void elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep); + [ :elm_check_state_pointer_set, [ :evas_object, :pointer ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 501fc6e..4168dcc 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -61,6 +61,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_image.h" \ "${INCLUDE}/elementary-0/elm_grid.h" \ "${INCLUDE}/elementary-0/elm_menu.h" \ + "${INCLUDE}/elementary-0/elm_check.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index a58c294..cbd4fc2 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -425,6 +425,11 @@ libs << { :modname=>'ElmMenu', :prefix=>'elm_menu', :outfile=>'elm/elm_menu.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_check.h', + :modname=>'ElmCheck', :prefix=>'elm_check', :outfile=>'elm/elm_check.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From 2d73b282cb57c14a2dc9b8d4a052643c48bae892 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:31:46 +0100 Subject: parse elm_clock.h, generate elm_clock.rb --- lib/efl/elm/elm_clock.rb | 22 ++++++++++++++ lib/efl/native/elm/elm_clock.rb | 64 +++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 ++++ 4 files changed, 92 insertions(+) create mode 100644 lib/efl/elm/elm_clock.rb create mode 100644 lib/efl/native/elm/elm_clock.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_clock.rb b/lib/efl/elm/elm_clock.rb new file mode 100644 index 0000000..4ebd02a --- /dev/null +++ b/lib/efl/elm/elm_clock.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_clock' +# +module Efl + # + module Elm + # + class ElmClock < ElmObject + # + include Helper + constructor :elm_clock_add + search_prefixes 'elm_clock_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_clock.rb b/lib/efl/native/elm/elm_clock.rb new file mode 100644 index 0000000..bd6cff7 --- /dev/null +++ b/lib/efl/native/elm/elm_clock.rb @@ -0,0 +1,64 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmClock + # + FCT_PREFIX = 'elm_clock_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # ENUMS + # typedef enum {...} Elm_Clock_Digedit; + enum :elm_clock_digedit, [ :elm_clock_none, 0, :elm_clock_hour_decimal, 1<<0, :elm_clock_hour_unit, 1<<1, :elm_clock_min_decimal, 1<<2, + :elm_clock_min_unit, 1<<3, :elm_clock_sec_decimal, 1<<4, :elm_clock_sec_unit, 1<<5, :elm_clock_all, (1<<6)-1 ] + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_clock_add(Evas_Object *parent); + [ :elm_clock_add, [ :evas_object ], :evas_object ], + # EAPI void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec); + [ :elm_clock_time_set, [ :evas_object, :int, :int, :int ], :void ], + # EAPI void elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec); + [ :elm_clock_time_get, [ :evas_object, :pointer, :pointer, :pointer ], :void ], + # EAPI void elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit); + [ :elm_clock_edit_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_clock_edit_get(const Evas_Object *obj); + [ :elm_clock_edit_get, [ :evas_object ], :bool ], + # EAPI void elm_clock_digit_edit_set(Evas_Object *obj, Elm_Clock_Digedit digedit); + [ :elm_clock_digit_edit_set, [ :evas_object, :elm_clock_digedit ], :void ], + # EAPI Elm_Clock_Digedit elm_clock_digit_edit_get(const Evas_Object *obj); + [ :elm_clock_digit_edit_get, [ :evas_object ], :elm_clock_digedit ], + # EAPI void elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm); + [ :elm_clock_show_am_pm_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_clock_show_am_pm_get(const Evas_Object *obj); + [ :elm_clock_show_am_pm_get, [ :evas_object ], :bool ], + # EAPI void elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds); + [ :elm_clock_show_seconds_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_clock_show_seconds_get(const Evas_Object *obj); + [ :elm_clock_show_seconds_get, [ :evas_object ], :bool ], + # EAPI void elm_clock_interval_set(Evas_Object *obj, double interval); + [ :elm_clock_interval_set, [ :evas_object, :double ], :void ], + # EAPI double elm_clock_interval_get(const Evas_Object *obj); + [ :elm_clock_interval_get, [ :evas_object ], :double ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 4168dcc..f79a192 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -62,6 +62,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_grid.h" \ "${INCLUDE}/elementary-0/elm_menu.h" \ "${INCLUDE}/elementary-0/elm_check.h" \ + "${INCLUDE}/elementary-0/elm_clock.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index cbd4fc2..a9c10ae 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -430,6 +430,11 @@ libs << { :modname=>'ElmCheck', :prefix=>'elm_check', :outfile=>'elm/elm_check.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_clock.h', + :modname=>'ElmClock', :prefix=>'elm_clock', :outfile=>'elm/elm_clock.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From 8dc91c77cfcb1e6adc7cbabef1fa578df00a3617 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:36:00 +0100 Subject: parse elm_calendar.h, generate elm_calendar.rb --- lib/efl/elm/elm_calendar.rb | 22 +++++++++++ lib/efl/native/elm/elm_calendar.rb | 76 ++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++ 4 files changed, 104 insertions(+) create mode 100644 lib/efl/elm/elm_calendar.rb create mode 100644 lib/efl/native/elm/elm_calendar.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_calendar.rb b/lib/efl/elm/elm_calendar.rb new file mode 100644 index 0000000..e8cf708 --- /dev/null +++ b/lib/efl/elm/elm_calendar.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_calendar' +# +module Efl + # + module Elm + # + class ElmCalendar < ElmObject + # + include Helper + constructor :elm_calendar_add + search_prefixes 'elm_calendar_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_calendar.rb b/lib/efl/native/elm/elm_calendar.rb new file mode 100644 index 0000000..9677040 --- /dev/null +++ b/lib/efl/native/elm/elm_calendar.rb @@ -0,0 +1,76 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmCalendar + # + FCT_PREFIX = 'elm_calendar_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # ENUMS + # typedef enum {...} Elm_Calendar_Mark_Repeat; + enum :elm_calendar_mark_repeat, [ :elm_calendar_unique, :elm_calendar_daily, :elm_calendar_weekly, :elm_calendar_monthly, + :elm_calendar_annually ] + # + # TYPEDEFS + # typedef struct _Elm_Calendar_Mark Elm_Calendar_Mark; + typedef :pointer, :elm_calendar_mark + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_calendar_add(Evas_Object *parent); + [ :elm_calendar_add, [ :evas_object ], :evas_object ], + # EAPI const char **elm_calendar_weekdays_names_get(const Evas_Object *obj); + [ :elm_calendar_weekdays_names_get, [ :evas_object ], :pointer ], + # EAPI void elm_calendar_weekdays_names_set(Evas_Object *obj, const char *weekdays[]); + # FIXME + # EAPI void elm_calendar_min_max_year_set(Evas_Object *obj, int min, int max); + [ :elm_calendar_min_max_year_set, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_calendar_min_max_year_get(const Evas_Object *obj, int *min, int *max); + [ :elm_calendar_min_max_year_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_calendar_day_selection_enabled_set(Evas_Object *obj, Eina_Bool enabled); + [ :elm_calendar_day_selection_enabled_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_calendar_day_selection_enabled_get(const Evas_Object *obj); + [ :elm_calendar_day_selection_enabled_get, [ :evas_object ], :bool ], + # EAPI void elm_calendar_selected_time_set(Evas_Object *obj, struct tm *selected_time); + [ :elm_calendar_selected_time_set, [ :evas_object, :pointer ], :void ], + # EAPI Eina_Bool elm_calendar_selected_time_get(const Evas_Object *obj, struct tm *selected_time); + [ :elm_calendar_selected_time_get, [ :evas_object, :pointer ], :bool ], + # EAPI void elm_calendar_format_function_set(Evas_Object *obj, char *(*format_function)(struct tm *stime)); + # FIXME + # EAPI Elm_Calendar_Mark *elm_calendar_mark_add(Evas_Object *obj, const char *mark_type, struct tm *mark_time, Elm_Calendar_Mark_Repeat repeat); + [ :elm_calendar_mark_add, [ :evas_object, :string, :pointer, :elm_calendar_mark_repeat ], :elm_calendar_mark ], + # EAPI void elm_calendar_mark_del(Elm_Calendar_Mark *mark); + [ :elm_calendar_mark_del, [ :elm_calendar_mark ], :void ], + # EAPI void elm_calendar_marks_clear(Evas_Object *obj); + [ :elm_calendar_marks_clear, [ :evas_object ], :void ], + # EAPI const Eina_List *elm_calendar_marks_get(const Evas_Object *obj); + [ :elm_calendar_marks_get, [ :evas_object ], :eina_list ], + # EAPI void elm_calendar_marks_draw(Evas_Object *obj); + [ :elm_calendar_marks_draw, [ :evas_object ], :void ], + # EAPI void elm_calendar_interval_set(Evas_Object *obj, double interval); + [ :elm_calendar_interval_set, [ :evas_object, :double ], :void ], + # EAPI double elm_calendar_interval_get(const Evas_Object *obj); + [ :elm_calendar_interval_get, [ :evas_object ], :double ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index f79a192..3a3478c 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -63,6 +63,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_menu.h" \ "${INCLUDE}/elementary-0/elm_check.h" \ "${INCLUDE}/elementary-0/elm_clock.h" \ + "${INCLUDE}/elementary-0/elm_calendar.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index a9c10ae..edac863 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -435,6 +435,11 @@ libs << { :modname=>'ElmClock', :prefix=>'elm_clock', :outfile=>'elm/elm_clock.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_calendar.h', + :modname=>'ElmCalendar', :prefix=>'elm_calendar', :outfile=>'elm/elm_calendar.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From 06825f703d413cec78849877fb2dba6593336175 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:36:18 +0100 Subject: parse elm_bubble.h, generate elm_bubble.rb --- lib/efl/elm/elm_bubble.rb | 22 ++++++++++++++++++++++ lib/efl/native/elm/elm_bubble.rb | 39 +++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++++ 4 files changed, 67 insertions(+) create mode 100644 lib/efl/elm/elm_bubble.rb create mode 100644 lib/efl/native/elm/elm_bubble.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_bubble.rb b/lib/efl/elm/elm_bubble.rb new file mode 100644 index 0000000..ca5bbef --- /dev/null +++ b/lib/efl/elm/elm_bubble.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_bubble' +# +module Efl + # + module Elm + # + class ElmBubble < ElmObject + # + include Helper + constructor :elm_bubble_add + search_prefixes 'elm_bubble_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_bubble.rb b/lib/efl/native/elm/elm_bubble.rb new file mode 100644 index 0000000..11b000b --- /dev/null +++ b/lib/efl/native/elm/elm_bubble.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmBubble + # + FCT_PREFIX = 'elm_bubble_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_bubble_add(Evas_Object *parent); + [ :elm_bubble_add, [ :evas_object ], :evas_object ], + # EAPI void elm_bubble_corner_set(Evas_Object *obj, const char *corner); + [ :elm_bubble_corner_set, [ :evas_object, :string ], :void ], + # EAPI const char *elm_bubble_corner_get(const Evas_Object *obj); + [ :elm_bubble_corner_get, [ :evas_object ], :string ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 3a3478c..7aab889 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -64,6 +64,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_check.h" \ "${INCLUDE}/elementary-0/elm_clock.h" \ "${INCLUDE}/elementary-0/elm_calendar.h" \ + "${INCLUDE}/elementary-0/elm_bubble.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index edac863..aafe4d4 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -440,6 +440,11 @@ libs << { :modname=>'ElmCalendar', :prefix=>'elm_calendar', :outfile=>'elm/elm_calendar.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_bubble.h', + :modname=>'ElmBubble', :prefix=>'elm_bubble', :outfile=>'elm/elm_bubble.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From d91b9c4689573bf64750c57089ad3711d4389cd7 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:38:22 +0100 Subject: parse elm_layout.h, generate elm_layout.rb --- lib/efl/elm/elm_layout.rb | 22 ++++++++++++ lib/efl/native/elm/elm_layout.rb | 77 ++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++ 4 files changed, 105 insertions(+) create mode 100644 lib/efl/elm/elm_layout.rb create mode 100644 lib/efl/native/elm/elm_layout.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_layout.rb b/lib/efl/elm/elm_layout.rb new file mode 100644 index 0000000..a1eb99f --- /dev/null +++ b/lib/efl/elm/elm_layout.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_layout' +# +module Efl + # + module Elm + # + class ElmLayout < ElmObject + # + include Helper + constructor :elm_layout_add + search_prefixes 'elm_layout_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_layout.rb b/lib/efl/native/elm/elm_layout.rb new file mode 100644 index 0000000..c9d76b9 --- /dev/null +++ b/lib/efl/native/elm/elm_layout.rb @@ -0,0 +1,77 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmLayout + # + FCT_PREFIX = 'elm_layout_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_layout_add(Evas_Object *parent); + [ :elm_layout_add, [ :evas_object ], :evas_object ], + # EAPI Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group); + [ :elm_layout_file_set, [ :evas_object, :string, :string ], :bool ], + # EAPI Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style); + [ :elm_layout_theme_set, [ :evas_object, :string, :string, :string ], :bool ], + # EAPI void elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child); + [ :elm_layout_box_append, [ :evas_object, :string, :evas_object ], :void ], + # EAPI void elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child); + [ :elm_layout_box_prepend, [ :evas_object, :string, :evas_object ], :void ], + # EAPI void elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference); + [ :elm_layout_box_insert_before, [ :evas_object, :string, :evas_object, :evas_object ], :void ], + # EAPI void elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos); + [ :elm_layout_box_insert_at, [ :evas_object, :string, :evas_object, :uint ], :void ], + # EAPI Evas_Object *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child); + [ :elm_layout_box_remove, [ :evas_object, :string, :evas_object ], :evas_object ], + # EAPI void elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear); + [ :elm_layout_box_remove_all, [ :evas_object, :string, :bool ], :void ], + # EAPI void elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan); + [ :elm_layout_table_pack, [ :evas_object, :string, :evas_object, :ushort, :ushort, :ushort, :ushort ], :void ], + # EAPI Evas_Object *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj); + [ :elm_layout_table_unpack, [ :evas_object, :string, :evas_object ], :evas_object ], + # EAPI void elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear); + [ :elm_layout_table_clear, [ :evas_object, :string, :bool ], :void ], + # EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj); + [ :elm_layout_edje_get, [ :evas_object ], :evas_object ], + # EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char *key); + [ :elm_layout_data_get, [ :evas_object, :string ], :string ], + # EAPI void elm_layout_sizing_eval(Evas_Object *obj); + [ :elm_layout_sizing_eval, [ :evas_object ], :void ], + # EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor); + [ :elm_layout_part_cursor_set, [ :evas_object, :string, :string ], :bool ], + # EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name); + [ :elm_layout_part_cursor_get, [ :evas_object, :string ], :string ], + # EAPI void elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name); + [ :elm_layout_part_cursor_unset, [ :evas_object, :string ], :void ], + # EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style); + [ :elm_layout_part_cursor_style_set, [ :evas_object, :string, :string ], :bool ], + # EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name); + [ :elm_layout_part_cursor_style_get, [ :evas_object, :string ], :string ], + # EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only); + [ :elm_layout_part_cursor_engine_only_set, [ :evas_object, :string, :bool ], :bool ], + # EAPI Eina_Bool elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name); + [ :elm_layout_part_cursor_engine_only_get, [ :evas_object, :string ], :bool ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 7aab889..ad3dd8e 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -65,6 +65,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_clock.h" \ "${INCLUDE}/elementary-0/elm_calendar.h" \ "${INCLUDE}/elementary-0/elm_bubble.h" \ + "${INCLUDE}/elementary-0/elm_layout.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index aafe4d4..70f2592 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -445,6 +445,11 @@ libs << { :modname=>'ElmBubble', :prefix=>'elm_bubble', :outfile=>'elm/elm_bubble.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_layout.h', + :modname=>'ElmLayout', :prefix=>'elm_layout', :outfile=>'elm/elm_layout.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From 1ba383336298faea6562ace82132ba1321203179 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:41:26 +0100 Subject: elm_layout: elm_layout_edje_get return a REdje object --- lib/efl/elm/elm_layout.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_layout.rb b/lib/efl/elm/elm_layout.rb index a1eb99f..1eaeeef 100644 --- a/lib/efl/elm/elm_layout.rb +++ b/lib/efl/elm/elm_layout.rb @@ -14,6 +14,10 @@ module Efl constructor :elm_layout_add search_prefixes 'elm_layout_' # + def edje_get &block + Efl::Edje::REdje.new Native.method(:elm_layout_edje_get), @ptr, &block + end + alias :edje :edje_get end # end -- cgit v1.2.3 From 5894c348596d25e349ec92f7a56c67374dd68618 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:43:50 +0100 Subject: parse elm_cursor.h, generate elm_cursor.rb --- lib/efl/elm/elm_cursor.rb | 20 ++++++++++++++++ lib/efl/native/elm/elm_cursor.rb | 51 ++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 ++++ 4 files changed, 77 insertions(+) create mode 100644 lib/efl/elm/elm_cursor.rb create mode 100644 lib/efl/native/elm/elm_cursor.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_cursor.rb b/lib/efl/elm/elm_cursor.rb new file mode 100644 index 0000000..cfdd602 --- /dev/null +++ b/lib/efl/elm/elm_cursor.rb @@ -0,0 +1,20 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_cursor' +# +module Efl + # + module Elm + # + class ElmCursor < ElmObject + # + search_prefixes 'elm_cursor_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_cursor.rb b/lib/efl/native/elm/elm_cursor.rb new file mode 100644 index 0000000..1a0b6fe --- /dev/null +++ b/lib/efl/native/elm/elm_cursor.rb @@ -0,0 +1,51 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmCursor + # + FCT_PREFIX = 'elm_cursor_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # FUNCTIONS + fcts = [ + # EAPI void elm_object_cursor_set(Evas_Object *obj, const char *cursor); + [ :elm_object_cursor_set, [ :evas_object, :string ], :void ], + # EAPI const char *elm_object_cursor_get(const Evas_Object *obj); + [ :elm_object_cursor_get, [ :evas_object ], :string ], + # EAPI void elm_object_cursor_unset(Evas_Object *obj); + [ :elm_object_cursor_unset, [ :evas_object ], :void ], + # EAPI void elm_object_cursor_style_set(Evas_Object *obj, const char *style); + [ :elm_object_cursor_style_set, [ :evas_object, :string ], :void ], + # EAPI const char *elm_object_cursor_style_get(const Evas_Object *obj); + [ :elm_object_cursor_style_get, [ :evas_object ], :string ], + # EAPI void elm_object_cursor_engine_only_set(Evas_Object *obj, Eina_Bool engine_only); + [ :elm_object_cursor_engine_only_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_object_cursor_engine_only_get(const Evas_Object *obj); + [ :elm_object_cursor_engine_only_get, [ :evas_object ], :bool ], + # EAPI int elm_cursor_engine_only_get(void); + [ :elm_cursor_engine_only_get, [ ], :int ], + # EAPI Eina_Bool elm_cursor_engine_only_set(int engine_only); + [ :elm_cursor_engine_only_set, [ :int ], :bool ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index ad3dd8e..57eae16 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -66,6 +66,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_calendar.h" \ "${INCLUDE}/elementary-0/elm_bubble.h" \ "${INCLUDE}/elementary-0/elm_layout.h" \ + "${INCLUDE}/elementary-0/elm_cursor.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 70f2592..10f269d 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -450,6 +450,11 @@ libs << { :modname=>'ElmLayout', :prefix=>'elm_layout', :outfile=>'elm/elm_layout.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_cursor.h', + :modname=>'ElmCursor', :prefix=>'elm_cursor', :outfile=>'elm/elm_cursor.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3 From b030c490265bb13ee98a650da419a033495042ed Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 27 Feb 2012 15:45:59 +0100 Subject: parse elm_notify.h, generate elm_notify.rb --- lib/efl/elm/elm_notify.rb | 22 ++++++++++++++++ lib/efl/native/elm/elm_notify.rb | 57 ++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 ++++ 4 files changed, 85 insertions(+) create mode 100644 lib/efl/elm/elm_notify.rb create mode 100644 lib/efl/native/elm/elm_notify.rb (limited to 'lib/efl/elm') diff --git a/lib/efl/elm/elm_notify.rb b/lib/efl/elm/elm_notify.rb new file mode 100644 index 0000000..c1b3d4c --- /dev/null +++ b/lib/efl/elm/elm_notify.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_notify' +# +module Efl + # + module Elm + # + class ElmNotify < ElmObject + # + include Helper + constructor :elm_notify_add + search_prefixes 'elm_check_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_notify.rb b/lib/efl/native/elm/elm_notify.rb new file mode 100644 index 0000000..656bb28 --- /dev/null +++ b/lib/efl/native/elm/elm_notify.rb @@ -0,0 +1,57 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmNotify + # + FCT_PREFIX = 'elm_notify_' unless const_defined? :FCT_PREFIX + # + def self.method_missing meth, *args, &block + sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX + self.send sym, *args, &block + end + # + end + # + module Native + # + ffi_lib 'elementary-ver-pre-svn-09.so.0' + # + # ENUMS + # typedef enum {...} Elm_Notify_Orient; + enum :elm_notify_orient, [ :elm_notify_orient_top, :elm_notify_orient_center, :elm_notify_orient_bottom, :elm_notify_orient_left, + :elm_notify_orient_right, :elm_notify_orient_top_left, :elm_notify_orient_top_right, :elm_notify_orient_bottom_left, :elm_notify_orient_bottom_right, + :elm_notify_orient_last ] + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_notify_add(Evas_Object *parent); + [ :elm_notify_add, [ :evas_object ], :evas_object ], + # EAPI void elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent); + [ :elm_notify_parent_set, [ :evas_object, :evas_object ], :void ], + # EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj); + [ :elm_notify_parent_get, [ :evas_object ], :evas_object ], + # EAPI void elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient); + [ :elm_notify_orient_set, [ :evas_object, :elm_notify_orient ], :void ], + # EAPI Elm_Notify_Orient elm_notify_orient_get(const Evas_Object *obj); + [ :elm_notify_orient_get, [ :evas_object ], :elm_notify_orient ], + # EAPI void elm_notify_timeout_set(Evas_Object *obj, double timeout); + [ :elm_notify_timeout_set, [ :evas_object, :double ], :void ], + # EAPI double elm_notify_timeout_get(const Evas_Object *obj); + [ :elm_notify_timeout_get, [ :evas_object ], :double ], + # EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat); + [ :elm_notify_repeat_events_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_notify_repeat_events_get(const Evas_Object *obj); + [ :elm_notify_repeat_events_get, [ :evas_object ], :bool ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 57eae16..af7945b 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -67,6 +67,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_bubble.h" \ "${INCLUDE}/elementary-0/elm_layout.h" \ "${INCLUDE}/elementary-0/elm_cursor.h" \ + "${INCLUDE}/elementary-0/elm_notify.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 10f269d..f6980fb 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -455,6 +455,11 @@ libs << { :modname=>'ElmCursor', :prefix=>'elm_cursor', :outfile=>'elm/elm_cursor.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_notify.h', + :modname=>'ElmNotify', :prefix=>'elm_notify', :outfile=>'elm/elm_notify.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.2.3