diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 10:05:17 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 10:05:17 +0100 |
commit | 706034d6d53414e6eb8b5880af38c8dc101f8c65 (patch) | |
tree | f5b20d38de900b4059dcca14dbac62922353bc9d | |
parent | debba5aaff32de4ba857ad4f177fc6c2c21bec46 (diff) | |
download | ffi-efl-706034d6d53414e6eb8b5880af38c8dc101f8c65.zip ffi-efl-706034d6d53414e6eb8b5880af38c8dc101f8c65.tar.gz |
parse elm_scroller.h and generate elm_scroller.rb
-rw-r--r-- | lib/efl/native/elm/elm_scroller.rb | 80 | ||||
-rwxr-xr-x | tools/extract-api.sh | 1 | ||||
-rwxr-xr-x | tools/genruby.rb | 5 |
3 files changed, 86 insertions, 0 deletions
diff --git a/lib/efl/native/elm/elm_scroller.rb b/lib/efl/native/elm/elm_scroller.rb new file mode 100644 index 0000000..a935c7f --- /dev/null +++ b/lib/efl/native/elm/elm_scroller.rb @@ -0,0 +1,80 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmScroller + # + FCT_PREFIX = 'elm_scroller_' 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_Scroller_Policy; + enum :elm_scroller_policy, [ :elm_scroller_policy_auto, 0, :elm_scroller_policy_on, 1, :elm_scroller_policy_off, 2, :elm_scroller_policy_last, + 3 ] + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_scroller_add(Evas_Object *parent); + [ :elm_scroller_add, [ :evas_object ], :evas_object ], + # EAPI void elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base); + [ :elm_scroller_custom_widget_base_theme_set, [ :evas_object, :string, :string ], :void ], + # EAPI void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h); + [ :elm_scroller_content_min_limit, [ :evas_object, :bool, :bool ], :void ], + # EAPI void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + [ :elm_scroller_region_show, [ :evas_object, :int, :int, :int, :int ], :void ], + # EAPI void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v); + [ :elm_scroller_policy_set, [ :evas_object, :elm_scroller_policy, :elm_scroller_policy ], :void ], + # EAPI void elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v); + [ :elm_scroller_policy_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); + [ :elm_scroller_region_get, [ :evas_object, :pointer, :pointer, :pointer, :pointer ], :void ], + # EAPI void elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); + [ :elm_scroller_child_size_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); + [ :elm_scroller_bounce_set, [ :evas_object, :bool, :bool ], :void ], + # EAPI void elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); + [ :elm_scroller_bounce_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel); + [ :elm_scroller_page_relative_set, [ :evas_object, :double, :double ], :void ], + # EAPI void elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize); + [ :elm_scroller_page_size_set, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); + [ :elm_scroller_current_page_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); + [ :elm_scroller_last_page_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber); + [ :elm_scroller_page_show, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber); + [ :elm_scroller_page_bring_in, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + [ :elm_scroller_region_bring_in, [ :evas_object, :int, :int, :int, :int ], :void ], + # EAPI void elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation); + [ :elm_scroller_propagate_events_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_scroller_propagate_events_get(const Evas_Object *obj); + [ :elm_scroller_propagate_events_get, [ :evas_object ], :bool ], + # EAPI void elm_scroller_gravity_set(Evas_Object *obj, double x, double y); + [ :elm_scroller_gravity_set, [ :evas_object, :double, :double ], :void ], + # EAPI void elm_scroller_gravity_get(const Evas_Object *obj, double *x, double *y); + [ :elm_scroller_gravity_get, [ :evas_object, :pointer, :pointer ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index ba30448..6ca6065 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -47,6 +47,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_tooltip.h" \ "${INCLUDE}/elementary-0/elm_object_item.h" \ "${INCLUDE}/elementary-0/elm_icon.h" \ + "${INCLUDE}/elementary-0/elm_scroller.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 52a174a..1bef0fc 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -355,6 +355,11 @@ libs << { :modname=>'ElmIcon', :prefix=>'elm_icon', :outfile=>'elm/elm_icon.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_scroller.h', + :modname=>'ElmScroller', :prefix=>'elm_scroller', :outfile=>'elm/elm_scroller.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} Dir.mkdir lib_path unless (File.exists? lib_path) # libs.each do |lib| |