summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_io_positioner.eo
blob: 1c25b774d7e9a9a1f516f38a24d7b7f4f29b4a16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import eina_types;

enum Efl.Io.Positioner.Whence {
    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 @virtual_pure {
            params {
                @in offset: int64; [[offset in byte relative to whence]]
                @in whence: Efl.Io.Positioner.Whence;
            }
            return: Eina.Error; [[0 on succeed, a mapping of errno otherwise]]
        }

        @property position {
            get @virtual_pure { }
            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;
            }
        }
    }

    events {
        position,changed; [[Notifies position changed]]
    }
}