Commit Graph

105 Commits

Author SHA1 Message Date
Marcel Hollerbach 79a5ff6e1e elm_toolbar: fix prio.visible
prio.visible is ignored in case of SHRINK_EXPAND is used. every single
item is just stuffed into a box. Thus in case that the *more flag
indicates that another box is displayed (rather than not fitting items),
then we do not set the visibility flag on the item - as the item is used
anyways.

ref T6806.

Differential Revision: https://phab.enlightenment.org/D7185
2018-11-02 02:22:34 +01:00
Marcel Hollerbach b28bd3ac0a elm_toolbar: handle the cleanup in the invalidate call
there is actaully no need to add the event, we can cleanup the pointer
in the invalidate call. Further more, the event was executed before the
method, thus checks against more_item failed because that was already
NULL. The result have been error messages, this fixes the error.

Differential Revision: https://phab.enlightenment.org/D6496
2018-07-02 18:20:09 +02:00
Marcel Hollerbach c14ea532eb elm_toolbar: fix _item_visiblity
'more' should indicate when a more item is needed, this is needed if one
item is set to visibility false, thus checking this here is required.

 #FocusBug

fix T6806

Differential Revision: https://phab.enlightenment.org/D6495
2018-07-02 18:20:09 +02:00
Cedric BAIL f29e1db94b elementary: make toolbar 'more_item' properly self destruct. 2018-05-24 16:02:19 -07:00
Cedric BAIL 0fe3b7962d elementary: due to lifecycle difference between legacy object and unified object, we need to track their lifecycle more explicitely.
It is my understanding that some items view are created with efl_add directly
and manipulate VIEW directly with Eo new API. This clash with the inconsistent
behavior that evas_object_del expect. To work around this, we track object life
by explictely relying on efl_wref_add while holding the pointer to the object.
2018-05-24 16:02:19 -07:00
Marcel Hollerbach 6c25b38a1c elm_toolbar: only use the more_item if mode is correct
the more item is only usefull for SHRINK_MENU and SHRINK_EXPAND,
otherwise the item should not be there.
2018-05-10 13:34:39 +02:00
Marcel Hollerbach 03c20cc758 elm_toolbar: flush out the items once one is hidden
ref T6806
2018-05-08 12:07:31 +02: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 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
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
SangHyeon Lee 9c8ebc9dfc elm_menu, toolbar, ctxpopup : remove unnecesary interface efl_ui_item and efl_ui_menu
Summary:
Legacy menu toolbar and ctxpopup are not new efl interface widget,
but it have efl interfaces, efl_ui_item and efl_ui_menu.
if we plan to implement this two, it should be a class not a interface,
so I remove it on legacy widget.

Subscribers: cedric

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-04-16 11:03:02 -07:00
Marcel Hollerbach 36d9fdc770 elm_toolbar: use the correct flag to detect wether a item is visible
fix T6806
2018-04-03 14:08:28 +02:00
Mike Blumenkrantz 654656e69d Efl.Access.Selection: clear -> access_selection_clear
maybe there should be a text selection interface...
2018-02-15 13:28:49 -05:00
Mike Blumenkrantz b0bb09ef7a Efl.Access: resolve more name conflicts
children -> access_children
type -> access_type
2018-02-15 13:28:45 -05:00
Mike Blumenkrantz f45e972c8c Elm.Widget.Item: focus -> item_focus 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 5263f311f4 efl_widget_item: remove 'del'
this now uses regular efl_del
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz f8e93775c0 efl.access: remove parent property
most of this is just a reimplementation of efl_provider_find
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 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
Jean-Philippe Andre c35f257bf2 widget: Remove item from on_focus_update
It's legacy stuff, and always NULL.
2018-01-19 17:17:01 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Jean-Philippe Andre 116f24fd78 elm: Rename struct to Efl.Ui.Widget.Focus_State
Ref T5363
2017-12-12 12:01:46 +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
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