summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-12-21 15:17:29 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-12-21 15:17:29 +0100
commitb87330fde342aaf30a7c8430f9cc2dc94bea6e3b (patch)
tree963141105f7136e5653e8d89ebe69e9ceb0abcd7
parenteae546be86e05e3440a099df50b431a8e889277d (diff)
downloadffi-efl-b87330fde342aaf30a7c8430f9cc2dc94bea6e3b.zip
ffi-efl-b87330fde342aaf30a7c8430f9cc2dc94bea6e3b.tar.gz
generate efreet_icon native binding
-rw-r--r--lib/efl/native/efreet_icon.rb77
-rwxr-xr-xtools/extract-api.sh1
-rwxr-xr-xtools/genruby.rb1
3 files changed, 79 insertions, 0 deletions
diff --git a/lib/efl/native/efreet_icon.rb b/lib/efl/native/efreet_icon.rb
new file mode 100644
index 0000000..1977f3b
--- /dev/null
+++ b/lib/efl/native/efreet_icon.rb
@@ -0,0 +1,77 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/eina_list'
+#
+module Efl
+ #
+ module Efreet
+ #
+ FCT_PREFIX = 'efreet_icon_' 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 'efreet'
+ #
+ # ENUMS
+ # typedef enum Efreet_Icon_Theme_Context {...} Efreet_Icon_Theme_Context;
+ enum :efreet_icon_theme_context, [ :efreet_icon_theme_context_none, :efreet_icon_theme_context_actions, :efreet_icon_theme_context_devices,
+ :efreet_icon_theme_context_filesystems, :efreet_icon_theme_context_mimetypes ]
+ # typedef enum Efreet_Icon_Size_Type {...} Efreet_Icon_Size_Type;
+ enum :efreet_icon_size_type, [ :efreet_icon_size_type_none, :efreet_icon_size_type_fixed, :efreet_icon_size_type_scalable,
+ :efreet_icon_size_type_threshold ]
+ #
+ # TYPEDEFS
+ # typedef struct Efreet_Icon_Theme Efreet_Icon_Theme;
+ typedef :pointer, :efreet_icon_theme
+ # typedef struct Efreet_Icon_Theme_Directory Efreet_Icon_Theme_Directory;
+ typedef :pointer, :efreet_icon_theme_directory
+ # typedef struct Efreet_Icon Efreet_Icon;
+ typedef :pointer, :efreet_icon
+ # typedef struct Efreet_Icon_Point Efreet_Icon_Point;
+ typedef :pointer, :efreet_icon_point
+ #
+ # VARIABLES
+ # EAPI extern int EFREET_EVENT_ICON_CACHE_UPDATE;
+ attach_variable :EFREET_EVENT_ICON_CACHE_UPDATE, :int
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI const char *efreet_icon_user_dir_get(void);
+ [ :efreet_icon_user_dir_get, [ ], :string ],
+ # EAPI const char *efreet_icon_deprecated_user_dir_get(void);
+ [ :efreet_icon_deprecated_user_dir_get, [ ], :string ],
+ # EAPI void efreet_icon_extension_add(const char *ext);
+ [ :efreet_icon_extension_add, [ :string ], :void ],
+ # EAPI Eina_List **efreet_icon_extra_list_get(void);
+ [ :efreet_icon_extra_list_get, [ ], :eina_list ],
+ # EAPI Eina_List *efreet_icon_extensions_list_get(void);
+ [ :efreet_icon_extensions_list_get, [ ], :eina_list ],
+ # EAPI Eina_List *efreet_icon_theme_list_get(void);
+ [ :efreet_icon_theme_list_get, [ ], :eina_list ],
+ # EAPI Efreet_Icon_Theme *efreet_icon_theme_find(const char *theme_name);
+ [ :efreet_icon_theme_find, [ :string ], :efreet_icon_theme ],
+ # EAPI Efreet_Icon *efreet_icon_find(const char *theme_name, const char *icon, unsigned int size);
+ [ :efreet_icon_find, [ :string, :string, :uint ], :efreet_icon ],
+ # EAPI const char *efreet_icon_list_find(const char *theme_name, Eina_List *icons, unsigned int size);
+ [ :efreet_icon_list_find, [ :string, :eina_list, :uint ], :string ],
+ # EAPI const char *efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int size);
+ [ :efreet_icon_path_find, [ :string, :string, :uint ], :string ],
+ # EAPI void efreet_icon_free(Efreet_Icon *icon);
+ [ :efreet_icon_free, [ :efreet_icon ], :void ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/extract-api.sh b/tools/extract-api.sh
index 50ec01e..a19a8db 100755
--- a/tools/extract-api.sh
+++ b/tools/extract-api.sh
@@ -48,6 +48,7 @@ for header in \
"${INCLUDE}/edje-1/Edje.h" \
"${INCLUDE}/efreet-1/Efreet.h" \
"${INCLUDE}/efreet-1/efreet_base.h" \
+ "${INCLUDE}/efreet-1/efreet_icon.h" \
"${INCLUDE}/ethumb-1/Ethumb.h" \
"${INCLUDE}/ethumb-1/Ethumb_Client.h" \
"${INCLUDE}/ethumb-1/Ethumb_Plugin.h" \
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 339257a..f28f7ca 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -295,6 +295,7 @@ libs << efl_h('embryo','Embryo.h','Embryo')
libs << efl_h('edje','Edje.h','Edje',nil,nil,["#{NATIVE}/evas"])
libs << efl_h('efreet','Efreet.h','Efreet')
libs << efl_h('efreet','efreet_base.h','Efreet',nil,nil,["#{NATIVE}/eina_list"])
+libs << efl_h('efreet','efreet_icon.h','Efreet','efreet_icon',nil,["#{NATIVE}/eina_list"])
libs << efl_h('ethumb','Ethumb.h','Ethumb')
libs << efl_h('ethumb_client','Ethumb_Client.h','EthumbClient',nil,nil,["#{NATIVE}/ethumb"])
libs << efl_h('ethumb','Ethumb_Plugin.h','EthumbPlugin',nil,nil,["#{NATIVE}/evas","#{NATIVE}/ecore_evas","#{NATIVE}/ethumb"])