efl/src/lib/efl/interfaces/efl_gfx.eo

113 lines
3.9 KiB
Plaintext

import eina_types;
import efl_gfx_types;
interface Efl.Gfx {
[[Efl graphics interface]]
eo_prefix: efl_gfx;
methods {
@property position {
[[The 2D position of a canvas object.
The position is absolute, in pixels, relative to the top-left corner
of the window, within its border decorations (application space).
]]
set {
[[Moves the given canvas object to the given location inside its
canvas' viewport. If unchanged this call may be entirely skipped,
but if changed this will trigger move events, as well as
potential pointer,in or pointer,out events.
]]
}
get {
[[Retrieves the position of the given canvas object.]]
}
values {
pos: Eina.Position2D; [[A 2D pixel coordinate.]]
}
}
@property size {
[[The 2D size of a canvas object.]]
set {
[[Changes the size of the given object.
Note that setting the actual size of an object might be the job
of its container, so this function might have no effect.
Look at $Efl.Gfx.Size.Hint instead, when manipulating
widgets.
]]
}
get {
[[Retrieves the (rectangular) size of the given Evas object.]]
}
values {
w: int; [[Width]]
h: int; [[Height]]
}
}
@property geometry {
[[Rectangular geometry that combines both position and size.]]
values {
rect: Eina.Rect; [[The X,Y position and W,H size, in pixels.]]
}
}
@property color {
set {
[[Sets the general/main color of the given Evas object to the given
one.
See also @.color.get (for an example)
These color values are expected to be premultiplied by alpha.
]]
}
get {
[[Retrieves the general/main color of the given Evas object.
Retrieves the main color's RGB component (and alpha channel)
values, which range from 0 to 255. For the alpha channel,
which defines the object's transparency level, 0 means totally
transparent, while 255 means opaque. These color values are
premultiplied by the alpha value.
Usually youll use this attribute for text and rectangle objects,
where the main color is their unique one. If set for objects
which themselves have colors, like the images one, those colors
get modulated by this one.
All newly created Evas rectangles get the default color
values of 255 255 255 255 (opaque white).
Use null pointers on the components you're not interested
in: they'll be ignored by the function.
See the full \@ref Example_Evas_Object_Manipulation "example".
]]
}
values {
r: int; [[The red component of the given color.]]
g: int; [[The green component of the given color.]]
b: int; [[The blue component of the given color.]]
a: int; [[The alpha component of the given color.]]
}
}
@property visible {
set {
[[Makes the given Evas object visible or invisible.]]
}
get {
[[Retrieves whether or not the given Evas object is visible.]]
}
values {
v: bool; [[$true if to make the object visible, $false otherwise]]
}
}
}
events {
show; [[Object just became visible.]]
hide; [[Object just became invisible.]]
move; [[Object was moved, its position during the event is the new one.]]
resize; [[Object was resized, its size during the event is the new one.]]
changed; [[Object was changed]]
}
}