efl/src/lib/efl/interfaces/efl_ui_zoom.eo

92 lines
3.4 KiB
Plaintext

enum Efl.Ui.Zoom_Mode
{
[[Types of zoom available.]]
legacy: efl_ui_zoom_mode;
manual = 0, [[Zoom controlled normally by efl_ui_zoom_set]]
auto_fit, [[Zoom until photo fits in zoomable object]]
auto_fill, [[Zoom until photo fills zoomable object]]
auto_fit_in, [[Zoom in until photo fits in zoomable object]]
last [[Sentinel value to indicate last enum field during iteration]]
}
interface Efl.Ui.Zoom
{
[[Efl UI zoom interface]]
event_prefix: efl_ui;
eo_prefix: efl_ui;
methods {
@property zoom_animation {
[[This sets the zoom animation state to on or off for zoomable. The
default is off. When $paused is $true, it will stop zooming using
animation on zoom level changes and change instantly, stopping any
existing animations that are running.]]
set {}
get {}
values {
paused: bool; [[The paused state.]]
}
}
@property zoom_level {
set {
[[Set the zoom level of the photo
This sets the zoom level. If $zoom is 1, it means no zoom. If
it's smaller than 1, it means zoom in. If it's bigger than 1,
it means zoom out. For example, $zoom 1 will be 1:1 pixel for
pixel. $zoom 2 will be 2:1 (that is 2x2 photo pixels will
display as 1 on-screen pixel) which is a zoom out. 4:1 will
be 4x4 photo pixels as 1 screen pixel, and so on. The $zoom
parameter must be greater than 0. It is suggested to stick
to powers of 2. (1, 2, 4, 8, 16, 32, etc.).
]]
}
get {
[[Get the zoom level of the photo
This returns the current zoom level of the zoomable object.
Note that if you set the fill mode to other than
#EFL_UI_ZOOM_MODE_MANUAL (which is the default), the
zoom level may be changed at any time by the zoomable object
itself to account for photo size and zoomable viewport size.
]]
}
values {
zoom: double; [[The zoom level to set]]
}
}
@property zoom_mode {
set {
[[Set the zoom mode
This sets the zoom mode to manual or one of several automatic
levels. Manual (EFL_UI_ZOOM_MODE_MANUAL) means that zoom
is set manually by @.zoom_level.set and will stay at that level until
changed by code or until zoom mode is changed. This is the
default mode. The Automatic modes will allow the zoomable object
to automatically adjust zoom mode based on properties.
#EFL_UI_ZOOM_MODE_AUTO_FIT) will adjust zoom so the photo
fits EXACTLY inside the scroll frame with no pixels outside this
region. #EFL_UI_ZOOM_MODE_AUTO_FILL will be similar but
ensure no pixels within the frame are left unfilled.
]]
}
get {
[[Get the zoom mode
This gets the current zoom mode of the zoomable object.
]]
}
values {
mode: Efl.Ui.Zoom_Mode; [[The zoom mode.]]
}
}
}
events {
zoom,start: void; [[Called when zooming started]]
zoom,stop: void; [[Called when zooming stopped]]
zoom,change: void; [[Called when zooming changed]]
}
}