summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-28 15:55:50 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-28 15:55:50 +0100
commit06ea8f41dfe38ffc35098362ee7f754a014fa481 (patch)
tree35ed6417b02436f7b94ac134d590ba64889c8d6c
parentf5cb496712682132aee5a2157e4865fa51f8a1a9 (diff)
downloadffi-efl-06ea8f41dfe38ffc35098362ee7f754a014fa481.zip
ffi-efl-06ea8f41dfe38ffc35098362ee7f754a014fa481.tar.gz
parse elm_app.h, generate elm_app.rb
-rw-r--r--lib/efl/elementary_all.rb1
-rw-r--r--lib/efl/native/elm/elm_app.rb53
-rwxr-xr-xtools/genruby.rb2
3 files changed, 54 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb
index 2b58292..8052c50 100644
--- a/lib/efl/elementary_all.rb
+++ b/lib/efl/elementary_all.rb
@@ -10,7 +10,6 @@ require 'efl/elm/elm_object_item'
require 'efl/elm/elm_actionslider'
require 'efl/elm/elm_anchorblock'
require 'efl/elm/elm_anchorview'
-#require 'efl/elm/elm_app'
require 'efl/elm/elm_bg'
require 'efl/elm/elm_box'
require 'efl/elm/elm_bubble'
diff --git a/lib/efl/native/elm/elm_app.rb b/lib/efl/native/elm/elm_app.rb
new file mode 100644
index 0000000..ca63de7
--- /dev/null
+++ b/lib/efl/native/elm/elm_app.rb
@@ -0,0 +1,53 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmApp
+ #
+ FCT_PREFIX = 'elm_app_' 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 void elm_app_info_set(void *mainfunc, const char *dom, const char *checkfile);
+ [ :elm_app_info_set, [ :pointer, :string, :string ], :void ],
+ # EAPI void elm_app_compile_bin_dir_set(const char *dir);
+ [ :elm_app_compile_bin_dir_set, [ :string ], :void ],
+ # EAPI void elm_app_compile_lib_dir_set(const char *dir);
+ [ :elm_app_compile_lib_dir_set, [ :string ], :void ],
+ # EAPI void elm_app_compile_data_dir_set(const char *dir);
+ [ :elm_app_compile_data_dir_set, [ :string ], :void ],
+ # EAPI void elm_app_compile_locale_set(const char *dir);
+ [ :elm_app_compile_locale_set, [ :string ], :void ],
+ # EAPI const char *elm_app_prefix_dir_get(void);
+ [ :elm_app_prefix_dir_get, [ ], :string ],
+ # EAPI const char *elm_app_bin_dir_get(void);
+ [ :elm_app_bin_dir_get, [ ], :string ],
+ # EAPI const char *elm_app_lib_dir_get(void);
+ [ :elm_app_lib_dir_get, [ ], :string ],
+ # EAPI const char *elm_app_data_dir_get(void);
+ [ :elm_app_data_dir_get, [ ], :string ],
+ # EAPI const char *elm_app_locale_dir_get(void);
+ [ :elm_app_locale_dir_get, [ ], :string ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/genruby.rb b/tools/genruby.rb
index cd24f08..a4bcf58 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -375,7 +375,7 @@ libs << elm_h('elc_hoversel.h', 'ElmHoverSel', ["#{NATIVE}/elementary","#{NATIVE
libs << elm_h('elc_multibuttonentry.h', 'ElmMultiButtonEntry')
libs << elm_h('elc_naviframe.h', 'ElmNaviFrame')
libs << elm_h('elm_actionslider.h', 'ElmActionSlider')
-#libs << elm_h('elm_app.h', 'ElmApp')
+libs << elm_h('elm_app.h', 'ElmApp')
libs << elm_h('elm_bg.h', 'ElmBg')
libs << elm_h('elm_box.h', 'ElmBox')
libs << elm_h('elm_bubble.h', 'ElmBubble')