diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-28 14:15:18 +0100 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-28 14:15:18 +0100 | 
| commit | fad4672dc913b4c61492179bc4eb10746f8e1dbf (patch) | |
| tree | 3912d943dd0b5c3619c377e31d53f8551d4e45ea | |
| parent | 9317a29c12a0241c737f6ad62f55d25667aa5e95 (diff) | |
| download | ffi-efl-fad4672dc913b4c61492179bc4eb10746f8e1dbf.zip ffi-efl-fad4672dc913b4c61492179bc4eb10746f8e1dbf.tar.gz | |
parse elm_thumb.h, generate elm_thumb.rb
| -rw-r--r-- | lib/efl/elementary_all.rb | 2 | ||||
| -rw-r--r-- | lib/efl/elm/elm_thumb.rb | 22 | ||||
| -rw-r--r-- | lib/efl/native/elm/elm_thumb.rb | 60 | ||||
| -rwxr-xr-x | tools/genruby.rb | 2 | 
4 files changed, 84 insertions, 2 deletions
| diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index ed1e1db..d1a9713 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -80,7 +80,7 @@ require 'efl/elm/elm_spinner'  #require 'efl/elm/elm_store'  require 'efl/elm/elm_table'  require 'efl/elm/elm_theme' -#require 'efl/elm/elm_thumb' +require 'efl/elm/elm_thumb'  require 'efl/elm/elm_toolbar'  #require 'efl/elm/elm_transit'  #require 'efl/elm/elm_video' diff --git a/lib/efl/elm/elm_thumb.rb b/lib/efl/elm/elm_thumb.rb new file mode 100644 index 0000000..6919d45 --- /dev/null +++ b/lib/efl/elm/elm_thumb.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_thumb' +# +module Efl +    # +    module Elm +        # +        class ElmThumb < ElmObject +            # +            include Helper +            constructor :elm_thumb_add +            search_prefixes 'elm_thumb_' +            # +        end +        # +    end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_thumb.rb b/lib/efl/native/elm/elm_thumb.rb new file mode 100644 index 0000000..271b52a --- /dev/null +++ b/lib/efl/native/elm/elm_thumb.rb @@ -0,0 +1,60 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl +    # +    module ElmThumb +        # +        FCT_PREFIX = 'elm_thumb_' 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' +        # +        # ENUMS +        # typedef enum {...} Elm_Thumb_Animation_Setting; +        enum :elm_thumb_animation_setting, [ :elm_thumb_animation_start, 0, :elm_thumb_animation_loop, 1, :elm_thumb_animation_stop, 2, +            :elm_thumb_animation_last, 3 ] +        # +        # FUNCTIONS +        fcts = [ +        # EAPI Evas_Object *elm_thumb_add(Evas_Object *parent); +        [ :elm_thumb_add, [ :evas_object ], :evas_object ], +        # EAPI void elm_thumb_reload(Evas_Object *obj); +        [ :elm_thumb_reload, [ :evas_object ], :void ], +        # EAPI void elm_thumb_file_set(Evas_Object *obj, const char *file, const char *key); +        [ :elm_thumb_file_set, [ :evas_object, :string, :string ], :void ], +        # EAPI void elm_thumb_file_get(const Evas_Object *obj, const char **file, const char **key); +        [ :elm_thumb_file_get, [ :evas_object, :pointer, :pointer ], :void ], +        # EAPI void elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key); +        [ :elm_thumb_path_get, [ :evas_object, :pointer, :pointer ], :void ], +        # EAPI void elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting s); +        [ :elm_thumb_animate_set, [ :evas_object, :elm_thumb_animation_setting ], :void ], +        # EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj); +        [ :elm_thumb_animate_get, [ :evas_object ], :elm_thumb_animation_setting ], +        # EAPI void *elm_thumb_ethumb_client_get(void); +        [ :elm_thumb_ethumb_client_get, [  ], :pointer ], +        # EAPI Eina_Bool elm_thumb_ethumb_client_connected_get(void); +        [ :elm_thumb_ethumb_client_connected_get, [  ], :bool ], +        # EAPI Eina_Bool elm_thumb_editable_set(Evas_Object *obj, Eina_Bool edit); +        [ :elm_thumb_editable_set, [ :evas_object, :bool ], :bool ], +        # EAPI Eina_Bool elm_thumb_editable_get(const Evas_Object *obj); +        [ :elm_thumb_editable_get, [ :evas_object ], :bool ], +        ] +        # +        attach_fcts fcts +        # +    end +end +# +# EOF diff --git a/tools/genruby.rb b/tools/genruby.rb index 7cf96fd..b544602 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -436,7 +436,7 @@ libs << elm_h('elm_spinner.h', 'ElmSpinner')  #libs << elm_h('elm_store.h', 'ElmX')  libs << elm_h('elm_table.h', 'ElmTable')  libs << elm_h('elm_theme.h', 'ElmTheme') -#libs << elm_h('elm_thumb.h', 'ElmX') +libs << elm_h('elm_thumb.h', 'ElmThumb')  libs << elm_h('elm_toolbar.h', 'ElmToolbar', ["#{NATIVE}/elementary","#{NATIVE}/elm/elm_icon"])  #libs << elm_h('elm_transit.h', 'ElmX')  #libs << elm_h('elm_video.h', 'ElmX') | 
