summaryrefslogtreecommitdiffstats
path: root/lib/e17/eina.rb
blob: bdb3522d8073e0bab9927882883701a3575867b0 (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 E17
    module EINA
        #
        extend FFI::Library
        #
        ffi_lib 'eina'
        [
            [ :eina_init, [], :int],
            [ :eina_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 eina_init
            alias shutdown eina_shutdown
        end
        #
    end
end
#
# EOF