From 933dba43784b4b86e479f4206edf0cccc1eaf7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 7 Mar 2012 09:33:01 +0100 Subject: add elm_dayselector --- lib/efl/elm/elm_dayselector.rb | 22 ++++++++++++++ lib/efl/native/elm/elm_dayselector.rb | 56 +++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 1 + 4 files changed, 80 insertions(+) create mode 100644 lib/efl/elm/elm_dayselector.rb create mode 100644 lib/efl/native/elm/elm_dayselector.rb diff --git a/lib/efl/elm/elm_dayselector.rb b/lib/efl/elm/elm_dayselector.rb new file mode 100644 index 0000000..7f02688 --- /dev/null +++ b/lib/efl/elm/elm_dayselector.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_dayselector' +# +module Efl + # + module Elm + # + class ElmDaySelector < ElmObject + # + include Helper + constructor :elm_dayselector_add + search_prefixes 'elm_dayselector_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_dayselector.rb b/lib/efl/native/elm/elm_dayselector.rb new file mode 100644 index 0000000..1c926b4 --- /dev/null +++ b/lib/efl/native/elm/elm_dayselector.rb @@ -0,0 +1,56 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmDaySelector + # + FCT_PREFIX = 'elm_dayselector_' 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_Dayselector_Day; + enum :elm_dayselector_day, [ :elm_dayselector_sun, 0, :elm_dayselector_mon, 1, :elm_dayselector_tue, 2, :elm_dayselector_wed, 3, + :elm_dayselector_thu, 4, :elm_dayselector_fri, 5, :elm_dayselector_sat, 6, :elm_dayselector_max, 7 ] + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent); + [ :elm_dayselector_add, [ :evas_object ], :evas_object ], + # EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected); + [ :elm_dayselector_day_selected_set, [ :evas_object, :elm_dayselector_day, :bool ], :void ], + # EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day); + [ :elm_dayselector_day_selected_get, [ :evas_object, :elm_dayselector_day ], :bool ], + # EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day); + [ :elm_dayselector_week_start_set, [ :evas_object, :elm_dayselector_day ], :void ], + # EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj); + [ :elm_dayselector_week_start_get, [ :evas_object ], :elm_dayselector_day ], + # EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day); + [ :elm_dayselector_weekend_start_set, [ :evas_object, :elm_dayselector_day ], :void ], + # EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj); + [ :elm_dayselector_weekend_start_get, [ :evas_object ], :elm_dayselector_day ], + # EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length); + [ :elm_dayselector_weekend_length_set, [ :evas_object, :uint ], :void ], + # EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj); + [ :elm_dayselector_weekend_length_get, [ :evas_object ], :uint ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 0ac4f2f..895011a 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -48,6 +48,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_object.h" \ "${INCLUDE}/elementary-0/elm_object_item.h" \ "${INCLUDE}/elementary-0/elc_ctxpopup.h" \ + "${INCLUDE}/elementary-0/elc_dayselector.h" \ "${INCLUDE}/elementary-0/elc_fileselector_button.h" \ "${INCLUDE}/elementary-0/elc_fileselector_entry.h" \ "${INCLUDE}/elementary-0/elc_fileselector.h" \ diff --git a/tools/genruby.rb b/tools/genruby.rb index ed0a6ab..938eef9 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -366,6 +366,7 @@ libs << elm_h('elm_scroller.h', 'ElmScroller') libs << elm_h('elm_entry.h', 'ElmEntry', ["#{NATIVE}/edje","#{NATIVE}/elementary","#{NATIVE}/elm/elm_icon","#{NATIVE}/elm/elm_scroller"]) libs << elm_h('elm_list.h', 'ElmList', ["#{NATIVE}/elementary","#{NATIVE}/elm/elm_scroller"]) libs << elm_h('elc_ctxpopup.h', 'ElmCtxPopup') +libs << elm_h('elc_dayselector.h', 'ElmDaySelector') libs << elm_h('elc_fileselector_button.h', 'ElmFileSelectorButton') libs << elm_h('elc_fileselector_entry.h', 'ElmFileSelectorEntry') libs << elm_h('elc_fileselector.h', 'ElmFileSelector') -- cgit v1.1-2-g2b99