summaryrefslogtreecommitdiffstats
path: root/lib/efl/edje.rb
blob: 8977b09fe9e3ff5398b66699240677fb58e0c9a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
require 'ffi'
#
module EFL
    module EDJE
        #
        extend FFI::Library
        #
        ffi_lib 'edje'
        [
            [ :edje_init, [], :int],
            [ :edje_shutdown, [], :int],
        ].each do |func|
            begin
                attach_function *func
            rescue Object => e
                puts "Could not attach #{func} #{e.message}"
            end
        end
        #
        class << self
            alias init edje_init
            alias shutdown edje_shutdown
        end
        #
    end
end
#
# EOF