2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Loop_Handler_Flags {
|
2017-11-08 22:59:04 -08:00
|
|
|
[[ A set of flags that can be OR'd together to indicate which are
|
|
|
|
desired ]]
|
|
|
|
none = 0, [[ No I/O is desired (generally useless) ]]
|
|
|
|
read = 1, [[ Reading is desired ]]
|
|
|
|
write = 2, [[ Writing is desired ]]
|
|
|
|
error = 4, [[ Error channel input is desired ]]
|
|
|
|
}
|
|
|
|
|
2019-02-14 08:37:02 -08:00
|
|
|
class @beta Efl.Loop_Handler extends Efl.Object
|
2017-11-08 22:59:04 -08:00
|
|
|
{
|
|
|
|
[[ An object that describes an low-level source of I/O to listen to
|
|
|
|
for available data to be read or written, depending on the OS and data
|
|
|
|
source type. When I/O becomes available various events are produced
|
|
|
|
and the callbacks attached to them will be called. ]]
|
|
|
|
methods {
|
|
|
|
@property active {
|
|
|
|
[[ This sets what kind of I/O should be listened to only when
|
|
|
|
using a fd or fd_file for the handler ]]
|
|
|
|
set { }
|
|
|
|
get { }
|
|
|
|
values {
|
2019-09-02 07:24:26 -07:00
|
|
|
flags: Efl.Loop_Handler_Flags; [[The flags that indicate what kind of I/O should be listened for like
|
|
|
|
read, write or error channels. ]]
|
2017-11-08 22:59:04 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property fd {
|
2018-08-29 22:01:21 -07:00
|
|
|
[[ Controls a file descriptor to listen to for I/O, which points
|
2017-11-08 22:59:04 -08:00
|
|
|
to a data pipe such as a device, socket or pipe etc. ]]
|
|
|
|
set { }
|
|
|
|
get { }
|
|
|
|
values {
|
|
|
|
fd: int; [[ The file descriptor ]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property fd_file {
|
|
|
|
[[ Controls a file descriptor to listen to for I/O that
|
|
|
|
specifically points to a file in storage and not a device, socket or
|
|
|
|
pipe etc. ]]
|
|
|
|
set { }
|
|
|
|
get { }
|
|
|
|
values {
|
|
|
|
fd: int; [[ The file descriptor ]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property win32 {
|
|
|
|
[[ Controls a windows win32 object handle to listen to for I/O.
|
|
|
|
When it becomes available for any data the read event will be
|
|
|
|
produced. ]]
|
|
|
|
set { }
|
|
|
|
get { }
|
|
|
|
values {
|
|
|
|
handle: void_ptr; [[ A win32 object handle ]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
events {
|
efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).
In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).
Test Plan: make with c# bindings works, make check and make examples work too.
Reviewers: cedric, q66, lauromoura
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6169
2018-05-11 08:20:40 -07:00
|
|
|
read: void; [[ Called when a read occurs on the descriptor. ]]
|
|
|
|
write: void; [[ Called when a write occurs on the descriptor. ]]
|
|
|
|
error: void; [[ Called when a error occurrs on the descriptor. ]]
|
|
|
|
buffer: void; [[ Called when buffered data already read from the descriptor should be processed. ]]
|
|
|
|
prepare: void; [[ Called when preparing a descriptor for listening. ]]
|
2017-11-08 22:59:04 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
implements {
|
|
|
|
Efl.Object.constructor;
|
|
|
|
Efl.Object.destructor;
|
|
|
|
Efl.Object.finalize;
|
|
|
|
Efl.Object.parent { set; }
|
|
|
|
}
|
|
|
|
}
|