forked from enlightenment/efl
Efl.File: Add async property and async_wait() method
Summary: Some other patches in elm will implement support for images. async means fopen() will happen asynchronously in a thread. Reviewers: cedric, raster, tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2261
This commit is contained in:
parent
f8f118f058
commit
cc36889d73
|
@ -78,6 +78,26 @@ interface Efl.File {
|
||||||
NULL, otherwise. */
|
NULL, otherwise. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async {
|
||||||
|
set {
|
||||||
|
/*@
|
||||||
|
If true, file open will happen asynchronously allowing for better
|
||||||
|
performance in some situations. The file will be opened from a
|
||||||
|
different thread. Classes implementing async open might then block
|
||||||
|
and wait when querying information from the file (eg. image size).
|
||||||
|
|
||||||
|
Only a few objects implement this feature, and this flag may
|
||||||
|
be ignored by EFL. In that case, get() will always return false. */
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
/*@
|
||||||
|
Retrieves the asynchronous open flag, which will be true only if
|
||||||
|
enabled and supported by the object. */
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
bool async; /*@ Flag for asynchronous open. */
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
methods {
|
methods {
|
||||||
save @const {
|
save @const {
|
||||||
|
@ -110,5 +130,18 @@ interface Efl.File {
|
||||||
Get rid of and clean the pointed resource.
|
Get rid of and clean the pointed resource.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
async_wait @const {
|
||||||
|
/*@
|
||||||
|
Block and wait until all asynchronous operations are completed. Unless
|
||||||
|
the async flag was set on this object, this method has no effect.
|
||||||
|
|
||||||
|
Returns false if an error occured. */
|
||||||
|
|
||||||
|
return: bool;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
events {
|
||||||
|
async,opened; /*@ The file was successfully opened asynchronously */
|
||||||
|
async,error; /*@ Error occured in asynchronous file operation */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue