Commit Graph

83 Commits

Author SHA1 Message Date
Amitesh Singh 7144f278f5 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:19:29 +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
Jean-Philippe Andre e9ebe5c676 elm: Define and rename internal atspi struct in EO
This thing is used by only 2 EO APIs that are marked as @beta. I wonder
if the @beta tag or the ptr() expression made it work for eolian,
because it simply wasn't defined in EO.

I'm renaming it just so that it's more consistent with the new names
used by atspi (and EO API in general).
2017-11-16 12:00:18 +09:00
Lukasz Stanislawski c838e30a24 elm: Rename elm_interface_atspi_widget_action mixin
Reviewers: jpeg

Subscribers: jenkins, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5400
2017-11-16 12:00:18 +09: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 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
Marcel Hollerbach 124586c8e4 elm_toolbar: make the manager customisable
so the toolbar items can be registered correctly
2017-10-16 11:02:13 +02:00
Marcel Hollerbach f32359baba elm_toolbar: port to composition 2017-10-16 11:02:13 +02:00
Cedric Bail 59b417c378 elementary: we actually do not use that variable. 2017-10-13 12:58:01 -07:00
Marcel Hollerbach d24c00d2be elm_toolbar: use prepare to get focus into the items again 2017-10-13 12:31:48 +02:00
Marcel Hollerbach 5ca9853eda elm_toolbar: remove old api! 2017-10-10 19:28:47 +02:00
Marcel Hollerbach 4cb080b31c elm_toolbar: we need to register the items in the submanager 2017-10-10 19:28:30 +02:00
Marcel Hollerbach e5d1c1f195 Revert "elm focus manager - dont leak child lists when updating focus order"
This reverts commit bd6dcbb044.

This was not fixing the issue, just ducktaping over a bug in eolian, the
bug is now probebly fixed in eo / eolian.
2017-09-29 11:28:15 +02:00
Jean-Philippe Andre e9dfcb44ff widget: Implement translation API in layout
This moves the API entry points from Widget to Layout parts. I don't
think the other widgets support translation, but that is easy to fix.
The actual code implementation remains in elm_widget.c.

Legacy-only widgets are covered by Part_Legacy, while all EO widgets
that have text inherit from Layout (except Win but I don't think the
window title was translatable in legacy).

This removes 2/3 remaining part APIs from Widget.

Ref T5363
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 839c4ed395 elm: Introduce interface Efl.Ui.Translatable
This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).

For now I'm taking the following approach:
 - All efl_text_set/get strings are untranslatable, i.e. get() returns
   the visible string, set replaces and can not be translated.
 - translatable_text_set/get needs to be used to enable automatic
   translation, which in turns calls efl_text_set to modify the visible
   string. Thus, translatable applications will have to use
   efl_ui_translatable_text_set a lot more than efl_text_set, unless
   they translate strings application-side.

Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.
2017-09-26 17:58:07 +09:00
Lukasz Stanislawski 3e6cc83369 elm: rename Elm.Interface.Atspi.Selection => Efl.Access.Selection
Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5165
2017-09-19 11:18:22 +09: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
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
Marcel Hollerbach c51f35d42a elm_widget: move the complete regsiter/unregister logic
We had here a little problem, state focus_state_eval function handled
the unregisteration and consideration of the focus flags and then only
called a helper function (which was a widget function), that then did
the registeration in logical or regular mode.

Elm scroller for example took that function overwrote it and did onyl
permit logical registrations. Then again a evaluation of the focus state
and flags took place, and the function considered elm_scroller should be
registered as regular object, but found it to be logical. This lead to
the problem that we permantently unregistered Elm.Scroller and
registered it again as logical just to unregister it again. This was on
the one side a performance downside. But also a bug since all items from
within the Elm_Scrollers sub manager are getting reparent onto the
parent, which means not the root of the scroller (the scroller itself)
is the logical entrypoint to the widget but rather this reparented
widget, which led to unexpected focus  warps like described in T5923.

tldr: this fixes T5923
2017-09-02 21:10:56 +02: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
Carsten Haitzler bd6dcbb044 elm focus manager - dont leak child lists when updating focus order
REALLY fix T5800 by duplicating lists rather than taking ownership

@fix
2017-08-31 17:34:30 +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 f90d0d1501 widget: Simplify & document "translate"
This is a protected function. It doesn't need to return anything, as all
implementation just returned true, always. Also, the legacy API was just
a wrapper doing nothing special (except verify that we have a widget,
which the recursive code already does).

Tested with fr_FR :)

Ref T5363
2017-08-30 18:54:59 +09:00
Jean-Philippe Andre 8c1f771a67 widget: Use rectangle for focus_hilight
Ref T5363
2017-08-29 16:22:47 +09:00
Jean-Philippe Andre 0a0bbe5fda widget: Rename hook "access" (EO)
This is also another protected and beta API. Meant to be overridden by
subclasses, but belongs to a still unstable API.

The difference between the internal legacy and the EO API is really bad.
Same as with activate (previous commit).

Ref T5363
2017-08-29 10:40:53 +09:00
Jean-Philippe Andre 20a5968c12 elm: Use a macro to handle key bindings
This factorizes the code and makes most widgets handle key down events
in the same way:
 - check that the object is not disabled, event is not on hold
 - figure out the key binding based on the class name
 - mark event as on hold

The class name is usually MY_CLASS_NAME but in some cases it was
MY_CLASS_NAME_LEGACY which may be different from the EO class name (eg.
elm_win vs. Efl.Ui.Win). In that case the key bindings are broken.

This breaks key bindings for the following widgets:
 - Win (focus)
 - Image ("clicked")
 - Video (move, play)

This fixes key bindings for the following widgets:
 - Nstate

Some widgets remain broken:
 - Photocam / Efl.Ui.Image.Zoomable

A patch will be applied to restore the key bindings for the above
breaks.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 069747b9de widget: Add eo event info inside widget_event
This is an internal function that should probably become an overridable
protected method, as it's required for proper event handling in widgets.
Next step: use eo_event_info in the widgets implementations. Then remove
legacy event struct.

Ref T5363
2017-08-23 11:16:45 +09:00
Marcel Hollerbach d4cd85aa55 efl_ui_focus_manager: split this of tinto a class and a interface
it turns out to be very handy to have a interface for the moving and
border elements, that is unconnected to the way of how widgets are
registering themself.

This for example enables us to get a simple focus manager that just
redirects the call into a internal 2 dimensional data struct
2017-08-10 20:55:50 +02:00
Jean-Philippe Andre a28b89304e toolbar: Switch to Efl.Ui.Dir (EO)
Ref T5870
2017-08-10 14:42:08 +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
Marcel Hollerbach 47ce995637 elm_widget: give feedback if registration was successfull or not
with this we can whipe out the focus.manager field in elm.widget so for
the case that something goes wrong we only get the error message where
actually something went wrong, and not the whole bunch of follow ups
where the code assumes its registered but it isnt.
2017-07-24 23:40:38 +02: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 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
Marcel Hollerbach a6c5ce4b32 elm_toolbar: do not focus a separator 2017-06-10 18:03:08 +02:00
Bowon Ryu a4e54adb0c elm_toolbar: added to ensure different sizes of items in shrink mode.
Change-Id: I9f8a14e77a8859c9a7543e442f8355d5ef5c0d3d
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
2017-05-30 15:41:05 +09: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
Marcel Hollerbach 0ebe80fa0b efl_ui_focus_manager: rename api from geometry to focus_geometry
otherwise we would clash with efl.gfx.
2017-05-04 20:44:41 +02:00
Marcel Hollerbach b056857093 focus: update object definition
Summary: This introduces a new focus system and the migration to this system.

Test Plan: run elementary_test

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D4511
2017-04-20 14:38:58 +02:00
Jee-Yong Um 6d0a2398ad Elm.Widget: rename "event.*" methods to solve name conflict
Summary:
Elm.Widget.event_callback_add conflicts with Efl.Object.event_callback_add.
To solve this problem, "widget_" prefix is added to methods starting with
"event".

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4521
2017-01-03 10:59:49 +09:00
WooHyun Jung 8c870848b0 elm_toolbar: remove wrong focus highlight checking
Because of this focus_highlight checking, focus never goes
to the first item when toolbar gets focus at the first time.

@fix
2016-12-02 16:56:43 +09:00
Amitesh Singh 1f3f66b662 elm: fix compliation warnings in dbus menu & toolbar
These warnings were serious problems.
Thanks to stefan for reporting.
2016-11-30 18:33:59 +05:30
Amitesh Singh a58e2e1a79 Menu,Item Interface: Common interface for menu, toolbar and ctxpopup
Summary:
efl_ui_menu interface provides common functions of menu, toolbar and ctxpopup.
efl_ui_item interface provides common functions of menu_item, toolbar_item and ctxpopup_item.
Also implemented some missing functions like selected_item set/get in ctxpopup.
efl_ui_item interface should be used for other widget items as well.

Test Plan: elementary_test

Reviewers: jpeg, felipealmeida, raster, SanghyeonLee, cedric, yashu21985

Subscribers: bu5hm4n

Differential Revision: https://phab.enlightenment.org/D3897
2016-11-30 17:59:56 +09:00
YeongJong Lee 6584c6cc27 elm_toolbar: refactor _elm_toolbar_item_icon_obj_set function
Summary:
In order to natural animation in horizontal item theme,
remove duplicated operation in elm_toolbar_item_icon_obj_set function.

Test Plan:
Change to other icon using elm_toolbar_item_icon_obj_set function in horizontal item theme.
or in edi, click Logs/Console/Tests button on bottom toolbar

Reviewers: raster, ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4326

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-28 11:35:27 -08:00