blob: 985b3fd687139c815c7240dd828d9f51d9665ffa (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
import eina_types;
import efl_gfx_types;
mixin @beta Efl.File requires Efl.Object {
[[Efl file interface]]
methods {
@property mmap {
set {
[[Set the mmaped file from where an object will fetch the real
data (it must be an Eina_File).
If mmap is set during object construction, the object will automatically
call @.load during the finalize phase of construction.
]]
return: Eina.Error; [[0 on success, error code otherwise]]
}
get {
[[Get the mmaped file from where an object will fetch the real
data (it must be an Eina_File).
]]
}
values {
f: ptr(const(Eina.File)); [[The handle to an Eina_File that will be used]]
}
}
@property file {
set {
[[Set the file path from where an object will fetch the data.
If file is set during object construction, the object will automatically
call @.load during the finalize phase of construction.
]]
return: Eina.Error; [[0 on success, error code otherwise]]
}
get {
[[Retrieve the file path from where an object is to fetch the data.
You must not modify the strings on the returned pointers.]]
}
values {
file: string; [[The file path.]]
}
}
@property key {
set {
[[Set the key which corresponds to the target data within a file.
Some filetypes can contain multiple data streams which are indexed by
a key. Use this property for such cases.
]]
}
get {
[[Get the previously-set key which corresponds to the target data within a file.
Some filetypes can contain multiple data streams which are indexed by
a key. Use this property for such cases.
You must not modify the strings on the returned pointers.]]
}
values {
key: string; [[The group that the image belongs to, in case
it's an EET(including Edje case) file. This can be used
as a key inside evas image cache if this is a normal image
file not eet file.]]
}
}
@property loaded {
get {
[[Get the load state of the object.
]]
}
values {
loaded: bool; [[True if the object is loaded, otherwise false.]]
}
}
load {
[[Perform all necessary operations to open and load file data into the object
using the @.file (or @.mmap) and @.key properties.
In the case where @.file.set has been called on an object, this will internally
open the file and call @.mmap.set on the object using the opened file handle.
Calling @.load on an object which has already performed file operations based on
the currently set properties will have no effect.]]
return: Eina.Error; [[0 on success, error code otherwise]]
}
unload {
[[Perform all necessary operations to unload file data from the object.
In the case where @.mmap.set has been externally called on an object, the file handle
stored in the object will be preserved.
Calling @.unload on an object which is not currently loaded will have no effect.
]]
}
}
implements {
Efl.Object.destructor;
Efl.Object.finalize;
}
}
|