From 0269c54ebb2ac1f75799c935d8ba6173a426d0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 28 Feb 2012 11:48:25 +0100 Subject: parse elm_separator.h, generate elm_separator.rb --- lib/efl/elementary_all.rb | 2 +- lib/efl/elm/elm_separator.rb | 22 +++++++++++++++++++++ lib/efl/native/elm/elm_separator.rb | 39 +++++++++++++++++++++++++++++++++++++ tools/genruby.rb | 2 +- 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 lib/efl/elm/elm_separator.rb create mode 100644 lib/efl/native/elm/elm_separator.rb diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 84ef74a..4b81bcc 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -77,7 +77,7 @@ require 'efl/elm/elm_radio' require 'efl/elm/elm_scroll' require 'efl/elm/elm_scroller' #require 'efl/elm/elm_segment_control' -#require 'efl/elm/elm_separator' +require 'efl/elm/elm_separator' #require 'efl/elm/elm_slider' #require 'efl/elm/elm_slideshow' require 'efl/elm/elm_spinner' diff --git a/lib/efl/elm/elm_separator.rb b/lib/efl/elm/elm_separator.rb new file mode 100644 index 0000000..da98390 --- /dev/null +++ b/lib/efl/elm/elm_separator.rb @@ -0,0 +1,22 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_separator' +# +module Efl + # + module Elm + # + class ElmSeparator < ElmObject + # + include Helper + constructor :elm_separator_add + search_prefixes 'elm_separator_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_separator.rb b/lib/efl/native/elm/elm_separator.rb new file mode 100644 index 0000000..f6e1b24 --- /dev/null +++ b/lib/efl/native/elm/elm_separator.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmSeparator + # + FCT_PREFIX = 'elm_separator_' 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 Evas_Object *elm_separator_add(Evas_Object *parent); + [ :elm_separator_add, [ :evas_object ], :evas_object ], + # EAPI void elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); + [ :elm_separator_horizontal_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_separator_horizontal_get(const Evas_Object *obj); + [ :elm_separator_horizontal_get, [ :evas_object ], :bool ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/genruby.rb b/tools/genruby.rb index b67ac5d..8c8674d 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -431,7 +431,7 @@ libs << elm_h('elm_radio.h', 'ElmRadio') #libs << elm_h('elm_scale.h', 'ElmX') libs << elm_h('elm_scroll.h', 'ElmScroll') #libs << elm_h('elm_segment_control.h', 'ElmX') -#libs << elm_h('elm_separator.h', 'ElmX') +libs << elm_h('elm_separator.h', 'ElmSeparator') libs << elm_h('elm_slider.h', 'ElmSlider') #libs << elm_h('elm_slideshow.h', 'ElmX') libs << elm_h('elm_spinner.h', 'ElmSpinner') -- cgit v1.1-2-g2b99