summaryrefslogtreecommitdiffstats
path: root/lib/efl/native/ethumb_plugin.rb
blob: c86cfbb91e05bc4401d0d69644ba3b14bd7925e1 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
require 'efl/native'
require 'efl/native/evas'
require 'efl/native/ecore_evas'
require 'efl/native/ethumb'
#
module Efl
    #
    module EthumbPlugin
        #
        FCT_PREFIX = 'ethumb_plugin_' 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 'ethumb.so.1'
        #
        # TYPEDEFS
        # typedef struct _Ethumb_Plugin Ethumb_Plugin;
        typedef :pointer, :ethumb_plugin
        #
        # FUNCTIONS
        fcts = [
        # EAPI void ethumb_calculate_aspect_from_ratio(Ethumb *e, float ia, int *w, int *h);
        [ :ethumb_calculate_aspect_from_ratio, [ :ethumb, :float, :pointer, :pointer ], :void ],
        # EAPI void ethumb_calculate_aspect(Ethumb *e, int iw, int ih, int *w, int *h);
        [ :ethumb_calculate_aspect, [ :ethumb, :int, :int, :pointer, :pointer ], :void ],
        # EAPI void ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int *fx, int *fy, int *fw, int *fh);
        [ :ethumb_calculate_fill_from_ratio, [ :ethumb, :float, :pointer, :pointer, :pointer, :pointer ], :void ],
        # EAPI void ethumb_calculate_fill(Ethumb *e, int iw, int ih, int *fx, int *fy, int *fw, int *fh);
        [ :ethumb_calculate_fill, [ :ethumb, :int, :int, :pointer, :pointer, :pointer, :pointer ], :void ],
        # EAPI Eina_Bool ethumb_plugin_image_resize(Ethumb *e, int w, int h);
        [ :ethumb_plugin_image_resize, [ :ethumb, :int, :int ], :bool ],
        # EAPI Eina_Bool ethumb_image_save(Ethumb *e);
        [ :ethumb_image_save, [ :ethumb ], :bool ],
        # EAPI void ethumb_finished_callback_call(Ethumb *e, int result);
        [ :ethumb_finished_callback_call, [ :ethumb, :int ], :void ],
        # EAPI Evas * ethumb_evas_get(const Ethumb *e);
        [ :ethumb_evas_get, [ :ethumb ], :evas ],
        # EAPI Ecore_Evas * ethumb_ecore_evas_get(const Ethumb *e);
        [ :ethumb_ecore_evas_get, [ :ethumb ], :ecore_evas ],
        ]
        #
        attach_fcts fcts
        #
    end
end
#
# EOF