summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-28 16:02:04 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-28 16:02:04 +0100
commit03e3c185d5d3f01ee46eb567218af79480128e89 (patch)
tree73fc8c35e9965c62bde22e06665cbe277735cc84
parent1fa282ad253be5eb8c7149ccb2f107d34b3b3c5b (diff)
downloadffi-efl-03e3c185d5d3f01ee46eb567218af79480128e89.zip
ffi-efl-03e3c185d5d3f01ee46eb567218af79480128e89.tar.gz
parse elm_config.h, generate elm_config.rb
-rw-r--r--lib/efl/elementary_all.rb1
-rw-r--r--lib/efl/native/elm/elm_config.rb103
-rwxr-xr-xtools/genruby.rb2
3 files changed, 104 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb
index 1749649..b6743f8 100644
--- a/lib/efl/elementary_all.rb
+++ b/lib/efl/elementary_all.rb
@@ -19,7 +19,6 @@ require 'efl/elm/elm_check'
require 'efl/elm/elm_clock'
#require 'efl/elm/elm_cnp'
require 'efl/elm/elm_colorselector'
-#require 'efl/elm/elm_config'
#require 'efl/elm/elm_conform'
require 'efl/elm/elm_ctxpopup'
require 'efl/elm/elm_cursor'
diff --git a/lib/efl/native/elm/elm_config.rb b/lib/efl/native/elm/elm_config.rb
new file mode 100644
index 0000000..d1fc955
--- /dev/null
+++ b/lib/efl/native/elm/elm_config.rb
@@ -0,0 +1,103 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmConfig
+ #
+ FCT_PREFIX = 'elm_config_' 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 Eina_Bool elm_config_save(void);
+ [ :elm_config_save, [ ], :bool ],
+ # EAPI void elm_config_reload(void);
+ [ :elm_config_reload, [ ], :void ],
+ # EAPI void elm_config_all_flush(void);
+ [ :elm_config_all_flush, [ ], :void ],
+ # EAPI const char *elm_profile_current_get(void);
+ [ :elm_profile_current_get, [ ], :string ],
+ # EAPI const char *elm_profile_dir_get(const char *profile, Eina_Bool is_user);
+ [ :elm_profile_dir_get, [ :string, :bool ], :string ],
+ # EAPI void elm_profile_dir_free(const char *p_dir);
+ [ :elm_profile_dir_free, [ :string ], :void ],
+ # EAPI Eina_List *elm_profile_list_get(void);
+ [ :elm_profile_list_get, [ ], :eina_list ],
+ # EAPI void elm_profile_list_free(Eina_List *l);
+ [ :elm_profile_list_free, [ :eina_list ], :void ],
+ # EAPI void elm_profile_set(const char *profile);
+ [ :elm_profile_set, [ :string ], :void ],
+ # EAPI Eina_Bool elm_scroll_bounce_enabled_get(void);
+ [ :elm_scroll_bounce_enabled_get, [ ], :bool ],
+ # EAPI void elm_scroll_bounce_enabled_set(Eina_Bool enabled);
+ [ :elm_scroll_bounce_enabled_set, [ :bool ], :void ],
+ # EAPI double elm_scroll_bounce_friction_get(void);
+ [ :elm_scroll_bounce_friction_get, [ ], :double ],
+ # EAPI void elm_scroll_bounce_friction_set(double friction);
+ [ :elm_scroll_bounce_friction_set, [ :double ], :void ],
+ # EAPI double elm_scroll_page_scroll_friction_get(void);
+ [ :elm_scroll_page_scroll_friction_get, [ ], :double ],
+ # EAPI void elm_scroll_page_scroll_friction_set(double friction);
+ [ :elm_scroll_page_scroll_friction_set, [ :double ], :void ],
+ # EAPI double elm_scroll_bring_in_scroll_friction_get(void);
+ [ :elm_scroll_bring_in_scroll_friction_get, [ ], :double ],
+ # EAPI void elm_scroll_bring_in_scroll_friction_set(double friction);
+ [ :elm_scroll_bring_in_scroll_friction_set, [ :double ], :void ],
+ # EAPI double elm_scroll_zoom_friction_get(void);
+ [ :elm_scroll_zoom_friction_get, [ ], :double ],
+ # EAPI void elm_scroll_zoom_friction_set(double friction);
+ [ :elm_scroll_zoom_friction_set, [ :double ], :void ],
+ # EAPI Eina_Bool elm_scroll_thumbscroll_enabled_get(void);
+ [ :elm_scroll_thumbscroll_enabled_get, [ ], :bool ],
+ # EAPI void elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled);
+ [ :elm_scroll_thumbscroll_enabled_set, [ :bool ], :void ],
+ # EAPI unsigned int elm_scroll_thumbscroll_threshold_get(void);
+ [ :elm_scroll_thumbscroll_threshold_get, [ ], :uint ],
+ # EAPI void elm_scroll_thumbscroll_threshold_set(unsigned int threshold);
+ [ :elm_scroll_thumbscroll_threshold_set, [ :uint ], :void ],
+ # EAPI double elm_scroll_thumbscroll_momentum_threshold_get(void);
+ [ :elm_scroll_thumbscroll_momentum_threshold_get, [ ], :double ],
+ # EAPI void elm_scroll_thumbscroll_momentum_threshold_set(double threshold);
+ [ :elm_scroll_thumbscroll_momentum_threshold_set, [ :double ], :void ],
+ # EAPI double elm_scroll_thumbscroll_friction_get(void);
+ [ :elm_scroll_thumbscroll_friction_get, [ ], :double ],
+ # EAPI void elm_scroll_thumbscroll_friction_set(double friction);
+ [ :elm_scroll_thumbscroll_friction_set, [ :double ], :void ],
+ # EAPI double elm_scroll_thumbscroll_border_friction_get(void);
+ [ :elm_scroll_thumbscroll_border_friction_get, [ ], :double ],
+ # EAPI void elm_scroll_thumbscroll_border_friction_set(double friction);
+ [ :elm_scroll_thumbscroll_border_friction_set, [ :double ], :void ],
+ # EAPI double elm_scroll_thumbscroll_sensitivity_friction_get(void);
+ [ :elm_scroll_thumbscroll_sensitivity_friction_get, [ ], :double ],
+ # EAPI void elm_scroll_thumbscroll_sensitivity_friction_set(double friction);
+ [ :elm_scroll_thumbscroll_sensitivity_friction_set, [ :double ], :void ],
+ # EAPI double elm_longpress_timeout_get(void);
+ [ :elm_longpress_timeout_get, [ ], :double ],
+ # EAPI void elm_longpress_timeout_set(double longpress_timeout);
+ [ :elm_longpress_timeout_set, [ :double ], :void ],
+ # EAPI double elm_config_tooltip_delay_get(void);
+ [ :elm_config_tooltip_delay_get, [ ], :double ],
+ # EAPI Eina_Bool elm_config_tooltip_delay_set(double delay);
+ [ :elm_config_tooltip_delay_set, [ :double ], :bool ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 8a71ceb..1aebcbc 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -386,7 +386,7 @@ libs << elm_h('elm_check.h', 'ElmCheck')
libs << elm_h('elm_clock.h', 'ElmClock')
#libs << elm_h('elm_cnp.h', 'ElmCnp')
libs << elm_h('elm_colorselector.h', 'ElmColorSelector')
-#libs << elm_h('elm_config.h', 'ElmConfig')
+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_debug.h', 'ElmDebug')