summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-03-07 09:38:45 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-03-07 09:38:45 +0100
commit0c899cabaa0bb264c7d2c57ae6510d069796dd2d (patch)
tree3fb26f7b909ef88924cf7a14ec643a3694ecf2d1
parent05c5bc859f299c50f281fd39accb852e6ed3ad47 (diff)
downloadffi-efl-0c899cabaa0bb264c7d2c57ae6510d069796dd2d.zip
ffi-efl-0c899cabaa0bb264c7d2c57ae6510d069796dd2d.tar.gz
add elm_datetime
-rw-r--r--lib/efl/elm/elm_datetime.rb22
-rw-r--r--lib/efl/native/elm/elm_datetime.rb64
-rwxr-xr-xtools/extract-api.sh1
-rwxr-xr-xtools/genruby.rb1
4 files changed, 88 insertions, 0 deletions
diff --git a/lib/efl/elm/elm_datetime.rb b/lib/efl/elm/elm_datetime.rb
new file mode 100644
index 0000000..22682c4
--- /dev/null
+++ b/lib/efl/elm/elm_datetime.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_datetime'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmDatetime < ElmObject
+ #
+ include Helper
+ constructor :elm_datetime_add
+ search_prefixes 'elm_datetime_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/elm/elm_datetime.rb b/lib/efl/native/elm/elm_datetime.rb
new file mode 100644
index 0000000..a84e67a
--- /dev/null
+++ b/lib/efl/native/elm/elm_datetime.rb
@@ -0,0 +1,64 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmDatetime
+ #
+ FCT_PREFIX = 'elm_datetime_' 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_Datetime_Field_Type {...} Elm_Datetime_Field_Type;
+ enum :elm_datetime_field_type, [ :elm_datetime_year, 0, :elm_datetime_month, 1, :elm_datetime_date, 2, :elm_datetime_hour, 3,
+ :elm_datetime_minute, 4, :elm_datetime_ampm, 5 ]
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI Evas_Object *elm_datetime_add(Evas_Object *parent);
+ [ :elm_datetime_add, [ :evas_object ], :evas_object ],
+ # EAPI const char *elm_datetime_format_get(const Evas_Object *obj);
+ [ :elm_datetime_format_get, [ :evas_object ], :string ],
+ # EAPI void elm_datetime_format_set(Evas_Object *obj, const char *fmt);
+ [ :elm_datetime_format_set, [ :evas_object, :string ], :void ],
+ # EAPI Eina_Bool elm_datetime_value_max_get(const Evas_Object *obj, struct tm *maxtime);
+ [ :elm_datetime_value_max_get, [ :evas_object, :pointer ], :bool ],
+ # EAPI Eina_Bool elm_datetime_value_max_set(Evas_Object *obj, const struct tm *maxtime);
+ [ :elm_datetime_value_max_set, [ :evas_object, :pointer ], :bool ],
+ # EAPI Eina_Bool elm_datetime_value_min_get(const Evas_Object *obj, struct tm *mintime);
+ [ :elm_datetime_value_min_get, [ :evas_object, :pointer ], :bool ],
+ # EAPI Eina_Bool elm_datetime_value_min_set(Evas_Object *obj, const struct tm *mintime);
+ [ :elm_datetime_value_min_set, [ :evas_object, :pointer ], :bool ],
+ # EAPI void elm_datetime_field_limit_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, int *min, int *max);
+ [ :elm_datetime_field_limit_get, [ :evas_object, :elm_datetime_field_type, :pointer, :pointer ], :void ],
+ # EAPI void elm_datetime_field_limit_set(Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, int min, int max);
+ [ :elm_datetime_field_limit_set, [ :evas_object, :elm_datetime_field_type, :int, :int ], :void ],
+ # EAPI Eina_Bool elm_datetime_value_get(const Evas_Object *obj, struct tm *currtime);
+ [ :elm_datetime_value_get, [ :evas_object, :pointer ], :bool ],
+ # EAPI Eina_Bool elm_datetime_value_set(Evas_Object *obj, const struct tm *newtime);
+ [ :elm_datetime_value_set, [ :evas_object, :pointer ], :bool ],
+ # EAPI Eina_Bool elm_datetime_field_visible_get(const Evas_Object *obj, Elm_Datetime_Field_Type fieldtype);
+ [ :elm_datetime_field_visible_get, [ :evas_object, :elm_datetime_field_type ], :bool ],
+ # EAPI void elm_datetime_field_visible_set(Evas_Object *obj, Elm_Datetime_Field_Type fieldtype, Eina_Bool visible);
+ [ :elm_datetime_field_visible_set, [ :evas_object, :elm_datetime_field_type, :bool ], :void ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/extract-api.sh b/tools/extract-api.sh
index 294c600..ec12573 100755
--- a/tools/extract-api.sh
+++ b/tools/extract-api.sh
@@ -72,6 +72,7 @@ for header in \
"${INCLUDE}/elementary-0/elm_config.h" \
"${INCLUDE}/elementary-0/elm_conform.h" \
"${INCLUDE}/elementary-0/elm_cursor.h" \
+ "${INCLUDE}/elementary-0/elm_datetime.h" \
"${INCLUDE}/elementary-0/elm_debug.h" \
"${INCLUDE}/elementary-0/elm_diskselector.h" \
"${INCLUDE}/elementary-0/elm_entry.h" \
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 2be069b..63ede50 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -389,6 +389,7 @@ libs << elm_h('elm_colorselector.h', 'ElmColorSelector')
libs << elm_h('elm_config.h', 'ElmConfig')
libs << elm_h('elm_conform.h', 'ElmConform')
libs << elm_h('elm_cursor.h', 'ElmCursor')
+libs << elm_h('elm_datetime.h', 'ElmDatetime')
libs << elm_h('elm_debug.h', 'ElmDebug')
libs << elm_h('elm_diskselector.h', 'ElmDiskSelector', ["#{NATIVE}/elementary","#{NATIVE}/elm/elm_scroller"])
libs << elm_h('elm_finger.h', 'ElmFinger')