Canvas text cursor: move to Efl.Canvas.Text namespace
Originally it was its own object.
There are some valid claims that there is no justification for it to
remain an object.
Furthermore, it's apparent that it added little benefit: changes of
each cursors, in practice, triggered a query for all objects of the
same textblock. There wasn't real advantage to have a finer resolution
of controlling the cursors with their own events.
This ports back a lot of code, and changes a lot of other code in the
higher-up widgets, such as Efl.Ui.Text and co.
The usage was replaces from:
efl_canvas_text_cursor_char_next(cur_obj)
to
efl_canvas_text_cursor_char_next(text_obj, cur_obj)
that is, it is an operations on the TEXT OBJECT, rather than on the
(now removed) cursor object.
So, one less efl object to worry about now.
Hopefully, the port went smooth.
2017-06-05 04:52:10 -07:00
|
|
|
import efl_text_types;
|
|
|
|
|
2018-04-06 04:30:40 -07:00
|
|
|
interface Efl.Text_Interactive (Efl.Text, Efl.Text_Font,
|
|
|
|
Efl.Text_Format, Efl.Text_Style)
|
2016-06-08 03:45:40 -07:00
|
|
|
{
|
|
|
|
[[This is an interface interactive text inputs should implement]]
|
|
|
|
methods {
|
|
|
|
@property selection_allowed {
|
|
|
|
[[Whether or not selection is allowed on this object]]
|
|
|
|
set {}
|
|
|
|
get {}
|
|
|
|
values {
|
2016-11-17 03:52:44 -08:00
|
|
|
allowed: bool; [[$true if enabled, $false otherwise]]
|
2016-06-08 03:45:40 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property selection_cursors {
|
|
|
|
[[The cursors used for selection handling.
|
|
|
|
|
2018-01-04 04:16:23 -08:00
|
|
|
If the cursors are equal there's
|
2016-06-08 03:45:40 -07:00
|
|
|
no selection.
|
|
|
|
|
|
|
|
You are allowed to retain and modify them. Modifying them modifies
|
|
|
|
the selection of the object.
|
|
|
|
]]
|
|
|
|
get {}
|
|
|
|
values {
|
2018-04-06 04:30:40 -07:00
|
|
|
start: ptr(Efl.Text_Cursor_Cursor); [[The start of the selection]]
|
|
|
|
end: ptr(Efl.Text_Cursor_Cursor); [[The end of the selection]]
|
2016-06-08 03:45:40 -07:00
|
|
|
}
|
|
|
|
}
|
2016-06-22 06:22:27 -07:00
|
|
|
@property editable {
|
|
|
|
[[Whether the entry is editable.
|
|
|
|
|
2018-01-04 04:16:23 -08:00
|
|
|
By default text interactives are editable. However setting this
|
|
|
|
property to $false will make it so that key input will be disregarded.
|
2016-06-22 06:22:27 -07:00
|
|
|
]]
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
editable: bool; [[If $true, user input will be inserted in the entry,
|
|
|
|
if not, the entry is read-only and no user input is allowed.]]
|
|
|
|
}
|
|
|
|
}
|
2016-06-08 03:45:40 -07:00
|
|
|
}
|
|
|
|
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
|
|
|
selection,changed: void; [[The selection on the object has changed. Query using @.selection_cursors]]
|
2016-06-08 03:45:40 -07:00
|
|
|
}
|
|
|
|
}
|