Commit Graph

76 Commits

Author SHA1 Message Date
Yeongjong Lee 210db8fc5d efl_ui_focus: merge efl_ui_focus_user and efl_ui_focus_object into one mixin
Summary:
focus_user and focus_object are similar classes. by merging them into
one mixin, we can maintain consistency.

Test Plan: make check

Reviewers: bu5hm4n

Subscribers: cedric, Jaehyun_Cho, woohyun, jpeg

Differential Revision: https://phab.enlightenment.org/D5734
2018-01-16 22:39:13 +01:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Marcel Hollerbach 78afa2fb84 efl_ui_focus_user/object: fix api duplication
just like the commit before, this fixes duplicated api names
2017-12-05 17:19:28 +01:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +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
Shilpa Singh 6508b8849c elc_naviframe.c: Append title, subtitle while reading title and subtitle in naviframe.
Summary: read title along with naviframe item title and subtitle along with naviframe subtitle.

Test Plan:
In accessibility mode, when naviframe title area is focused, The  text title and subtitle should be read
out along with item's title and subtitle.

Reviewers: kimcinoo

Reviewed By: kimcinoo

Subscribers: cedric, govi, rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5463
2017-11-13 20:54:05 +09: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 4884793cf0 elm_naviframe: remove old api! 2017-10-10 19:28:46 +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
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
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
Jaehyun Cho 68b6a8f29f naviframe: Fix to finish transition for newly pushed item
Suppose naviframe top item is "A" and a new item "B" is newly pushed.
In this case, if "A" is deleted by elm_object_item_del() before
transition for "B" is started, then signal for "B" is also not sent and
"B" does not become visible.

The above issue happened if the transition effect was implemented by
using deferred signals (i.e. "pushed,deferred" and "popped,deferred").

To resolve the above issue, the signal only for the deleted item is not
sent.

Suppose naviframe top item is "A" and a new item "B" is newly pushed.
In this case, if "B" is deleted by elm_object_item_del() before
transition for "B" is started, then signal for "A" is still sent and "A"
becomes invisible.

To resolve the above issue, if the deleted item is the top item and it
is in the middle of item push, then all the signals related to the
deleted item are not sent.
2017-09-06 20:35:38 +09:00
Jaehyun Cho 26bacce0fd Revert "naviframe: Fix to finish transition for newly pushed item"
This reverts commit 8574128b67.
2017-09-06 20:35:35 +09:00
Jaehyun Cho 8574128b67 naviframe: Fix to finish transition for newly pushed item
If current item was deleted while new item was pushed, then the signals
for the newly pushed item was not sent.

The above issue happened if the transition effect was implemented by
using deferred signals (i.e. "pushed,deferred" and "popped,deferred").

To resolve the above issue, the signals only for the deleted item is not
sent.
2017-09-04 15:35:23 +09:00
Jaehyun Cho 6353194546 naviframe: Fix to load default style if the given style does not exist
Naviframe item theme name is combined with item style name and widget
style name.
Therefore, if the item theme name is not found, then "item/basic" item
style name should be loaded as a default item style name.
2017-08-31 16:30:28 +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 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
Jaehyun Cho be0af0ed00 elc_naviframe: Fix to handle item deletion right after item push
If an item is deleted right after the item is newly pushed, the push
transition should not happen for both the new item and the current item.
2017-08-09 23:39:32 +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 76088133dc naviframe: Override resize_object_set
This is a first step into allowing me to removing the sub_obj argument.
Make elm_widget resize_object a protected property.

See also D265

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 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
Marcel Hollerbach c5da8f65bf elm_naviframe: this is not handling focus
the widgets that are used to compose the naviframe are handling it, not
the naviframe itself.
2017-06-10 18:03:08 +02: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
Youngbok Shin a7b501d947 naviframe: keep unfocusable state of item before finishing item push/pop
If item pop was started without focus at a naviframe object
and the naviframe object got focus before finising item pop,
the naviframe object could give focus to its first object of prev item.
It could ruin focus orders and failed to restore previous focused
object in the item.
To keep consistency of focus policy, same logic will be applied to
item push scenario.
@fix

Change-Id: Ia74bdce3620bd59622ef32a0cedf5fbd84815400
2017-03-08 17:26:59 +09: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
Sungtaek Hong 5a9c6d393a elm_naviframe: resize previous view before item pop transition.
Summary:
 - In commit rEFL9f5e9ec7ca120242a92ac97fb20016263c152d8e
   previous view is raised after item pop transition
   so that current view's pop animation can be shown.
 - But, previous view has to be in it's proper size
   during transition because some of animation might
   show previous view.

Reviewers: Jaehyun_Cho

Subscribers: cedric, conr2d, jpeg

Differential Revision: https://phab.enlightenment.org/D4535
2017-01-02 15:41:21 +09:00
Jaehyun Cho 9f5e9ec7ca naviframe: Raise previous view after item pop is finished.
Previously, previous view was raised immediately when item pop is
started so previous view covers current view when item pop is started.
Now, previous view is raised after item pop is finished so previous view
covers current view when item pop is finished.

Change-Id: I86f343e0b49f3801d00e553755896f0eb756daa0
2016-12-14 20:18:28 +09:00
Shilpa Singh 3d452bdc60 elc_naviframe: Delete naviframe items in LIFO manner on widget deletion.
Summary:
Naviframe manages items in the form of a stack, but deletion is happening
in FIFO manner, the deletion of items on widget deletion should also happen
in LIFO manner.

Use Case: Application allocates memory on first push and passes down the same
handle for all subsequent pushes, now on deletion as first item is deleted first
crash happens when the memory is accessed in second item on its deletion.
hence Naviframe should also delete items in LIFO manner.

@feature

Test Plan:
elementary_test->naviframe->push multiple pages
Now terminate the app, the items should be deleted in LIFO
manner.

Reviewers: Hermet, Jaehyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, govi, rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D4483
2016-12-13 20:56:18 +09:00
Shinwoo Kim ba03d68117 elementary: naviframe uses widget item for atspi
Application developer could rewrite accessible information of naviframe item.
But view object - VIEW(item) - is not accessible from application side.
So the accessible information should be set to widget item.
2016-12-11 19:38:00 +09:00
Shinwoo Kim 7605fbc9d0 elementary: set atspi role before sending a signal
It is necessary to check atspi role before sending a object:state-changed:showing signal.
The signal is fired when _elm_widget_efl_gfx_visible_set is called.
2016-12-10 08:44:18 +09:00
Jaehyun Cho 3277ffa712 naviframe: Fix to show hidden previous view when pop transition begins.
Previously, previous view became visible before pop transition begins by
"elm,state,prev,popped" signal.
Now, previous view become visible when pop transition begins by
"elm,state,prev,popped" signal.
2016-11-30 10:54:03 +09:00
Jaehyun Cho 7b71f5dd6e Revert "naviframe: Fix to show hidden previous view when pop transition begins."
This reverts commit 29a7d08454.
2016-11-30 10:50:28 +09:00
Jaehyun Cho 29a7d08454 naviframe: Fix to show hidden previous view when pop transition begins.
Previously, previous view became visible before pop transition begins by
"elm,state,prev,popped,deferred" signal.
Now, previous view become visible when pop transition begins by
"elm,state,prev,popped,deferred" signal.
2016-11-29 20:59:50 +09:00
Jaehyun Cho cccbad2298 naviframe: Fix to process title show/hide signal immediately 2016-11-02 19:51:47 +09:00
Jean-Philippe Andre d4929e58fc elm: Remove some eo files from installation
These are some of the EO files that shouldn't be part of the public
EO API:
- elm_access (old)
- actionslider
- bubble
- diskselector
- flipselector (a fancy spinner)
- hoversel (use combobox instead)
- icon (use image instead)
- inwin
- naviframe (unreplaced for now)
- photo (use image)
- prefs
- segment control
- separator
- slideshow
- thumb (use image)

Note: This breaks the use of the elm_widget_xxx.h headers. Those
      were internal headers anyway. Exposed because of a lack of
      a proper inheritance API.
2016-10-26 13:42:54 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +09:00
Jaehyun Cho db0378911a naviframe: Fix to add SIG_ITEM_ACTIVATED in smart callbacks.
This commit fixes commit 3a0eb75bda.
2016-10-07 17:54:55 +09:00