diff options
-rw-r--r-- | lib/efl/elementary_all.rb | 2 | ||||
-rw-r--r-- | lib/efl/elm/elm_video.rb | 30 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_video.rb | 71 | ||||
-rwxr-xr-x | tools/genruby.rb | 2 |
4 files changed, 103 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 9545610..c62fbc1 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -83,7 +83,7 @@ require 'efl/elm/elm_theme' require 'efl/elm/elm_thumb' require 'efl/elm/elm_toolbar' require 'efl/elm/elm_transit' -#require 'efl/elm/elm_video' +require 'efl/elm/elm_video' #require 'efl/elm/elm_web' #require 'efl/elm/elm_widget' require 'efl/elm/elm_win' diff --git a/lib/efl/elm/elm_video.rb b/lib/efl/elm/elm_video.rb new file mode 100644 index 0000000..f9940e6 --- /dev/null +++ b/lib/efl/elm/elm_video.rb @@ -0,0 +1,30 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_video' +# +module Efl + # + module Elm + # + class ElmVideo < ElmObject + # + include Helper + constructor :elm_video_add + search_prefixes 'elm_video_' + # + end + # + class ElmPlayer < ElmObject + # + include Helper + constructor :elm_player_add + search_prefixes 'elm_player_' + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_video.rb b/lib/efl/native/elm/elm_video.rb new file mode 100644 index 0000000..d82fec3 --- /dev/null +++ b/lib/efl/native/elm/elm_video.rb @@ -0,0 +1,71 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmVideo + # + FCT_PREFIX = 'elm_video_' 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_player_add(Evas_Object *parent); + [ :elm_player_add, [ :evas_object ], :evas_object ], + # EAPI Evas_Object *elm_video_add(Evas_Object *parent); + [ :elm_video_add, [ :evas_object ], :evas_object ], + # EAPI void elm_video_file_set(Evas_Object *video, const char *filename); + [ :elm_video_file_set, [ :evas_object, :string ], :void ], + # EAPI Evas_Object *elm_video_emotion_get(const Evas_Object *video); + [ :elm_video_emotion_get, [ :evas_object ], :evas_object ], + # EAPI void elm_video_play(Evas_Object *video); + [ :elm_video_play, [ :evas_object ], :void ], + # EAPI void elm_video_pause(Evas_Object *video); + [ :elm_video_pause, [ :evas_object ], :void ], + # EAPI void elm_video_stop(Evas_Object *video); + [ :elm_video_stop, [ :evas_object ], :void ], + # EAPI Eina_Bool elm_video_is_playing_get(const Evas_Object *video); + [ :elm_video_is_playing_get, [ :evas_object ], :bool ], + # EAPI Eina_Bool elm_video_is_seekable_get(const Evas_Object *video); + [ :elm_video_is_seekable_get, [ :evas_object ], :bool ], + # EAPI Eina_Bool elm_video_audio_mute_get(const Evas_Object *video); + [ :elm_video_audio_mute_get, [ :evas_object ], :bool ], + # EAPI void elm_video_audio_mute_set(Evas_Object *video, Eina_Bool mute); + [ :elm_video_audio_mute_set, [ :evas_object, :bool ], :void ], + # EAPI double elm_video_audio_level_get(const Evas_Object *video); + [ :elm_video_audio_level_get, [ :evas_object ], :double ], + # EAPI void elm_video_audio_level_set(Evas_Object *video, double volume); + [ :elm_video_audio_level_set, [ :evas_object, :double ], :void ], + # EAPI double elm_video_play_position_get(const Evas_Object *video); + [ :elm_video_play_position_get, [ :evas_object ], :double ], + # EAPI void elm_video_play_position_set(Evas_Object *video, double position); + [ :elm_video_play_position_set, [ :evas_object, :double ], :void ], + # EAPI double elm_video_play_length_get(const Evas_Object *video); + [ :elm_video_play_length_get, [ :evas_object ], :double ], + # EAPI void elm_video_remember_position_set(Evas_Object *video, Eina_Bool remember); + [ :elm_video_remember_position_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_video_remember_position_get(const Evas_Object *video); + [ :elm_video_remember_position_get, [ :evas_object ], :bool ], + # EAPI const char *elm_video_title_get(const Evas_Object *video); + [ :elm_video_title_get, [ :evas_object ], :string ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/genruby.rb b/tools/genruby.rb index ef62610..edf95c0 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -439,7 +439,7 @@ libs << elm_h('elm_theme.h', 'ElmTheme') 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', 'ElmTransit') -#libs << elm_h('elm_video.h', 'ElmX') +libs << elm_h('elm_video.h', 'ElmVideo') #libs << elm_h('elm_web.h', 'ElmX') #libs << elm_h('elm_widget.h', 'ElmX') libs << elm_h('elm_win.h', 'ElmWin') |