Commit Graph

39 Commits

Author SHA1 Message Date
Mike Blumenkrantz ca86b98e40 build: fix elm header usage
.c files in src/lib/elementary should only include elm_priv.h to ensure
that all the include ordering is correct and that all necessary headers
are pulled in

.c files outside of src/lib/elementary should include either/both
Efl_Ui.h, Elementary.h as needed

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9978
2019-09-18 18:04:55 +02:00
Mike Blumenkrantz 3eb121a769 efl.text.interactive: rename events to avoid conflicts
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8265
2019-03-08 12:18:04 -08:00
Mike Blumenkrantz ef5853b6d5 efl_text_cursor: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8119
2019-03-06 13:02:36 -08:00
Mike Blumenkrantz 765fad936b efl_ui_text: emit EFL_UI_TEXT_EVENT_CHANGED events properly
Summary:
these should be emitted any time text is changed in the object

fix T7615, T7417, T6978, T6979
Depends on D7883

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7615, T7417, T6979, T6978

Differential Revision: https://phab.enlightenment.org/D7884
2019-02-07 12:41:52 +01:00
Daniel Hirt b77fc4ed4f Ui text interactive: emit changed,user event correctly 2018-11-26 13:17:07 +02:00
Carsten Haitzler aaecb2579a efl ui text -0 fix warns on unused params/vars 2018-11-09 11:43:59 +00:00
Daniel Hirt b5c739acae Ui text interactive: swap cursors on cursors_get if needed 2018-11-05 17:31:06 +02:00
Daniel Hirt f172de86d6 Ui text interactive: don't use freeze when using legacy cursor_copy 2018-11-05 17:31:06 +02:00
Daniel Hirt 91a43cc723 Ui text interactive: emit selection,changed on selection changes, not cursor 2018-11-05 17:31:06 +02:00
Daniel Hirt 5b29de0388 Ui text interactive: add select_none
This is intended for Ui.Text to clear the selection on selection loss.
2018-11-05 17:31:06 +02:00
Xavi Artigas 6b5ac687c1 Efl.Text_* (from Efl.Text.*)
Including:
Efl.Text.Cursor_* (from Efl.Text.Cursor.Cursor_*)
Efl.Text.Font_* (from Efl.Text.Font.*)
Efl.Text.Format_* (from Efl.Text.Format.*)
Efl.Text.Style_* (from Efl.Text.Style.*)
Efl.Ui.Text_* (from Efl.Ui.Text.*)

Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:49 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Jean-Philippe Andre 2bc583e3e7 text: Another event info fix
I shouldn't have pushed so fast! :)
2017-12-13 15:44:48 +09:00
Jean-Philippe Andre efe99b08ae text: Fix event info in one case
Dunno how to test... but this seems pretty obvious.
2017-12-13 15:41:23 +09:00
Jean-Philippe Andre e5d80f1ced text: Don't use legacy events
Efl.Ui.Text is an EO object, why use the legacy event API?
2017-12-13 15:36:10 +09:00
Jean-Philippe Andre 315c4f761e text: Merge changed,user events
Efl.Ui.Text and Efl.Ui.Text.Interactive were both defining it.
2017-12-13 15:36:10 +09:00
Jean-Philippe Andre 7155256422 text: Fix event propagation (changed,user) 2017-12-13 15:36:10 +09:00
Jean-Philippe Andre 6cea4993e0 elm: Don't do anything before construction
Obviously ui.win is still the ugly exception.
2017-11-07 14:43:22 +09:00
Daniel Hirt 4dc2001dac Ui text: reduce calls to update functions
Reduces calls to update functions when entering text.
Also, remaining calls to update the cursors were moved to the decoration
jobs.
2017-09-12 08:47:12 +03:00
Carsten Haitzler 7abf4715f2 efl ui text - remove useless else + free
string is null so no need to free. not a bug but cleaner and analysers
dont like it.

found by PVS studio
2017-07-29 11:11:21 +09:00
Daniel Hirt d5f781da2b Efl text: replace all usages of cursor handle to same type
Changes cursor handle name from 'Efl.Text.Cursor.Cursor_Data' to
'Efl.Text.Cursor.Cursor'.
Also, replace all usages of Efl_Canvas_Text_Cursor
with Efl_Text_Cursor_Cursor as the handle for the cursor.
2017-07-17 16:51:45 +03:00
Daniel Hirt 22c39d4ee5 Ui internal text interactive: handle signed cursor position
CID 1377551.
2017-07-17 16:50:31 +03:00
Mykyta Biliavskyi f5b1cb89a0 Text cursor: fix macOS build.
On macOS build failed with
lib/elementary/efl_ui_internal_text_interactive.c:801:50: error: too few
arguments to function call, expected 2, have 1
2017-06-12 13:46:48 +03:00
Daniel Hirt 616a60f041 Efl text: shorten naming of methods
eo_prefix are set to "efl_text".
Also, "Efl.Text.Format" is shortened to now include the "_format"
prefix.
"Efl.Text.Font" keeps the "_font" prefix, for better readability.
2017-06-12 00:32:34 +03:00
Daniel Hirt 869da955ec Text: enhance cursor_get to ask for a "get type" 2017-06-12 00:10:05 +03:00
Daniel Hirt 30f74a759d Text cursor: add interface and implement in Canvas.Text 2017-06-11 23:58:52 +03:00
Daniel Hirt 49b838c448 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-11 23:58:52 +03:00
Daniel Hirt e55b91aa91 Ui text: use 'wrap' and 'multiline' properties 2017-05-28 15:34:26 +03:00
Daniel Hirt ac59549a79 Ui text interactive: fix passing of wrong object 2016-12-12 10:48:28 +02:00
Thiep Ha cc7dbde840 text/entry: add more key controls for os x
In OS X, cmd-c,v, ... keys are used instead of ctrl-c,v...,
this patch adapts these key handlings.
2016-09-23 17:51:37 +09:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Tom Hacohen 2fd8861874 Ui text: Add an editable variant (tiny wrapper).
As part of this commit, also add a way to change whether the widget is
editable or not.
2016-06-22 14:34:38 +01:00
Jean-Philippe Andre 269fc4f7a6 evas: Remove common interface and use provider_find
Evas.Common_Interface not only had a bad name, it also
wasn't in line with how we can get a loop object, for
instance.

Use eo_provider_find in each implementing class.
2016-06-21 16:13:04 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre c8ee5583a9 Evas: Fix warnings in Efl.Ui.Text
clang being overzealous with -Wmissing-field-initializers
2016-06-17 19:32:43 +09:00
Tom Hacohen eabf319b11 Ui text interactive: introduce this new object (rebase squash)
@feature

Ui text: Add a new interactive version of Canvas.Text

This object is internal and is essentially a Canvas.Text that accepts
key and mouse input. It should be used by Ui.Text as the text
layout/input driver.

Ui text interactive: Add include guard to header.

Ui internal text: Improve input handling support and add selection.

Ui internal text: Add a lot of imf stuff.

Add more text selection handling code.

Add support for allowing selection.

Efl.Ui.Text.Interactive: (reword) code format fix.

Efl.Ui.Text.Interactive: Remove useless struct members.

Add multiline toggle support and a constructor.

Text interactive: Add support for legcay newline.

Text interactive: Use the new cursor_equal function.

Efl.Ui.Text.Interactive: (Rebase split) fixup cursor

Efl.Ui.Interactive: (Rebase split) fixup line_jump_by usage

Text interactive: Cleanup tab/return handling.

Text interactive: Use cursor_equal more.

Text interactive: Simplify and unify selection handling in key input.

Text interactive: Fix user text change reporting.

This is useful for implementing undo/redo.

Text interactive: Add documentation to event.

Efl text interactive: (Rebase reword) Add a new interface to be used later.

Ui text interactive: Migrate one missing change_info call.

Ui text interactive: Mark the correct type for the change event.

Ui text interactive: (Edited) Move to elementary and add "selection,changed".

This is useful for implementing selection handlers. We had to move it to
elementary because we started referencing cursors.

Ui internal: Emit an event for selection changed.

Ui text interactive: Remove unused code.

Ui text interactive: Remove more unused code.

Ui text interactive: Remove more unused code.

Ui text interactive: Rename improperly named function.

Ui text interactive: Update code to the new canvas text api.

Ui text interactive: provide access to the selection cursors.

This is the new API for manipulation selection outside of the object.
Just manipulate these cursors to manipulate the selection.

Fix previous commit.

Ui interactive: Clean up internal functions.

Ui interactive: Fix abuse of selection in word deletion.

Ui text interactive: Fix selection.

Ui text interactive: Fix right key to move next.

Ui text interactive: Fix selection using keyboard.

Ui text interactive: Don't emit selection changed events twice.

We now use the cursor changed event to track changes, so no need
to manually emit events ourselves.

Ui Text interactive: Remove selection,cleared signal, use changed instead.

If the selection cursors are equal, there's no selection, if they are
different, there is.

Ui text interactive: remove redundant code.

Ui text interactive: Don't emit selection changed events on init.

Ui text interactive: Remove unused variable.

Efl.Ui.Interactive: fixup char_coor usage

Ui text interactive: Fix some fixmes.

Ui text interactive: fix selection_cursors_get

Ui text interactive: Skip key down events if marked ON_HOLD.
2016-06-16 19:15:20 +01:00