Commit Graph

119 Commits

Author SHA1 Message Date
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +09:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +09:00
Amitesh Singh 10103b9b45 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:38:39 +09:00
Amitesh Singh 29b47e0a07 focus: remove focus.get{} from widget.eo
This is taking care by focus manager now.
2017-11-29 19:25:14 +09:00
Marcel Hollerbach 149d03d8f4 efl_ui_text: remove the event emits here
with the previous commit we emit the legacy events for each interface
event, and thus this event is not needed.

However, in elm_entry this means that changing editable will _not_
reemit the focus event (where i am not that sure if that is correct or
not).
2017-11-21 20:37:21 +01: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
Jean-Philippe Andre 1b481f0ae8 widget: Rename events to EFL_UI_WIDGET_EVENT_XXX
This only affects the events (and the data type has an alias).

Ref T5363
2017-10-24 14:37:45 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +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 c9c9e6a209 elm: Rename Elm.Activate to Efl.Ui.Activate
Note: This is an EO-only beta API.

Ref T5329
2017-10-17 17:31:38 +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
Daniel Hirt ad3199ffc8 Ui text: use proper Efl.Text API to set text
Fixes error message during initialization.
2017-09-25 12:51:49 +03:00
Daniel Hirt f5560cb511 Ui text: use eina_value_get and not eina_value_pget
CID 1381328
2017-09-25 12:51:49 +03:00
Jean-Philippe Andre 0339ad7740 elm: Move base implementation for efl_part in widget
This means that ALL part handles inherit from the base part class
Efl.Ui.Widget.Part. Layout is the only exception where Efl.Part is
specially overridden.

This is a first step towards generic part APIs, including background in
all widgets.
2017-09-21 12:27:33 +09:00
Daniel Hirt 1a854d892f Ui text: add Efl.Ui.Text_Async object
Adds "Efl.Ui.Text_Async" object.
This new widget uses the "async_layout" functionality of the underlying
Efl.Canvas.Text object.

Currently, if "editable" mode is enabled, there is no asynchronous
layout, as interactive operations (e.g. typing) should get processed
immediately. Thus, only "non-editable" instructs the text object to do
asynchronous layout.

@feature
2017-09-20 14:50:09 +03:00
Daniel Hirt acd1c409a0 Ui text: add null checks for anchor update
Add null checks in case item was not found.
Also use one more emoticon to test the provider.
2017-09-20 09:19:33 +03:00
Daniel Hirt d44131a3aa Edje: move selection-related part_text API to legacy 2017-09-20 09:19:33 +03:00
Jean-Philippe Andre 1e0b005829 text: Remove unused EO structs
Bad copy & paste?
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
Jean-Philippe Andre d5a31f3f30 edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.

As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.

Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.

Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.

This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)

Ref T5315
Ref T5306
2017-09-13 13:53:49 +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
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 b6bab481aa widget: Mark old focus API as beta.
It's not beta. It's about to die.
Also, move #define ELM_WIDGET_BETA to the common header file, as it is
consequently required by ALL widgets. :(

Ping @bu5hm4n :)

Ref T5363
2017-08-31 11:22:04 +09:00
Jean-Philippe Andre a82ab33bed widget: Use rectangle in show_region
Also make it a property. It's asymmetric because of the force show
argument, but the get is much cleaner.

Ref T5363
2017-08-30 17:29:52 +09:00
Jean-Philippe Andre 00862c3c9c widget: Use rectangle on the stack for region_show
Follow @k-s recommendation and simply use rectangles on the stack rather
than by pointer.

Ref T5363
2017-08-30 17:29:52 +09:00
Jean-Philippe Andre 233068c30c widget: Simplify code with rectangle (EO)
This replaces x,y,w,h with a rectangle in parts of the focus_region
code.

Ref T5363
2017-08-29 14:30:39 +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 06ec847a7c widget: Use EO function pointer for on_show_region
This is as much a test of the EO function pointer as it is a clean up of
this widget API.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre dee61f4097 elm: Cleanup theme and style set functions
This makes efl_ui_layout_theme_set() return a Theme_Apply error
code. The type is now public as Efl.Ui.Theme.Apply.

Ref T5329
Ref T5363
2017-08-09 17:08:24 +09:00
Jean-Philippe Andre 2450038436 widget: Remove sub_obj arg to resize_object_set
This removes an argument that was false only for a single widget:
naviframe. Hopefully this logic is now simpler, even though it involves
a small hack within naviframe itself.

Ref T5363
2017-08-09 12:21:42 +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 4923945f81 Text: move Annotation type to Efl.Text.Annotate namespace 2017-07-17 17:38:28 +03: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 e7f7636ac1 Ui text: don't send focus action to cursor on init
It made the cursor animation start on init, even if widget wasn't
focused.
2017-07-17 16:50:31 +03:00
Daniel Hirt 02a607f360 Ui text: set default color (white) 2017-07-17 16:50:31 +03:00
Daniel Hirt f3fff0c687 Ui text: defer region show to job
This moves the region-show logic to the proper update job where
cursors are also updated.
2017-06-21 11:29:34 +03:00
Daniel Hirt ec02b5f3fb Ui text: fix cursor api call
This widget doesn't have a text part.
2017-06-21 11:29:34 +03:00
Jean-Philippe Andre ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00