From 327bb9646f8b4a2c6c5588eb935ca606222ce018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 27 Feb 2012 17:05:09 +0100 Subject: parse elc_spinner.h, generate elm_spinner.rb --- lib/efl/elementary_all.rb | 1 + lib/efl/elm/elm_spinner.rb | 22 ++++++++++++ lib/efl/native/elm/elm_spinner.rb | 73 +++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 5 +++ 5 files changed, 102 insertions(+) create mode 100644 lib/efl/elm/elm_spinner.rb create mode 100644 lib/efl/native/elm/elm_spinner.rb diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 41c8a2e..7ed8a0a 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -35,6 +35,7 @@ require 'efl/elm/elm_menu' require 'efl/elm/elm_notify' require 'efl/elm/elm_panel' require 'efl/elm/elm_scroller' +require 'efl/elm/elm_spinner' require 'efl/elm/elm_tooltip' require 'efl/elm/elm_win' # diff --git a/lib/efl/elm/elm_spinner.rb b/lib/efl/elm/elm_spinner.rb new file mode 100644 index 0000000..11392c5 --- /dev/null +++ b/lib/efl/elm/elm_spinner.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_spinner' +# +module Efl + # + module Elm + # + class ElmSpinner < ElmObject + # + include Helper + constructor :elm_spinner_add + search_prefixes 'elm_spinner_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_spinner.rb b/lib/efl/native/elm/elm_spinner.rb new file mode 100644 index 0000000..d087356 --- /dev/null +++ b/lib/efl/native/elm/elm_spinner.rb @@ -0,0 +1,73 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmSpinner + # + FCT_PREFIX = 'elm_spinner_' 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_spinner_add(Evas_Object *parent); + [ :elm_spinner_add, [ :evas_object ], :evas_object ], + # EAPI void elm_spinner_label_format_set(Evas_Object *obj, const char *fmt); + [ :elm_spinner_label_format_set, [ :evas_object, :string ], :void ], + # EAPI const char *elm_spinner_label_format_get(const Evas_Object *obj); + [ :elm_spinner_label_format_get, [ :evas_object ], :string ], + # EAPI void elm_spinner_min_max_set(Evas_Object *obj, double min, double max); + [ :elm_spinner_min_max_set, [ :evas_object, :double, :double ], :void ], + # EAPI void elm_spinner_min_max_get(const Evas_Object *obj, double *min, double *max); + [ :elm_spinner_min_max_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_spinner_step_set(Evas_Object *obj, double step); + [ :elm_spinner_step_set, [ :evas_object, :double ], :void ], + # EAPI double elm_spinner_step_get(const Evas_Object *obj); + [ :elm_spinner_step_get, [ :evas_object ], :double ], + # EAPI void elm_spinner_value_set(Evas_Object *obj, double val); + [ :elm_spinner_value_set, [ :evas_object, :double ], :void ], + # EAPI double elm_spinner_value_get(const Evas_Object *obj); + [ :elm_spinner_value_get, [ :evas_object ], :double ], + # EAPI void elm_spinner_wrap_set(Evas_Object *obj, Eina_Bool wrap); + [ :elm_spinner_wrap_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_spinner_wrap_get(const Evas_Object *obj); + [ :elm_spinner_wrap_get, [ :evas_object ], :bool ], + # EAPI void elm_spinner_editable_set(Evas_Object *obj, Eina_Bool editable); + [ :elm_spinner_editable_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_spinner_editable_get(const Evas_Object *obj); + [ :elm_spinner_editable_get, [ :evas_object ], :bool ], + # EAPI void elm_spinner_special_value_add(Evas_Object *obj, double value, const char *label); + [ :elm_spinner_special_value_add, [ :evas_object, :double, :string ], :void ], + # EAPI void elm_spinner_interval_set(Evas_Object *obj, double interval); + [ :elm_spinner_interval_set, [ :evas_object, :double ], :void ], + # EAPI double elm_spinner_interval_get(const Evas_Object *obj); + [ :elm_spinner_interval_get, [ :evas_object ], :double ], + # EAPI void elm_spinner_base_set(Evas_Object *obj, double base); + [ :elm_spinner_base_set, [ :evas_object, :double ], :void ], + # EAPI double elm_spinner_base_get(const Evas_Object *obj); + [ :elm_spinner_base_get, [ :evas_object ], :double ], + # EAPI void elm_spinner_round_set(Evas_Object *obj, int round); + [ :elm_spinner_round_set, [ :evas_object, :int ], :void ], + # EAPI int elm_spinner_round_get(const Evas_Object *obj); + [ :elm_spinner_round_get, [ :evas_object ], :int ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 1fc48d6..dd7e6a4 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -77,6 +77,7 @@ for header in \ "${INCLUDE}/elementary-0/elc_fileselector.h" \ "${INCLUDE}/elementary-0/elc_fileselector_entry.h" \ "${INCLUDE}/elementary-0/elc_fileselector_button.h" \ + "${INCLUDE}/elementary-0/elm_spinner.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 4e25683..65ca14d 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -505,6 +505,11 @@ libs << { :modname=>'ElmFileSelectorButton', :prefix=>'elm_fileselector_button', :outfile=>'elm/elm_fileselector_button.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_spinner.h', + :modname=>'ElmSpinner', :prefix=>'elm_spinner', :outfile=>'elm/elm_spinner.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # -- cgit v1.1-2-g2b99