efl/src/lib/efl/interfaces/efl_image_animated.eo

122 lines
3.8 KiB
Plaintext

/* FIXME: invalid type from evas/emile! */
/* type @extern Evas.Animated_Loop_Hint: int; */
enum Efl.Image.Animated.Loop_Hint {
[[Image animation loop modes]]
none = 0, [[No looping order specified.]]
loop = 1, [[Standard loop: 1->2->3->1->2->3->1]]
pingpong = 2 [[Ping-pong bouncing loop: 1->2->3->2->1->2->3->1]]
}
/* FIXME: rename to Efl.Image.Animated when eo/eolian are fixed */
interface Efl.Image.Animated ()
{
[[Efl animated image interface]]
eo_prefix: efl_image;
methods {
@property animated {
get {
[[Check if an image can be animated (has multiple frames).
This will be $true for animated Gif files for instance but $false
for still images.
@since 1.1
]]
}
values {
is_animated: bool; [[$true if the image is animated]]
}
}
@property animated_frame {
[[Index of the current frame of an animated image.
Ranges from 1 to @.animated_frame_count. Valid only if @.animated.
]]
set {
[[Set the frame to current frame of an image object.
@since 1.1
]]
return: bool; [[Returns $true if the frame index is valid.]]
}
get {}
values {
frame_index: int; [[The index of current frame.]]
}
}
@property animated_frame_count {
get {
[[Get the total number of frames of the image, if animated.
Returns -1 if not animated.
@since 1.1
]]
return: int; [[The number of frames in the animated image.]]
}
}
@property animated_loop_type {
/* FIXME: external type used from evas / emile */
get {
[[Get the kind of looping the image object does.
This returns the kind of looping the image object wants to do.
If it returns @Efl.Image.Animated.Loop_Hint.loop, you should
display frames in a sequence like: 1->2->3->1->2->3->1...
If it returns @Efl.Image.Animated.Loop_Hint.pingpong, it is
better to display frames in a sequence like:
1->2->3->2->1->2->3->1...
The default type is @Efl.Image.Animated.Loop_Hint.loop.
@since 1.1
]]
return: Efl.Image.Animated.Loop_Hint; [[Loop type of the image object.]]
}
}
@property animated_loop_count {
get {
[[Get the number times the animation of the object loops.
This returns loop count of image. The loop count is the number
of times the animation will play fully from first to last frame
until the animation should stop (at the final frame).
If 0 is returned, then looping should happen indefinitely
(no limit to the number of times it loops).
@since 1.1
]]
return: int; [[The number of loop of an animated image object.]]
}
}
@property animated_frame_duration {
get {
[[Get the duration of a sequence of frames.
This returns total duration in seconds that the specified
sequence of frames should take.
If $start_frame is 1 and $frame_num is 0, this returns the
duration of frame 1. If $start_frame is 1 and $frame_num is 1,
this returns the total duration of frame 1 + frame 2.
@since 1.1
]]
}
keys {
start_frame: int; [[The first frame, rangers from 1 to @.animated_frame_count.]]
frame_num: int; [[Number of frames in the sequence, starts from 0.]]
}
values {
duration: double; [[Duration in seconds]]
}
}
}
}