2016-08-13 00:50:29 -07:00
import eina_types;
efl: apply the stabilzed column of the efl api board
Summary:
The project https://phab.enlightenment.org/tag/efl_api/ has been used in
the last few weeks to figure out which classes can be stablized and
which cannot. This commit moves those dedicated classes outside beta.
And makes them stable.
ref T7601
ref T7600
ref T7599
ref T7598
ref T7597
ref T7596
ref T7594
ref T7593
ref T7591
ref T7590
ref T7589
ref T7588
ref T7583
ref T7582
ref T7581
ref T7576
ref T7570
ref T7567
ref T7564
ref T7563
ref T7560
ref T7559
ref T7672
ref T7584
ref T7577
ref T7571
ref T7558
ref T7555
ref T7554
ref T7553
ref T7512
ref T7511
Depends on D8272
Reviewers: cedric, stefan_schmidt, zmike, segfaultxavi
Reviewed By: segfaultxavi
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7672, T7601, T7600, T7599, T7598, T7597, T7596, T7594, T7593, T7591, T7590, T7589, T7588, T7584, T7583, T7582, T7581, T7577, T7576, T7571, T7570, T7567, T7564, T7563, T7560, T7559, T7558, T7555, T7554, T7553, T7512, T7511
Differential Revision: https://phab.enlightenment.org/D8273
2019-03-09 04:44:17 -08:00
interface Efl.Io.Reader {
2016-08-13 00:50:29 -07:00
[[Generic interface for objects that can read data into a provided memory.
This interface allows external objects to transparently monitor
for new data and as it to be read into a provided memory slice.
Calls to @.read may or may not block, that's not up to this
interface to specify. The user can check based on @.eos property
and signal if the stream reached an end, with event
"can_read,changed" or property @.can_read to known whenever a read
would have data to return.
@since 1.19
]]
methods {
read {
[[Reads data into a pre-allocated buffer.
This operation will be executed immediately and may or
may not block the caller thread for some time. The
details of blocking behavior is to be defined by the
implementation and may be subject to other parameters
such as non-blocking flags, maximum timeout or even
retry attempts.
You can understand this method as read(2) libc function.
]]
params {
2016-11-01 06:13:42 -07:00
@inout rw_slice: Eina.Rw_Slice @nonull; [[Provides a pre-allocated memory to be filled up to rw_slice.len. It will be populated and the length will be set to the actually used amount of bytes, which can be smaller than the request.]]
2016-08-13 00:50:29 -07:00
}
return: Eina.Error; [[0 on succeed, a mapping of errno otherwise]]
}
@property can_read {
[[If $true will notify @.read can be called without blocking or failing.]]
get { }
set @protected { }
values {
2016-11-01 06:13:42 -07:00
can_read: bool; [[$true if it can be read without blocking or failing, $false
2018-02-12 09:56:31 -08:00
otherwise]]
2016-08-13 00:50:29 -07:00
}
}
@property eos {
[[If $true will notify end of stream.]]
get { }
set @protected { }
values {
2016-11-01 06:13:42 -07:00
is_eos: bool; [[$true if end of stream, $false otherwise]]
2016-08-13 00:50:29 -07:00
}
}
}
events {
2019-02-22 05:50:02 -08:00
can_read,changed: bool; [[Notifies can_read property changed.
2016-08-13 00:50:29 -07:00
If @.can_read is $true there is data to
@.read without blocking/error. If
@.can_read is $false, @.read would either
block or fail.
Note that usually this event is dispatched
from inside @Efl.Io.Reader.read, thus
before it returns.
]]
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
eos: void; [[Notifies end of stream, when property is marked as true.
2016-08-13 00:50:29 -07:00
If this is used alongside with an @Efl.Io.Closer, then
it should be emitted before that call.
It should be emitted only once for an object unless it
implements @Efl.Io.Positioner.seek.
The property @.can_read should change to $false before
this event is dispatched.
]]
}
}