From 98d55fbd699d281dc416990eb55a5d876c9d12d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 29 Feb 2012 17:20:58 +0100 Subject: parse elm_engine.h, generate elm_engine.rb --- lib/efl/elementary_all.rb | 1 - lib/efl/native/elm/elm_engine.rb | 41 ++++++++++++++++++++++++++++++++++++++++ tools/genruby.rb | 2 +- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 lib/efl/native/elm/elm_engine.rb diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 60eaec1..e41a38b 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -24,7 +24,6 @@ require 'efl/elm/elm_ctxpopup' require 'efl/elm/elm_cursor' require 'efl/elm/elm_debug' require 'efl/elm/elm_diskselector' -#require 'efl/elm/elm_engine' require 'efl/elm/elm_entry' #require 'efl/elm/elm_factory' require 'efl/elm/elm_fileselector_button' diff --git a/lib/efl/native/elm/elm_engine.rb b/lib/efl/native/elm/elm_engine.rb new file mode 100644 index 0000000..5690d7b --- /dev/null +++ b/lib/efl/native/elm/elm_engine.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmEngine + # + FCT_PREFIX = 'elm_engine_' 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 const char *elm_engine_get(void); + [ :elm_engine_get, [ ], :string ], + # EAPI void elm_engine_set(const char *engine); + [ :elm_engine_set, [ :string ], :void ], + # EAPI const char *elm_preferred_engine_get(void); + [ :elm_preferred_engine_get, [ ], :string ], + # EAPI void elm_preferred_engine_set(const char *engine); + [ :elm_preferred_engine_set, [ :string ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/genruby.rb b/tools/genruby.rb index 9b4598b..41b59b2 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -391,7 +391,7 @@ libs << elm_h('elm_conform.h', 'ElmConform') libs << elm_h('elm_cursor.h', 'ElmCursor') libs << elm_h('elm_debug.h', 'ElmDebug') libs << elm_h('elm_diskselector.h', 'ElmDiskSelector', ["#{NATIVE}/elementary","#{NATIVE}/elm/elm_scroller"]) -#libs << elm_h('elm_engine.h', 'ElmEngine') +libs << elm_h('elm_engine.h', 'ElmEngine') #libs << elm_h('elm_factory.h', 'ElmFactory') libs << elm_h('elm_finger.h', 'ElmFinger') libs << elm_h('elm_flip.h', 'ElmFlip') -- cgit v1.1-2-g2b99