Commit Graph

115 Commits

Author SHA1 Message Date
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
Jaehyun Cho 4b18e754de elm_part_helper: Change macro name for default content part 2017-11-29 13:43:21 +09:00
Prasoon Singh 8b0c8c2eb7 elm_entry : Added access action interface in entry.
Summary:
Added access action interface in entry. On activate action from atspi client , entry will emit click signal and input panel
would be shown.

Test Plan:
When activate action comes,  entry will emit click signal and input panel
should be shown.

Reviewers: shilpasingh, kimcinoo

Reviewed By: shilpasingh

Subscribers: cedric, jpeg, rajeshps, govi

Differential Revision: https://phab.enlightenment.org/D5544
2017-11-28 09:56:32 +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
Marcel Hollerbach 07cb2d2dcd efl_ui_focus_object: document the bahaviour of the manager property 2017-11-15 13:21:22 +01:00
Jean-Philippe Andre d39bbc1491 elm: Create legacy widgets with elm_legacy_add
This will be used to solve issues around style_set:
if the widget is legacy or pure eo we may need to select a different
style. So in the constructor we need to know whether we are legacy or
eo. Note that calling style_set in finalize only is too late as we would
lose information such as efl_text_set() called inside efl_add().
2017-11-07 14:50:31 +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
Marcel Hollerbach 0b81f9c808 elm_entry: correctly emit unfocus signals to the edje object 2017-10-20 11:54:08 +02: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 265a26f68e elm_entry: 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 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 d44131a3aa Edje: move selection-related part_text API to legacy 2017-09-20 09:19:33 +03:00
Jean-Philippe Andre a72f3ec64e efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
2017-09-18 16:33:33 +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
Shinwoo Kim 2f6e28881e elementary: atspi accessible name uses plain text
The markup information of accessible name is not necessary.
2017-09-06 19:54:59 +09:00
Shinwoo Kim 0e885e41e5 elementary: enhance accessible name of elm_entry
The accessible name of elm_entry was guide text.
The accessible name of elm_entry should be its text.
If there is not text information, then guide text is using for accessible name.
2017-09-06 09:58:07 +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 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 e9dffa723d win: Add Efl.Ui.Win_Inlined and remove parent2
Inlined windows are the only use case for parent2. We might as well want
to create a separate subclass for those special windows.

Ref T5322
Ref T5363
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 2efa25511f Elm entry: fix call to set text via entry_set
Accidentally called the super here, so did not get routed to
'_elm_entry_text_set'.

Fixes T5803.
2017-07-28 12:36:07 +03:00
Mike Blumenkrantz fe48334c59 elm_entry: don't use window_id to determine type of window
there's a real function for this...

ref a173efd0a9
2017-07-07 15:22:24 -04:00
Mike Blumenkrantz 378ac8b6aa elm_entry: don't update PRIMARY selection under wayland
this doesn't exist yet, and elm_cnp forces PRIMARY updates to overwrite
CLIPBOARD which is not good

@fix
2017-07-07 15:22:23 -04:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Jean-Philippe Andre 075b4a7a0c elm: Remove EOLIAN tags in some files
Some functions were marked as EOLIAN when in fact they were
used by the ELM_PART override APIs.
2017-07-05 20:07:29 +09:00
Jean-Philippe Andre 59081043a8 elm: Always pass valid part name inside part APIs
This affects the legacy content_set/get/unset part APIs. This
should avoid some unwanted ERR messages in case an elm_object_
API is used on an elm widget that doesn't implement said API.

What this does is request the widget for the name of the default
part if NULL was passed in. Since some widgets are not elm_layout,
they have to override the API themselves, which is why I made it
an internal EO API (rather than a series of efl_isa()).

In theory, part should never be NULL when reaching the internal
implementation code in the widgets, at least for content.

In EO, efl_part(obj, NULL) should be invalid.

Ref T5629
2017-06-30 14:37:54 +09:00
Sungtaek Hong 82a955be90 elm_entry: use layout text/content aliases when text_set/get content_set/get/unset
Summary:
- elm_entry has elm.guide text part and it can be set by "guide".
- However when using text_aliases_get, this cannot be found.
- Add elm_obj_elm_layout_part_aliasing_eval() internal APIs to make entry
  use proper aliases.

Test Plan:
1. Run elementary test
           2. Observe search entry has guide text with "guide" part.
           3. Run Entry 8.
           4. Observe "elm.guide" part also works.
           5. Observe "icon" and "end" part works.

Reviewers: id213sin, herdsman, jpeg

Reviewed By: jpeg

Subscribers: conr2d, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4962
2017-06-30 14:37:54 +09:00
Jihoon Kim 1dcf2c814c elm_entry: Add prediction hint API
prediction hint can be used to provide an intelligent reply suggestion.

@feature
2017-06-26 13:44:58 +09:00
Jean-Philippe Andre a173efd0a9 cnp: Fix copy & paste in inwin inside wayland
Scenario:
  ELM_DISPLAY=wl elementary_test -to "Window Inline"

Copy & paste some stuff between entries inside the inwins and
also in a standard window.
2017-06-15 17:35:44 +09:00