summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/efl/elm/elm_calendar.rb22
-rw-r--r--lib/efl/native/elm/elm_calendar.rb76
-rwxr-xr-xtools/extract-api.sh1
-rwxr-xr-xtools/genruby.rb5
4 files changed, 104 insertions, 0 deletions
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)
#