summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/efl/elementary_all.rb2
-rw-r--r--lib/efl/elm/elm_scale.rb28
-rw-r--r--lib/efl/native/elm/elm_scale.rb41
-rwxr-xr-xtools/genruby.rb2
4 files changed, 71 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb
index b64ac7d..949eefc 100644
--- a/lib/efl/elementary_all.rb
+++ b/lib/efl/elementary_all.rb
@@ -69,7 +69,7 @@ require 'efl/elm/elm_photo'
require 'efl/elm/elm_progressbar'
require 'efl/elm/elm_radio'
#require 'efl/elm/elm_route'
-#require 'efl/elm/elm_scale'
+require 'efl/elm/elm_scale'
require 'efl/elm/elm_scroll'
require 'efl/elm/elm_scroller'
#require 'efl/elm/elm_segment_control'
diff --git a/lib/efl/elm/elm_scale.rb b/lib/efl/elm/elm_scale.rb
new file mode 100644
index 0000000..18cc451
--- /dev/null
+++ b/lib/efl/elm/elm_scale.rb
@@ -0,0 +1,28 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_scale'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmScale
+ #
+ def scale_get
+ Native::elm_object_scale_get @ptr
+ end
+ alias :scale :scale_get
+ #
+ def scale_set scale
+ Native::elm_object_scale_set @ptr, scale
+ end
+ alias :scale= :scale_set
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/elm/elm_scale.rb b/lib/efl/native/elm/elm_scale.rb
new file mode 100644
index 0000000..e9cf1ce
--- /dev/null
+++ b/lib/efl/native/elm/elm_scale.rb
@@ -0,0 +1,41 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmScale
+ #
+ FCT_PREFIX = 'elm_scale_' 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 double elm_scale_get(void);
+ [ :elm_scale_get, [ ], :double ],
+ # EAPI void elm_scale_set(double scale);
+ [ :elm_scale_set, [ :double ], :void ],
+ # EAPI void elm_object_scale_set(Evas_Object *obj, double scale);
+ [ :elm_object_scale_set, [ :evas_object, :double ], :void ],
+ # EAPI double elm_object_scale_get(const Evas_Object *obj);
+ [ :elm_object_scale_get, [ :evas_object ], :double ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/genruby.rb b/tools/genruby.rb
index e6b66b8..e0ec37e 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -426,7 +426,7 @@ libs << elm_h('elm_photo.h', 'ElmPhoto')
libs << elm_h('elm_progressbar.h', 'ElmProgressBar')
libs << elm_h('elm_radio.h', 'ElmRadio')
#libs << elm_h('elm_route.h', 'ElmX')
-#libs << elm_h('elm_scale.h', 'ElmX')
+libs << elm_h('elm_scale.h', 'ElmScale')
libs << elm_h('elm_scroll.h', 'ElmScroll')
#libs << elm_h('elm_segment_control.h', 'ElmX')
libs << elm_h('elm_separator.h', 'ElmSeparator')