Commit Graph

70 Commits

Author SHA1 Message Date
Cedric BAIL 327593e9b4 elementary: rename Efl.Selection -> Efl.Ui.Selection as it is only usable with User Interface related element.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7505
2019-01-02 11:03:49 -08:00
Daniel Hirt fed99f8d13 Ui text: implement efl_part and part_text API to text_set 2018-11-26 13:17:07 +02:00
Jaehyun Cho 2d460e52e4 elementary: remove Efl.Ui.Layout namespace
Summary:
Efl.Ui.Layout namespace is removed to keep consistency with other
widgets.
Consequently, "Efl.Ui.Layout.Object" is renamed to "Efl.Ui.Layout" and
"Efl.Ui.Layout." is renamed to "Efl.Ui.Layout_".

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers, SanghyeonLee, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7291
2018-11-16 11:11:13 +01:00
Daniel Hirt 26c1f2477c Ui text: port widget to new interfaces
This is a big rewrite. In addition to implementing functionality with
the new Efl interfaces, a lot of legacy (Elm) code was removed.

A lot of work is squashed in this patch as the widget would've been
completely broken otherwise.

The major changes are:

Life-cycle:
  - Code was split to have 'finalize'
  - Item anchors (emoticons, images) were rewritten to have proper
  life-cycle

Scrolling logic:
  - Efl.Ui.Internal_Text_Scroller widget was added, and replaces the old
  Elm.Interface_Scrollable implementation. Singe-line and multi-line
  modes were fixed as well as sizing calculations. The object is now
  swallowed inside the Ui.Text widget.

Copy and paste:
  - Code was converted to Efl.Selection logic.

Modified tests:
    elementary_test -to "efl.ui.text"
    elementary_test -to "efl.ui.text label"

Added tests:
    elementary_test -to "efl.ui.text inputfield"

Removed test:
    elementary_test -to "efl.ui.text.async"
2018-11-05 18:17:42 +02:00
Xavi Artigas e31b3213ec efl: rename Efl.Ui.Text.Change_Info -> Efl.Ui.Text_Change_Info 2018-05-23 17:33:47 +02:00
Xavi Artigas 0e848ccf2d efl: rename Efl.Selection.* -> Efl.Selection_* 2018-05-23 17:33:47 +02:00
Xavi Artigas 35bbedc96f 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-19 01:42:26 +02:00
Xavi Artigas 6a98b84cd7 Efl.Ui.Layout.Object (from Efl.Ui.Layout)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:54 -07: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
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Xavi Artigas a26fbbbc66 Efl.Canvas.Text_* (from Efl.Canvas.Text.*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:29 -07:00
Xavi Artigas 9dcc31ed4a Efl.Access.Object (from Efl.Access)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:24 -07:00
Mike Blumenkrantz d17b8a23d9 Efl.Access.Text: resolve more name conflicts
text -> access_text
attributes -> text_attributes
selection -> access_selection
2018-02-15 13:28:49 -05:00
Mike Blumenkrantz b493f15069 Efl.Access.Editable.Text: content -> text_content 2018-02-15 13:28:48 -05:00
Mike Blumenkrantz 26ea82f975 Efl.Ui.Text: password -> password_mode 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 8b7bbb2398 efl.access: name -> i18n_name 2018-02-15 13:11:00 -05:00
Jean-Philippe Andre 27c0d53f9b efl_ui: Disable includes that don't compile
Efl.Ui.Text:
The EO file contains a lot of references to legacy Elm types, which are
defined in elm_general. They should be checked and moved over to
efl_ui.eot if necessary.

Efl.Ui.Multibuttonentry:
This class was originally supposed to be based on a Model Item but as of
now the API is still uncertain, so MBE itself hasn't been worked on
more. Disable this from EO-only apps until its API is fixed.

Ref T6666
2018-02-06 21:27:37 +09:00
Sungtaek Hong 549c781310 eolian_gen: remove reference to elm_entry because it is not installed
Summary:
elm_entry.eo is not installed to system directory like
         "/usr/local/share/eolian/include/elementary-1", and
         eolian_gen tries to refer elm_entry.eo which results in failure.

Test Plan:
Create any eo class file which inherits Efl.Ui.Layout.
           eolian_gen eo_file.eo
           observe eolian_gen finishes

Reviewers: jpeg, herdsman, woohyun, Jaehyun_Cho, cedric

Subscribers: conr2d, id213sin, JongminLee

Differential Revision: https://phab.enlightenment.org/D5760
2018-01-24 18:51:26 +09:00
Jean-Philippe Andre 20570f74d3 widget: Move on_focus_update to Focus.Object
Following @taxi2se's recommendation. This is indeed a focus method, and
Widget already inherits from Focus.Object.

Ping @bu5hm4n who probably wants to adapt this further.

Ref T5363
2018-01-19 17:30:04 +09:00
Daniel Hirt 4a905a22a4 Canvas image: add Efl.Canvas.Text.Factory + use in Ui.Text
This interface has a simple 'create' method to create Efl.Canvas.Object
given a key.
This is used higher-up in Ui.Text in the next commit.

Ui text: add ability to set item factories

Added API to set an item factory object.
This is similar to the previous item providers (that worked with
callbacks).

You instantiate a factory object and set it on the Ui.Text object.
Each factory implements the "create" method from
Efl.Canvas.Text.Item_Factory.

This also includes 3 public factories (Image, Emoticon and Fallback):
  - Image factory: creates images from added entries (key strings)
  - Emoticon factory: creates emoticons by querying the theme
  - Fallback: creates image, then falls back to emoticon

If no factory is set, then the fallback (internal) factory is used.

See the added "Ui.text Item Factory" test in elementary_test for an
example of usage.

@feature
2018-01-18 10:20:28 -08:00
Jean-Philippe Andre 15d32fd4cc ui.text: Use proper EO type for cnp mode
It's not working. Just "fixing" the API for consistency.
Also, we're lacking a proper hint for "markup without images".

So I think EFL_SELECTION_FORMAT_MARKUP should be without images, while
EFL_SELECTION_FORMAT_MARKUP | EFL_SELECTION_FORMAT_IMAGE would allow
markup with images.

Ping @thiep.ha

Ref T5329
2018-01-18 16:27:57 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Andy Williams 345c59ad3b docs: Update elementary eo files for grammar and readability
Author: Nate Drake
2018-01-04 12:29:11 +00: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
Youngbok Shin 300ded6c30 efl_ui_text: apply new theme logic and use constructor/destructor
Summary:
It removes legacy aliases from efl_ui_text's theme.
And it also move all code from group add/del overriding functions to
constructor/destructor.
@fix

Test Plan: N/A

Reviewers: jpeg, taxi2se

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5601
2017-12-08 16:02:24 +09:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +09:00
Lukasz Stanislawski 57aefc53c1 elm: rename Elm_Interface_Atspi_Accessible interface
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5341
2017-10-19 10:13:54 +09:00
Jean-Philippe Andre 72f1fbf4f1 widget: Rename focus_region (EO)
This region has little to do with focus, as it's more of a region of
interest within the widget, and not directly related to the highlight
geometry, for instance. It's related to focus in the sense that only
widgets with focus would really care about this region.

I decided to change this name after talking with @bu5hm4n.
Note that gengrid uses this but is also completely broken (the focus
highlight floats around and you don't even see the focused item).

Note: This is very close to show_region but I'm not sure those can be
merged safely (since the default "focus_region" is NULL while the
default "show_region" is the widget's geometry).

Ref T5363
2017-10-12 19:33:04 +09:00
Marcel Hollerbach 6bc769b317 efl_ui_text: remove old api! 2017-10-10 19:28:46 +02:00
Lukasz Stanislawski b3ffd78237 elm: rename Elm.Interface.Atspi.Text => Efl.Access.Text
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5167
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 1e0b005829 text: Remove unused EO structs
Bad copy & paste?
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre c0d7ea4af0 widget: Rename on_focus to on_focus_update (EO)
on_focus seems to imply that focus was just given to the widget, but
that function is called on any focus change (in and out).

Ref T5363
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre d928ba989a widget: Merge on_focus_region and focus_region_get
This simplifies code and API.

Ref T5363
2017-08-29 14:30:35 +09:00
Jean-Philippe Andre 0e98f57d6d widget: Rename hook "activate" (EO)
This is for accessibility only. Protected function.

Also marked as beta as elm_access isn't going to be stable in EO (yet).

Ref T5363
2017-08-29 10:40:53 +09:00
Jean-Philippe Andre 6aa309ffb8 widget: Rename hook "disable" (EO)
Renamed to on_disabled_update.
Also passed in the new state of disabled. It's more convenient this way,
than having the subclasses call disabled_get.

Also simplify some code...

Ref T5363
2017-08-29 10:40:53 +09:00
Jean-Philippe Andre 3f9c239b27 widget: Make sub_object add/del protected (EO)
Also prefix with widget.

I want to rename this as child rather than sub. It's inconsistent with
the other parent/child hierarchies. Anyway the various hierarchies are
confusing, so let's keep this name :)

Ref T5363
2017-08-23 20:56:37 +09:00
Jean-Philippe Andre 9a2d4928f0 elm: Rename elm_layout to Efl.Ui.Layout
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.

This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.

Ref T5315
2017-08-08 13:25:58 +09:00
Jean-Philippe Andre 6864495c99 elm: Move elm_layout_sizing_eval to legacy
elm_layout_sizing_eval() marks an object as requiring recalc.

Unfortunately, it's been massively abused by various widgets into
actually doing the calc, or the min calc. So we end up with one API
that has 3 different definitions depending on the widget type:
1. Mark as requiring recalc (correct, respects doc, elm_layout)
2. Calculate min size and other size hints
3. Actually do some geometry modification

I believe we need to clarify these 3 requirements into 3 very clear
and specific APIs in elementary. Right now we have similar functions
in evas for 1 (evas_object_smart_changed) and 3 (smart_calculate).
But their exact definition also isn't necessarily what we want for
elementary.

Another clear problem is that layout_eval does not do any calculation
(in theory), so the "eval" word is a bit of a stretch here.

Once we're sure about the exact API we want, we can add this back to
EO and make it work across our EO widgets. For now let's just keep
the legacy API, and its EO overrides, as is.

Ref T5315
2017-08-08 11:10:56 +09:00
Jean-Philippe Andre 3e5cfb83c0 elm: Remove custom layout signal APIs
This merges them with the now standard interface:
  Efl.Canvas.Layout_Signal

Some wrapping work was required for legacy API which
takes no user_data in del() but instead returns it. The
new EO function, while harder to use, is more correct
(you can't delete the invalid callback by accident, and
this follows EO events design).

Another crazy wrapping was done in entry/text in order
to add the callbacks to 2 objects instead of just one,
and still return the user data.

As for Naviframe and Popup, those two widgets override
signal_emit to forward the call to another object than
the resize object, but not callback_add/del. So they
are definitely broken.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre a4940ae6c9 layout: Remove method theme_enable
This was an internal thing, ugly, replaced by another ugly
solution, but maybe less ugly.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 796d4b138b elm: Make content and text aliases internal only
This removes the APIs from the EO API.

Ref T5315
2017-08-04 10:24:03 +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 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 3eb649b180 Elm layout: replace 'text' property with 'efl_part' interface
The expected usage is efl_text_set(efl_part(layout, part), text);
Same for text_get.

Also, added an example how to make API easier with providing
efl_text_set/get for the widget itself, in efl_ui_button. Please see
this example.
2017-06-05 02:08:03 +03:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre af3cb10185 evas: Remove Evas.Coord from EO
This may be a bit more controversial...
But Evas_Coord really is just an int and all the internals
of EFL assume that the base coordinate type is a 32-bit int.
So this type is a bit redondant and can't easily be changed
to, say, a float or int64.

Ref T5312
2017-05-15 17:26:42 +09:00
Daniel Kolesa 45e6a3e86a eolian: disallow duplicate implements 2017-01-02 16:09:04 +01:00
Daniel Kolesa 6d9d15d35c elm: use new property implement syntax everywhere 2016-12-27 19:16:02 +01:00
Daniel Hirt 43949062eb Ui text: remove unimplemented imf api 2016-12-12 11:21:01 +02:00