From 6b6401d08d3fd71fa09b59aa9a2f6ca7d1421e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 21 Dec 2012 15:36:53 +0100 Subject: generate efreet_trash native binding --- lib/efl/native/efreet_trash.rb | 48 ++++++++++++++++++++++++++++++++++++++++++ tools/extract-api.sh | 1 + tools/genruby.rb | 1 + 3 files changed, 50 insertions(+) create mode 100644 lib/efl/native/efreet_trash.rb diff --git a/lib/efl/native/efreet_trash.rb b/lib/efl/native/efreet_trash.rb new file mode 100644 index 0000000..c933037 --- /dev/null +++ b/lib/efl/native/efreet_trash.rb @@ -0,0 +1,48 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/eina_list' +require 'efl/native/efreet_uri' +# +module Efl + # + module EfreetTrash + # + FCT_PREFIX = 'efreet_trash_' 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_trash' + # + # FUNCTIONS + fcts = [ + # EAPI int efreet_trash_init(void); + [ :efreet_trash_init, [ ], :int ], + # EAPI int efreet_trash_shutdown(void); + [ :efreet_trash_shutdown, [ ], :int ], + # EAPI const char *efreet_trash_dir_get(const char *for_file); + [ :efreet_trash_dir_get, [ :string ], :string ], + # EAPI int efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete); + [ :efreet_trash_delete_uri, [ :efreet_uri, :int ], :int ], + # EAPI Eina_List *efreet_trash_ls(void); + [ :efreet_trash_ls, [ ], :eina_list ], + # EAPI int efreet_trash_is_empty(void); + [ :efreet_trash_is_empty, [ ], :int ], + # EAPI int efreet_trash_empty_trash(void); + [ :efreet_trash_empty_trash, [ ], :int ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 9e92b0d..5ddefa4 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -53,6 +53,7 @@ for header in \ "${INCLUDE}/efreet-1/efreet_menu.h" \ "${INCLUDE}/efreet-1/efreet_uri.h" \ "${INCLUDE}/efreet-1/Efreet_Mime.h" \ + "${INCLUDE}/efreet-1/Efreet_Trash.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 54ddb3b..ce67cc2 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -300,6 +300,7 @@ libs << efl_h('efreet','efreet_desktop.h','EfreetDesktop','efreet_desktop',nil,[ libs << efl_h('efreet','efreet_menu.h','EfreetMenu','efreet_menu',nil,["#{NATIVE}/efreet_desktop"]) libs << efl_h('efreet','efreet_uri.h','EfreetUri','efreet_uri') libs << efl_h('efreet_mime','Efreet_Mime.h','EfreetMime') +libs << efl_h('efreet_trash','Efreet_Trash.h','EfreetTrash',nil,nil,["#{NATIVE}/eina_list","#{NATIVE}/efreet_uri"]) 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"]) -- cgit v1.1-2-g2b99