summaryrefslogtreecommitdiffstats
path: root/lib/e17/ffi.rb
blob: e8a644c9f5b80bea08c2551bbb3819046371cbbf (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
32
33
34
35
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
require 'ffi'
#
module E17
    #
    module API
        #
        extend FFI::Library
        #
        def attach_fcts fcts
            fcts.each do |func|
                begin
                    attach_function *func
                rescue Object => e
                    puts "Could not attach #{func} #{e.message}"
                end
            end
        end
        module_function :attach_fcts
        #
        typedef :pointer, :int_p
        typedef :pointer, :uint_p
        typedef :pointer, :void_p
        typedef :pointer, :uchar_p
        typedef :pointer, :string_array
        #
        typedef :pointer, :eina_list_p
        #
    end
    #
end
#
# EOF