summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-28 16:01:03 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-28 16:01:03 +0100
commit1fa282ad253be5eb8c7149ccb2f107d34b3b3c5b (patch)
tree24cc83ee54855f93540356da8607ec493827f9e8
parent2ad7f52482cdb8f268ec1e3b5558853cf0d790ef (diff)
downloadffi-efl-1fa282ad253be5eb8c7149ccb2f107d34b3b3c5b.zip
ffi-efl-1fa282ad253be5eb8c7149ccb2f107d34b3b3c5b.tar.gz
parse elm_cache.h, generate elm_cache.rb
-rw-r--r--lib/efl/elementary_all.rb1
-rw-r--r--lib/efl/native/elm/elm_cache.rb59
-rwxr-xr-xtools/genruby.rb2
3 files changed, 60 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb
index c8c467d..1749649 100644
--- a/lib/efl/elementary_all.rb
+++ b/lib/efl/elementary_all.rb
@@ -14,7 +14,6 @@ require 'efl/elm/elm_bg'
require 'efl/elm/elm_box'
require 'efl/elm/elm_bubble'
require 'efl/elm/elm_button'
-#require 'efl/elm/elm_cache'
require 'efl/elm/elm_calendar'
require 'efl/elm/elm_check'
require 'efl/elm/elm_clock'
diff --git a/lib/efl/native/elm/elm_cache.rb b/lib/efl/native/elm/elm_cache.rb
new file mode 100644
index 0000000..b3d51de
--- /dev/null
+++ b/lib/efl/native/elm/elm_cache.rb
@@ -0,0 +1,59 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmCache
+ #
+ FCT_PREFIX = 'elm_cache_' 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_cache_all_flush(void);
+ [ :elm_cache_all_flush, [ ], :void ],
+ # EAPI int elm_cache_flush_interval_get(void);
+ [ :elm_cache_flush_interval_get, [ ], :int ],
+ # EAPI void elm_cache_flush_interval_set(int size);
+ [ :elm_cache_flush_interval_set, [ :int ], :void ],
+ # EAPI Eina_Bool elm_cache_flush_enabled_get(void);
+ [ :elm_cache_flush_enabled_get, [ ], :bool ],
+ # EAPI void elm_cache_flush_enabled_set(Eina_Bool enabled);
+ [ :elm_cache_flush_enabled_set, [ :bool ], :void ],
+ # EAPI int elm_font_cache_get(void);
+ [ :elm_font_cache_get, [ ], :int ],
+ # EAPI void elm_font_cache_set(int size);
+ [ :elm_font_cache_set, [ :int ], :void ],
+ # EAPI int elm_image_cache_get(void);
+ [ :elm_image_cache_get, [ ], :int ],
+ # EAPI void elm_image_cache_set(int size);
+ [ :elm_image_cache_set, [ :int ], :void ],
+ # EAPI int elm_edje_file_cache_get(void);
+ [ :elm_edje_file_cache_get, [ ], :int ],
+ # EAPI void elm_edje_file_cache_set(int size);
+ [ :elm_edje_file_cache_set, [ :int ], :void ],
+ # EAPI int elm_edje_collection_cache_get(void);
+ [ :elm_edje_collection_cache_get, [ ], :int ],
+ # EAPI void elm_edje_collection_cache_set(int size);
+ [ :elm_edje_collection_cache_set, [ :int ], :void ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 3dbf494..8a71ceb 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -380,7 +380,7 @@ libs << elm_h('elm_bg.h', 'ElmBg')
libs << elm_h('elm_box.h', 'ElmBox')
libs << elm_h('elm_bubble.h', 'ElmBubble')
libs << elm_h('elm_button.h', 'ElmButton')
-#libs << elm_h('elm_cache.h', 'ElmCache')
+libs << elm_h('elm_cache.h', 'ElmCache')
libs << elm_h('elm_calendar.h', 'ElmCalendar')
libs << elm_h('elm_check.h', 'ElmCheck')
libs << elm_h('elm_clock.h', 'ElmClock')