diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efl/native/elm/elm_general.rb | 104 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_tooltip.rb | 63 |
2 files changed, 167 insertions, 0 deletions
diff --git a/lib/efl/native/elm/elm_general.rb b/lib/efl/native/elm/elm_general.rb new file mode 100644 index 0000000..71b61e2 --- /dev/null +++ b/lib/efl/native/elm/elm_general.rb @@ -0,0 +1,104 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module Elm + # + FCT_PREFIX = 'elm_' 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_Object_Layer; + enum :elm_object_layer, [ :elm_object_layer_background, EVAS_LAYER_MIN+64, :elm_object_layer_default, 0, :elm_object_layer_focus, + EVAS_LAYER_MAX-128, :elm_object_layer_tooltip, EVAS_LAYER_MAX-64, :elm_object_layer_cursor, EVAS_LAYER_MAX-32, :elm_object_layer_last, 32736 ] + # typedef enum {...} Elm_Policy; + enum :elm_policy, [ :elm_policy_quit, :elm_policy_last ] + # typedef enum {...} Elm_Policy_Quit; + enum :elm_policy_quit, [ :elm_policy_quit_none, 0, :elm_policy_quit_last_window_closed, 1 ] + # typedef enum {...} Elm_Focus_Direction; + enum :elm_focus_direction, [ :elm_focus_previous, :elm_focus_next ] + # + # TYPEDEFS + # typedef struct _Elm_Event_Policy_Changed Elm_Event_Policy_Changed; + typedef :pointer, :elm_event_policy_changed + # typedef struct _Elm_Object_Item Elm_Object_Item; + typedef :pointer, :elm_object_item + # + # CALLBACKS + # typedef Eina_Bool (*Elm_Event_Cb) (void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info); + callback :elm_event_cb, [ :pointer, :evas_object, :evas_object, :evas_callback_type, :pointer ], :bool + # + # VARIABLES + # EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT; + attach_variable :ELM_ECORE_EVENT_ETHUMB_CONNECT, :int + # EAPI extern int ELM_EVENT_CONFIG_ALL_CHANGED; + attach_variable :ELM_EVENT_CONFIG_ALL_CHANGED, :int + # EAPI extern int ELM_EVENT_POLICY_CHANGED; + attach_variable :ELM_EVENT_POLICY_CHANGED, :int + # + # FUNCTIONS + fcts = [ + # EAPI int elm_init(int argc, char **argv); + [ :elm_init, [ :int, :pointer ], :int ], + # EAPI int elm_shutdown(void); + [ :elm_shutdown, [ ], :int ], + # EAPI void elm_run(void); + [ :elm_run, [ ], :void ], + # EAPI void elm_exit(void); + [ :elm_exit, [ ], :void ], + # EAPI void elm_quicklaunch_mode_set(Eina_Bool ql_on); + [ :elm_quicklaunch_mode_set, [ :bool ], :void ], + # EAPI Eina_Bool elm_quicklaunch_mode_get(void); + [ :elm_quicklaunch_mode_get, [ ], :bool ], + # EAPI int elm_quicklaunch_init(int argc, char **argv); + [ :elm_quicklaunch_init, [ :int, :pointer ], :int ], + # EAPI int elm_quicklaunch_sub_init(int argc, char **argv); + [ :elm_quicklaunch_sub_init, [ :int, :pointer ], :int ], + # EAPI int elm_quicklaunch_sub_shutdown(void); + [ :elm_quicklaunch_sub_shutdown, [ ], :int ], + # EAPI int elm_quicklaunch_shutdown(void); + [ :elm_quicklaunch_shutdown, [ ], :int ], + # EAPI void elm_quicklaunch_seed(void); + [ :elm_quicklaunch_seed, [ ], :void ], + # EAPI Eina_Bool elm_quicklaunch_prepare(int argc, char **argv); + [ :elm_quicklaunch_prepare, [ :int, :pointer ], :bool ], + # EAPI Eina_Bool elm_quicklaunch_fork(int argc, char **argv, char *cwd, void (postfork_func) (void *data), void *postfork_data); + # FIXME + # EAPI void elm_quicklaunch_cleanup(void); + [ :elm_quicklaunch_cleanup, [ ], :void ], + # EAPI int elm_quicklaunch_fallback(int argc, char **argv); + [ :elm_quicklaunch_fallback, [ :int, :pointer ], :int ], + # EAPI char *elm_quicklaunch_exe_path_get(const char *exe); + [ :elm_quicklaunch_exe_path_get, [ :string ], :string ], + # EAPI Eina_Bool elm_policy_set(unsigned int policy, int value); + [ :elm_policy_set, [ :uint, :int ], :bool ], + # EAPI int elm_policy_get(unsigned int policy); + [ :elm_policy_get, [ :uint ], :int ], + # EAPI void elm_language_set(const char *lang); + [ :elm_language_set, [ :string ], :void ], + # EAPI void elm_object_domain_translatable_text_part_set(Evas_Object *obj, const char *part, const char *domain, const char *text); + [ :elm_object_domain_translatable_text_part_set, [ :evas_object, :string, :string, :string ], :void ], + # EAPI const char *elm_object_translatable_text_part_get(const Evas_Object *obj, const char *part); + [ :elm_object_translatable_text_part_get, [ :evas_object, :string ], :string ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_tooltip.rb b/lib/efl/native/elm/elm_tooltip.rb new file mode 100644 index 0000000..68774a6 --- /dev/null +++ b/lib/efl/native/elm/elm_tooltip.rb @@ -0,0 +1,63 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module Elm + # + FCT_PREFIX = 'elm_' 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' + # + # CALLBACKS + # typedef Evas_Object *(*Elm_Tooltip_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip); + callback :elm_tooltip_content_cb, [ :pointer, :evas_object, :evas_object ], :evas_object + # typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb) (void *data, Evas_Object *obj, Evas_Object *tooltip, void *item); + callback :elm_tooltip_item_content_cb, [ :pointer, :evas_object, :evas_object, :pointer ], :evas_object + # + # FUNCTIONS + fcts = [ + # EAPI double elm_tooltip_delay_get(void); + [ :elm_tooltip_delay_get, [ ], :double ], + # EAPI Eina_Bool elm_tooltip_delay_set(double delay); + [ :elm_tooltip_delay_set, [ :double ], :bool ], + # EAPI void elm_object_tooltip_show(Evas_Object *obj); + [ :elm_object_tooltip_show, [ :evas_object ], :void ], + # EAPI void elm_object_tooltip_hide(Evas_Object *obj); + [ :elm_object_tooltip_hide, [ :evas_object ], :void ], + # EAPI void elm_object_tooltip_text_set(Evas_Object *obj, const char *text); + [ :elm_object_tooltip_text_set, [ :evas_object, :string ], :void ], + # EAPI void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text); + [ :elm_object_tooltip_domain_translatable_text_set, [ :evas_object, :string, :string ], :void ], + # EAPI void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb); + [ :elm_object_tooltip_content_cb_set, [ :evas_object, :elm_tooltip_content_cb, :pointer, :evas_smart_cb ], :void ], + # EAPI void elm_object_tooltip_unset(Evas_Object *obj); + [ :elm_object_tooltip_unset, [ :evas_object ], :void ], + # EAPI void elm_object_tooltip_style_set(Evas_Object *obj, const char *style); + [ :elm_object_tooltip_style_set, [ :evas_object, :string ], :void ], + # EAPI const char *elm_object_tooltip_style_get(const Evas_Object *obj); + [ :elm_object_tooltip_style_get, [ :evas_object ], :string ], + # EAPI Eina_Bool elm_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable); + [ :elm_object_tooltip_window_mode_set, [ :evas_object, :bool ], :bool ], + # EAPI Eina_Bool elm_object_tooltip_window_mode_get(const Evas_Object *obj); + [ :elm_object_tooltip_window_mode_get, [ :evas_object ], :bool ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF |