summaryrefslogtreecommitdiffstats
path: root/lib/efl/elm/elm_theme.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-28 14:13:30 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-28 14:13:30 +0100
commit9317a29c12a0241c737f6ad62f55d25667aa5e95 (patch)
treeda9de3069e0070384a39ab86cfaa15e28d73c82d /lib/efl/elm/elm_theme.rb
parentffd406e187f6f23862ddc53b2fb706969433f9c3 (diff)
downloadffi-efl-9317a29c12a0241c737f6ad62f55d25667aa5e95.zip
ffi-efl-9317a29c12a0241c737f6ad62f55d25667aa5e95.tar.gz
parse elm_theme.h, generate elm_theme.rb
Diffstat (limited to 'lib/efl/elm/elm_theme.rb')
-rw-r--r--lib/efl/elm/elm_theme.rb42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/efl/elm/elm_theme.rb b/lib/efl/elm/elm_theme.rb
new file mode 100644
index 0000000..27ff2fa
--- /dev/null
+++ b/lib/efl/elm/elm_theme.rb
@@ -0,0 +1,42 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_theme'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmTheme < ElmObject
+ #
+ search_prefixes 'elm_theme_'
+ #
+ def initialize o=nil, &block
+ @ptr = (
+ case o
+ when NilClass
+ FFI::AutoPointer.new Native.elm_theme_new, ElmTheme.method(:release)
+ when FFI::Pointer
+ o
+ else
+ raise ArgumentError.new "wrong argument #{o.class.name}"
+ end
+ )
+ instance_eval &block if block
+ end
+ def self.release p
+ Native.elm_theme_free p
+ end
+ def free
+ @ptr.autorelease=false if @ptr.is_a? FFI::AutoPointer
+ ElmTheme.release @ptr
+ @ptr=nil
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF