Commit Graph

82 Commits

Author SHA1 Message Date
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 7e83545ab3 elc_popup.c: accessible name_get interface added
Summary: accessible name_get interface added, popup does not have default text.
What should be read for the name information should be define by popup.

Test Plan:
In atspi mode, when an AT-client such as screen-reader queries, it should return
as "Alert title(if present)/text(if present)"

Reviewers: kimcinoo

Subscribers: cedric, jpeg, govi, rajeshps

Differential Revision: https://phab.enlightenment.org/D5466
2017-11-14 15:22:36 +09:00
Lukasz Stanislawski 2ea179d373 elm: set accurate access role for elm_popup
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5454
2017-11-13 12:08:24 +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 824792f09d elm: Major cleanup of EO files
This prevents legacy EO classes from being exposed through .eo.h headers
or .eo in share/eolian/includes. Also removes a slew of useless xxx_eo.h
intermediate headers.

Notes:
 - elm_systray has no proper API: it's not clear if the EO API should be
   released (in which case it needs to be renamed to efl_something) and
   there is no legacy API to create a systray object.
 - Some files have been placed in a "FIXME" section, as I believe they
   are necessary within EO land, but at the same time still don't
   conform to the interfaces (eg. name starts with elm_).
 - elm_interface_scrollable is required by photocam. This means photocam
   needs to be adapted to fit the EO scroller API (still to be
   completed, I believe).

Bugs:
 - This breaks most C++ examples. I KNOW. And I'm working on it.

Ref T5301
2017-11-01 21:23: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
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 6ba107b899 elm: introduce efl_ui_focus_layer
what it does is described in the mixin

this commit refactors inwin hover popup ctxpopup to use that behaviour.
Since it should do exactly that.
2017-10-10 19:28:47 +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 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 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
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 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 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
Jean-Philippe Andre 7270a98d8c popup: Avoid error messages on NULL
Those were spotted in ephoto (with no config, first run).
2017-08-21 16:30:21 +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 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
JinYong Park 10d5f11a14 popup: fix sizing eval logic when scrollable set TRUE
Summary:
When scrollable set TRUE,
scroller must be calculated its size except using item.
If content is removed, scroller doesn't calculate its size, so it has previous size.
So there is a empty space in this case.

@fix

Test Plan:
1. elementary_test -to popup
2. open "popup-center-title + list content + 2 button (with delete content)"
3. click "Delete" button
4. compare between scrollable set true and false

Reviewers: herb, singh.amitesh, jpeg, cedric, conr2d

Differential Revision: https://phab.enlightenment.org/D5010
2017-07-11 15:45:27 +09:00
JinYong Park d6652c1138 popup: fix wrong signal emit when remove all button
Summary:
In visuals_set function,
check action_area is NULL, and signal emit action_area,visible/hidden
So, before call visuals_set, action_area should be deleted.

Test Plan: Actually, action area has not min size, so it couldn't be observed.

Reviewers: herb, singh.amitesh, jpeg, cedric, conr2d

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D5007
2017-07-07 15:44:51 +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
Daniel Hirt 544fedaeba Elm layout: only allow legacy for using NULL text parts
This is a follow-up to a4b79fdbe1.

efl_part no longer supports NULL parts.
NULL text parts are now aliased in legacy code beforehand.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
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
Daniel Hirt c0e4a218dd Elm layout: fix broken text part name resolving
This adds a few workaround to overcome the efl_part port.
Quite a few layouts got broken in some specific cases.
2017-06-30 00:20:10 +03:00
Shinwoo Kim 921c692f86 elc_popup: atspi - make popup label accessible
The application could customize default behavior of popup label.
There was no way to get the popup label so far.
2017-06-28 09:25:08 +09:00
Jean-Philippe Andre 6bfbeff47e widget: Move mirrored_automatic to Efl.Ui.Base
This is, unlike what some of the documentation says, a public
API on elm_object. Let's place it along mirrored for consistency,
even if edje object will not implement it.

Ref T5363
2017-06-15 17:35:44 +09:00
Jean-Philippe Andre ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
JinYong Park 2b2d224947 popup: fix unintentional object deletion when change scrollable
Summary:
If popup scrollable change from FALSE to TRUE after content or text is added,
content_area is deleted, so it cause null pointer problem.
main_layout has content_area in its CONTENT_PART, but in scrollable_set API,
tbl set into main_layout's CONTENT_PART, so content_area is deleted.

On the contrary, if scrollable change to FALSE,
content object in content_area is deleted, because tbl set into content_area's CONTENT_PART.

So if some object set into other object,
unset previous object and set it into properly part after that.

A case using item_append should be fixed by other patch.

@fix

Test Plan: Change scrollable repeatedly after adding content or text to popup.

Reviewers: jpeg, singh.amitesh, conr2d, cedric, raster

Reviewed By: cedric

Subscribers: herb

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07: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
JinYong Park bcb7eb99b3 popup: fix object_mirrored_set didn't work
Summary:
object_mirroed_set as opposed to config_mirrored_set doesn't work with
popup. This patch broadcasts a change on 'mirrored' to internal notify,
main layout, scroller and action area layout to make API work.

@fix

Reviewers: singh.amitesh, jpeg, conr2d, cedric, raster

Reviewed By: conr2d

Subscribers: herb

Differential Revision: https://phab.enlightenment.org/D4900
2017-06-02 16:34:42 +09:00
JinYong Park 2086530d07 popup: remove previous object when setting new content
Summary:
Other widgets remove previous object when setting new content, but popup does
nothing for the part whose name is "default".
content_unset can be used to keep previous content object, so content_set
(especially with NULL) should be able to delete previous content object
for uniformity of the entire widgets.

@fix

Reviewers: jpeg, singh.amitesh, cedric, raster, conr2d

Reviewed By: conr2d

Subscribers: minkyu, herb

Differential Revision: https://phab.enlightenment.org/D4885
2017-05-31 13:21:08 +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
JinYong Park ef2f37cad1 popup: move "visible_set(FALSE)" before calling dismissed callback
Summary:
 After hiding animation is finished, "dismissed" callback will be called.
 It means popup's visible state is FALSE.
 But if evas_object_show(popup) is called in it's custom dimssed callback function,
 popup's visible state is TRUE, so evas_object_show is canceled.
 So visible_set(FALSE) is must done before call dimissed callback.

@fix

Reviewers: Hermet, herb, jpeg, cedric, singh.amitesh, raster

Reviewed By: jpeg

Subscribers: woohyun

Differential Revision: https://phab.enlightenment.org/D4869
2017-05-12 14:59:32 +09:00
JinYong Park 9df3685884 popup: enable to set last_button_number to 0
Summary:
If last added button is removed, any statements to set last_button_number in for loop doesn't be executed.
So last button number has previous value, not 0.
Because of that, action area is not removed, but that area has zero height, so it doesn't be shown.

@fix

Reviewers: herb, jpeg, cedric, singh.amitesh, raster

Reviewed By: jpeg

Subscribers: woohyun

Differential Revision: https://phab.enlightenment.org/D4870
2017-05-12 14:57:01 +09:00
Taehyub Kim 425a04beb3 popup: hides the popup when hide effect is finished
Summary:
When popup hides and shows fast, sometimes popup is not shown
because of the difference visible value between popup and notify
(case: popup visible state: 1, popup_notify visible state: 0)
To sync this value I added the visible set code in elc_popup.c

@fix

Test Plan:
1. run elementary_text -to popup
2. shows the hide popup
3. hides popup using the hide button
4. repeat 2,3 step
5. popup will be shown well

Reviewers: jpeg, cedric, Hermet, raster

Subscribers: Blackmole, woohyun

Differential Revision: https://phab.enlightenment.org/D4710
2017-03-09 17:39:39 +09:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08: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
Cedric BAIL 71df83120c elementary: fix float comparison warning in popup. 2016-12-20 16:39:30 -08:00
WooHyun Jung 9eee22cb6d elm_popup: before getting focus, all sub objs should be shown 2016-11-02 09:28:26 +09:00
Shuhrat Dehkanov 4768b1d04e elm: remove dulicate ELM_POPUP_ACTION_BUTTON_MAX definition
Summary: ELM_POPUP_ACTION_BUTTON_MAX is already defined in the included header file, elm_widget_popup.h.

Reviewers: cedric, jpeg, minkyu, Hermet

Reviewed By: Hermet

Subscribers: seoz, jehun.lim

Differential Revision: https://phab.enlightenment.org/D4312
2016-09-22 22:57:28 +09:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00