diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-29 16:57:40 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-29 16:57:40 +0100 |
commit | 5ba82144003b73f05d3398eb8b927c5522d6e970 (patch) | |
tree | 48794055bea7bf493f611cd5fc5b173c82184ac3 | |
parent | 0241b168d235107611e3a238ce67a9a093b9e7d8 (diff) | |
download | ffi-efl-5ba82144003b73f05d3398eb8b927c5522d6e970.zip ffi-efl-5ba82144003b73f05d3398eb8b927c5522d6e970.tar.gz |
parse elm_glview.h, generate elm_glview.rb
-rw-r--r-- | lib/efl/elementary_all.rb | 2 | ||||
-rw-r--r-- | lib/efl/elm/elm_glview.rb | 22 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_glview.rb | 70 | ||||
-rwxr-xr-x | tools/genruby.rb | 2 |
4 files changed, 94 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 6beba13..22075a4 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -37,7 +37,7 @@ require 'efl/elm/elm_frame' require 'efl/elm/elm_gengrid' require 'efl/elm/elm_genlist' require 'efl/elm/elm_gesture_layer' -#require 'efl/elm/elm_glview' +require 'efl/elm/elm_glview' require 'efl/elm/elm_grid' require 'efl/elm/elm_hover' require 'efl/elm/elm_hoversel' diff --git a/lib/efl/elm/elm_glview.rb b/lib/efl/elm/elm_glview.rb new file mode 100644 index 0000000..542e5b8 --- /dev/null +++ b/lib/efl/elm/elm_glview.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_glview' +# +module Efl + # + module Elm + # + class ElmGLView < ElmObject + # + include Helper + constructor :elm_glview_add + search_prefixes 'elm_glview_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_glview.rb b/lib/efl/native/elm/elm_glview.rb new file mode 100644 index 0000000..b23e25d --- /dev/null +++ b/lib/efl/native/elm/elm_glview.rb @@ -0,0 +1,70 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmGLView + # + FCT_PREFIX = 'elm_glview_' 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_GLView_Mode {...} Elm_GLView_Mode; + enum :elm_glview_mode, [ :elm_glview_none, 0, :elm_glview_alpha, (1<<1), :elm_glview_depth, (1<<2), :elm_glview_stencil, (1<<3), + :elm_glview_direct, (1<<4) ] + # typedef enum {...} Elm_GLView_Resize_Policy; + enum :elm_glview_resize_policy, [ :elm_glview_resize_policy_recreate, 1, :elm_glview_resize_policy_scale, 2 ] + # typedef enum {...} Elm_GLView_Render_Policy; + enum :elm_glview_render_policy, [ :elm_glview_render_policy_on_demand, 1, :elm_glview_render_policy_always, 2 ] + # + # CALLBACKS + # typedef void (*Elm_GLView_Func_Cb) (Evas_Object *obj); + callback :elm_glview_func_cb, [ :evas_object ], :void + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_glview_add(Evas_Object *parent); + [ :elm_glview_add, [ :evas_object ], :evas_object ], + # EAPI void elm_glview_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h); + [ :elm_glview_size_set, [ :evas_object, :int, :int ], :void ], + # EAPI void elm_glview_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); + [ :elm_glview_size_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI Evas_GL_API *elm_glview_gl_api_get(const Evas_Object *obj); + [ :elm_glview_gl_api_get, [ :evas_object ], :pointer ], + # EAPI Eina_Bool elm_glview_mode_set(Evas_Object *obj, Elm_GLView_Mode mode); + [ :elm_glview_mode_set, [ :evas_object, :elm_glview_mode ], :bool ], + # EAPI Eina_Bool elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy); + [ :elm_glview_resize_policy_set, [ :evas_object, :elm_glview_resize_policy ], :bool ], + # EAPI Eina_Bool elm_glview_render_policy_set(Evas_Object *obj, Elm_GLView_Render_Policy policy); + [ :elm_glview_render_policy_set, [ :evas_object, :elm_glview_render_policy ], :bool ], + # EAPI void elm_glview_init_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func); + [ :elm_glview_init_func_set, [ :evas_object, :elm_glview_func_cb ], :void ], + # EAPI void elm_glview_del_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func); + [ :elm_glview_del_func_set, [ :evas_object, :elm_glview_func_cb ], :void ], + # EAPI void elm_glview_resize_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func); + [ :elm_glview_resize_func_set, [ :evas_object, :elm_glview_func_cb ], :void ], + # EAPI void elm_glview_render_func_set(Evas_Object *obj, Elm_GLView_Func_Cb func); + [ :elm_glview_render_func_set, [ :evas_object, :elm_glview_func_cb ], :void ], + # EAPI void elm_glview_changed_set(Evas_Object *obj); + [ :elm_glview_changed_set, [ :evas_object ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/genruby.rb b/tools/genruby.rb index 6b0ab95..7d4f7c8 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -402,7 +402,7 @@ libs << elm_h('elm_frame.h', 'ElmFrame') libs << elm_h('elm_gengrid.h', 'ElmGenGrid') libs << elm_h('elm_genlist.h', 'ElmGenList', ["#{NATIVE}/elementary","#{NATIVE}/elm/elm_list","#{NATIVE}/elm/elm_scroller"]) libs << elm_h('elm_gesture_layer.h', 'ElmGestureLayer') -#libs << elm_h('elm_glview.h', 'ElmGLView') +libs << elm_h('elm_glview.h', 'ElmGLView') libs << elm_h('elm_grid.h', 'ElmGrid') libs << elm_h('elm_hover.h', 'ElmHover') libs << elm_h('elm_image.h', 'ElmImage') |