Class: Efl::Evas::REvas
- Inherits:
-
Object
show all
- Includes:
- ClassHelper
- Defined in:
- lib/efl/edje.rb,
lib/efl/evas.rb,
lib/efl/ecore_evas.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#===, #address, included, #method_missing, #null?, #to_a, #to_ary, #to_ptr, #to_s
Constructor Details
#initialize(o = nil, &block) ⇒ REvas
Returns a new instance of REvas.
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/efl/evas.rb', line 61
def initialize o=nil, &block
@ptr = (
case o
when NilClass
FFI::AutoPointer.new Native.evas_new, REvas.method(:release)
when FFI::Pointer
o
else
raise ArgumentError.new "wrong argument #{o.class.name}"
end
)
instance_eval &block if block
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Efl::ClassHelper
Class Method Details
.release(p) ⇒ Object
74
75
76
|
# File 'lib/efl/evas.rb', line 74
def self.release p
Native.evas_free p
end
|
Instance Method Details
#ecore_evas_get ⇒ Object
111
112
113
114
|
# File 'lib/efl/ecore_evas.rb', line 111
def ecore_evas_get
EcoreEvas::REcoreEvas.new Native.ecore_evas_ecore_evas_get @ptr
end
|
#edje_object_add ⇒ Object
64
65
66
67
|
# File 'lib/efl/edje.rb', line 64
def edje_object_add
Edje::REdje.new Native.edje_object_add @ptr
end
|
#free ⇒ Object
77
78
79
80
81
|
# File 'lib/efl/evas.rb', line 77
def free
@ptr.autorelease=false if @ptr.is_a? FFI::AutoPointer
REvas.release @ptr
@ptr=nil
end
|
#object_box_add(&block) ⇒ Object
94
95
96
|
# File 'lib/efl/evas.rb', line 94
def object_box_add &block
Evas::REvasBox.new Native.method(:evas_object_box_add), @ptr, &block
end
|
#object_line_add(&block) ⇒ Object
85
86
87
|
# File 'lib/efl/evas.rb', line 85
def object_line_add &block
Evas::REvasLine.new Native.method(:evas_object_line_add), @ptr, &block
end
|
#object_polygon_add(&block) ⇒ Object
88
89
90
|
# File 'lib/efl/evas.rb', line 88
def object_polygon_add &block
Evas::REvasPolygon.new Native.method(:evas_object_polygon_add), @ptr, &block
end
|
#object_rectangle_add(&block) ⇒ Object
82
83
84
|
# File 'lib/efl/evas.rb', line 82
def object_rectangle_add &block
REvasRectangle.new Native.method(:evas_object_rectangle_add), @ptr, &block
end
|
#object_text_add(&block) ⇒ Object
91
92
93
|
# File 'lib/efl/evas.rb', line 91
def object_text_add &block
Evas::REvasText.new Native.method(:evas_object_text_add), @ptr, &block
end
|
#output_size_get ⇒ Object
Also known as:
output_size, size
97
98
99
100
101
102
|
# File 'lib/efl/evas.rb', line 97
def output_size_get
@ri0 ||= FFI::MemoryPointer.new :int
@ri1 ||= FFI::MemoryPointer.new :int
Native.evas_output_size_get @ptr, @ri0, @ri1
[ @ri0.read_int, @ri1.read_int ]
end
|
#output_viewport_get ⇒ Object
Also known as:
output_viewport, viewport
105
106
107
108
109
110
111
112
|
# File 'lib/efl/evas.rb', line 105
def output_viewport_get
@ri0 ||= FFI::MemoryPointer.new :int
@ri1 ||= FFI::MemoryPointer.new :int
@ri2 ||= FFI::MemoryPointer.new :int
@ri3 ||= FFI::MemoryPointer.new :int
Native.evas_output_viewport_get @ptr, @ri0, @ri1, @ri2, @ri3
[ @ri0.read_int, @ri1.read_int, @ri2.read_int, @ri3.read_int ]
end
|
#pointer_canvas_xy_get ⇒ Object
Also known as:
pointer_canvas
122
123
124
125
126
127
|
# File 'lib/efl/evas.rb', line 122
def pointer_canvas_xy_get
@ri0 ||= FFI::MemoryPointer.new :int
@ri1 ||= FFI::MemoryPointer.new :int
Native.evas_pointer_canvas_xy_get @ptr, @ri0, @ri1
[ @ri0.read_int, @ri1.read_int ]
end
|
#pointer_output_xy_get ⇒ Object
Also known as:
pointer_output
115
116
117
118
119
120
|
# File 'lib/efl/evas.rb', line 115
def pointer_output_xy_get
@ri0 ||= FFI::MemoryPointer.new :int
@ri1 ||= FFI::MemoryPointer.new :int
Native.evas_pointer_output_xy_get @ptr, @ri0, @ri1
[ @ri0.read_int, @ri1.read_int ]
end
|