efl/src/lib/efl/interfaces/efl_io_positioner.eo

45 lines
1.2 KiB
Plaintext

import eina_types;
enum Efl.Io.Positioner.Whence {
[[Seek position modes]]
start, [[Seek from start of the stream/file]]
current, [[Seek from current position]]
end, [[Seek from the end of stream/file]]
}
mixin Efl.Io.Positioner {
[[Generic interface for objects that can change or report position.
@since 1.19
]]
data: null;
methods {
seek @pure_virtual {
[[Seek in data]]
params {
@in offset: int64; [[Offset in byte relative to whence]]
@in whence: Efl.Io.Positioner.Whence; [[Whence]]
}
return: Eina.Error; [[0 on succeed, a mapping of errno otherwise]]
}
@property position {
[[Position property]]
get @pure_virtual { }
set {
[[Try to set position object, relative to start of file. See @.seek()]]
return: bool; [[$true if could reposition, $false if errors.]]
}
values {
position: uint64; [[Position in file or buffer]]
}
}
}
events {
position,changed; [[Notifies position changed]]
}
}