summaryrefslogtreecommitdiffstats
path: root/lib/efl/edje.rb
blob: 521ac38add472080ae69c3943afc23182413c691 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
require 'efl/evas'
require 'efl/native/edje'
#
module Efl
    #
    module Edje
        #
        def self.version
            Native::VersionStruct.new(Native.edje_version)
        end
        #
        class REdje < Efl::Evas::REvasObject
            #
            search_prefixes 'edje_object_'
            #
            def part_object_get part
                # EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *obj, const char *part);
                Evas::RevasObject.new Native.edje_object_part_object_get @ptr, part
            end
            def part_swallow_get part
                # EAPI Evas_Object *edje_object_part_swallow_get (const Evas_Object *obj, const char *part);
                Evas::RevasObject.new Native.edje_object_part_swallow_get @ptr, part
            end
            def external_object_get part
                # EAPI Evas_Object *edje_object_part_external_object_get (const Evas_Object *obj, const char *part);
                Evas::RevasObject.new Native.edje_object_part_external_object_get @ptr, part
            end
            def external_content_get part, content
                # EAPI Evas_Object *edje_object_part_external_content_get (const Evas_Object *obj, const char *part, const char *content);
                Evas::RevasObject.new Native.edje_object_part_external_content_get @ptr, part, content
            end
            def part_box_remove part, child
                # EAPI Evas_Object *edje_object_part_box_remove (Evas_Object *obj, const char *part, Evas_Object *child);
                Evas::RevasObject.new Native.edje_object_part_box_remove @ptr, part, child
            end
            def part_box_remove_at part, pos
                # EAPI Evas_Object *edje_object_part_box_remove_at (Evas_Object *obj, const char *part, unsigned int pos);
                Evas::RevasObject.new Native.edje_object_part_box_remove_at @ptr, part, pos
            end
            def part_table_child_get part, col, row
                # EAPI Evas_Object *edje_object_part_table_child_get (Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
                Evas::RevasObject.new Native.edje_object_part_table_child_get @ptr, part, col, row
            end
            def file_get
                f = FFI::MemoryPointer.new :pointer
                g = FFI::MemoryPointer.new :pointer
                Native.edje_object_file_get @ptr, f, g
                [ f.read_pointer.read_string, g.read_pointer.read_string ]
            end
            def data_get k
                Native.edje_object_data_get @ptr, k
            end
            alias :data :data_get
        end
        #
    end
    #
    module Evas
        #
        class REvas
            def edje_object_add
                # EAPI Evas_Object *edje_object_add (Evas *evas);
                Edje::REdje.new Native.edje_object_add @ptr
            end
        end
        #
    end
end
#
# EOF