Commit Graph

52 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
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 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 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 9790de4b0c elm: include those headers in Elementary.h 2017-10-11 09:51:33 +02:00
Marcel Hollerbach a112aaafbb elm_colorselector: migrate to composition! 2017-10-10 19:28:47 +02: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 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
Lukasz Stanislawski 9cf8e75668 elm: rename Elm.Interface.Atspi.Component => Efl.Access.Component
Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5164
2017-09-12 15:49:29 +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 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
Jean-Philippe Andre 9008dd88bc colorselector: Fix invalid API (orient vs. dir) 2017-08-18 16:54:58 +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 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 2ee389c54b Revert "colorselector: Avoid API call on NULL object"
This reverts commit b156f606e4.
The change should have been in EO itself. See the previous
patch.

Ref T5715
2017-07-12 11:20:59 +09:00
Jean-Philippe Andre b156f606e4 colorselector: Avoid API call on NULL object
Solves this error:
  ERR<2321>:eo ../src/lib/efl/interfaces/efl_pack_layout.eo.c:1
  efl_pack_layout_request() Unable to resolve op for api func
  0x7fffed16dba0 for obj=(nil) ((null))

Fixes T5715
2017-07-12 10:24:11 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Shilpa Singh efbd62c40a elm_radio, elc_multibuttonentry, elm_colorselector: "checked" signal sent
Summary:
Radio, MBE items, color selector items have ELM_ATSPI_ROLE_RADIO_BUTTON role, when one item
is selected the other items are automatically unselected, so a notification has to be sent in atspi mode
to read the status accordingly

Test Plan:
In ATSPI mode when radio, mbe item, color selector item is selected
status has to notified.

Reviewers: kimcinoo, cedric

Subscribers: govi, rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D4960
2017-06-14 13:04:52 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Shilpa Singh e53b77d6ce elm_colorselector: Improve ATSPI support
Summary:
Item: state_set_get, name, actions api added
Widget: children_get api added.

Test Plan:
In Accessibility mode, on item tap, color name should be read out,
and if the color is a selected color, state also should be read out.

Reviewers: kimcinoo

Subscribers: cedric, jpeg, govi, rajeshps

Differential Revision: https://phab.enlightenment.org/D4934
2017-06-03 17:28:30 +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
Jean-Philippe Andre b11f371703 colorselector: Switch to Efl.Ui.Box internally
This doesn't change anything (in theory) but was to test the
box implementation. Conclusion: it's not much better than
elm_box. Also, homogenous mode isn't set because the layout
is completely broken (+ sets a min size equal to the object
size, thus can not resize down ever). The palette's objects
have the same size anyway.
2017-01-05 17:26:15 +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
Cedric Bail baf2187d55 elementary: fixup warning in new colorselector code. 2016-10-25 15:03:40 -07:00
Taehyub Kim ee83f2aa3d elementary: colorselector - apply new focus ui for palette and components items
Summary:
colorselector focus ui is not moving for palette and components items.
now it is changed to focus each item of palette and components.

Test Plan:
1. build efl elementary with this patch
2. remove /home/{user}/.elementary
3. launch colorselector with elementary_test -to colorselector
4. move direction key
5. see the new focus ui

Reviewers: jpeg, raster, Hermet, woohyun, bu5hm4n, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-10-25 14:37:11 -07: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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Sungtaek Hong cebbf43881 elm_colorselector: selected item is updated when color is changed.
Summary:
 - Previously, mode change, color change updated
   sd->selected, but did not send signals to edje of the item.
 - Also, mode change in colorselector set sd->selected to
   the first item even when palette is visible in previous mode.
 - Now, when mode is changed, sd->selected is set NULL and send
   unselected signal if palette is invisible, and keep sd->selected
   if palette is visible.
 - sd->selected is set NULL when color is changed in picker and
   color bars because previous selected item is not current color of
   colorselector

Test Plan:
1.
    1) launch elementary_test colorselector.
    2)Select any item and check the item is selected when palette is visible.
    3) Change mode to Palette, Both, All, and check selected item is not changed.
    (Previously, selected item is changed to the first item of the palette, but previous item was seen as selected.)

2.
    1) launch elementary_test colorselector.
    2) Select any item and check the item is selected when palette is visible.
    3) Change mode to Components, Picker.
    4) Change mode to Palette, and check none of items is selected.
    (Previously, selected item is changed to the first item of the palette, but previous item was seen as selected.)

3.
    1) launch elementary_test colorselector.
    2) Select any item and check the item is selected when palette is visible.
    3) Change mode to All.
    4) Click arrows in Picker and color bars.
    5) Observe selected item is not unselected when color is not changed, and selected item is unselected when color is changed.
4.
    1) launch elementary_test colorselector.
    2) Select any item and check the item is selected when palette is visible.
    3) Press direction key and check selected item is changed.
    (Previously, selected item's edje is not updated.)

Reviewers: woohyun, Hermet, jpeg, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-13 16:07:15 -07:00
Jinyong Park 3271ec8d18 theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum

* related history : 4ca3ef4514
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.

@fix

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

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4073
2016-07-01 15:09:43 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre 9a052a740d Evas: Move smart_callbacks_descriptions to legacy 2016-06-17 19:25:47 +09:00
Jean-Philippe Andre e691de04be Evas: Rename Clickable_Interface to Efl.Ui.Clickable
Event prefix is efl_ui:
 EFL_UI_EVENT_CLICKED
 EFL_UI_EVENT_CLICKED_DOUBLE
 ...

The event prefix could be reduced to efl but I personally
prefer with UI.
2016-06-10 17:33:53 +09:00
Jean-Philippe Andre 37625fca91 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09:00
Shilpa Singh d056dadd03 elementary/colorselector: use layout instead of edje object for components.
Summary:
Issue: As edje object is used instead of layout for components mode,  the content widgets like buttons are added as
subobject of colorselector hence when we unset the edje object on mode change the buttons still remain subobject of colorselector causing issues when all subobjects of colorselector is queried(sub objects are queried during atspi mode).
Soln: Use layout instead of edje object.

Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>

@fix

Test Plan: Change the mode to Palette mode and access the children of colorselector.

Reviewers: Hermet, cedric

Subscribers: govi, rajeshps, kimcinoo, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 16:47:06 -07:00
Shilpa Singh 0278ffdf7c elementary/colorselector: colornames updated with spaces.
Summary:
Colornames updated with spaces so that any TTS engine
can read them out in an understandable manner.
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>

@fix

Test Plan:
Enable ATSPI mode
Tap colors and listen to colorname's

Reviewers: cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 16:42:29 -07:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00