Commit Graph

53 Commits

Author SHA1 Message Date
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Jean Guyomarc'h 541d6527fa elm: fix memleak in combobox
@fix
2017-12-30 10:14:41 +01:00
Sungtaek Hong 8193864d7d elc_combobox: use elm_legacy_add for internal component
Summary:
elm_combobox has entry, genlist, hover as its component.
Those components should be marked as legacy during efl_add.

Test Plan:
Run elementary test.
           Run combobox test.

Reviewers: jpeg, cedric, woohyun

Differential Revision: https://phab.enlightenment.org/D5542
2017-11-28 11:47:43 +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
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
Jean-Philippe Andre 15f95c374e combobox: Mark as legacy only if legacy API is used
See bc2fe6bb77
2017-10-10 18:44:35 +09:00
Yeongjong Lee bc2fe6bb77 elementary: fix unintentional visibility of elm_hover in combobox constructor
Summary:
since fd9cf1d3b6, All Eo canvas objects remain
visible by default.
but elm_hover doesn't want to be shown in combobox constructor.
showing elm_hover in constructor occurs unexpected behavior.
this fixes that bug.

Test Plan:
1. elementary_test - Combobox
2. Click the combobox to Expand the list.

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-10-06 09:46:24 -07: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 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 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 a2729d119d widget: Remove part_text from EO
It should be implemented as a efl_part() API.

For now I've only done a quick hack, as the only overrides were:

 - notify: already a Part implementation. Also it turns out the default
   theme does not even have any text part in the notify group.

 - combobox: not a Part implementation, but also very badly defined wrt.
   parts in general. efl_part() is handled by the parent class (button)
   which makes it tricky to override just for one function.

With this patch I'm trying to keep the same behaviour as earlier (where
efl_part() is used for layouts and there is a special path for
combobox).

Ref T5363
2017-08-30 18:33:15 +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 e2fca6c454 elm: Prevent style/theme set after finalize (EO)
This is only for EO obviously. style_set and theme_set should only be
called when the object is being created, not after. On-the-fly style
changes are complex to handle and in most cases it should be easy to
simply repopulate the object after creating a new one with a new style.

There are only a few cases where style_set is used long after creation
of an object, like changing how a label slides, or in the evas 3d map
examples. Menu seems to change the hover style a lot, so rewriting it in
pure EO would need some extra work, maybe.

Ref T5307
Ref T5363
2017-08-09 18:09: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 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +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
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
Amitesh Singh 11a674ad7d Efl.Ui.Autorepeat: add 'autorepeat' prefix to methods.
Thanks to Dave for pointing out this.

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-17 10:31:25 +09:00
Amitesh Singh 68119700bb Efl.Ui.Autorepeat: Add efl autorepeat interface
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-16 20:01:13 +09:00
Marcel Hollerbach 87a25fd353 combobox: fix 0px height on first click
the height of a item is 0 because the item is not realized, so if no
item is realized we are waiting until one is realized, until then we
just take 1px as a height, so at minimum one item needs to be realized.

If there is a realized item (or we are getting the event that there is
one) we are just calling _table_resize again, and are getting the size
for real.
2017-04-01 10:41:35 +02:00
Marcel Hollerbach 9661ab7052 combobox: fix layer setting for the hover
in cases where a ui is using layers other objects could overlap the
hover object. Which is wrong, the genlist should stay above the rest of
the content, in any case.
2017-04-01 10:41:35 +02:00
Marcel Hollerbach 4ef3f6366f combobox: Fix combobox for the case the parent is not the window
if the parent is not a window the elm hover is created for the parent of
the combobox, which is a problem because the hover will not expand to
its full size of the window, and will stay in the size of the parent.

Adding the top widget instead of the parent widget fixes that.
2017-04-01 10:41:35 +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
Shuhrat Dehkanov 33750f8fac ELM: sync "clicked" usage with other places in the lib
Summary: In all other places "clicked" is defined as a local variable.

Reviewers: tasn, jpeg

Reviewed By: jpeg

Subscribers: cedric, minkyu

Differential Revision: https://phab.enlightenment.org/D4349
2016-10-17 10:49:10 +09:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +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
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
Stefan Schmidt 961a1ada0f Manual revert of: commit 07404215a9
combobox: add Multiple selection feature

This exposes problems with name clashes and behaviour change for the legacy API.
Revert for now and we can revisit for 1.19.

Git revert got to confused as this was committed before we merged elm in. I did
the revert manually.
2016-08-11 12:14:07 +02:00
Vitalii Vorobiov 497fc9ecab elc_combobox: add/remove item doesn't resize container with genlist
recalculation of item count is getting only on a first load of combobox.
whenever user add more items, size of container with items doesn't getting more
place (provoking scroller to appear).
but its event more annoying when user delete items, then there are lots of
free spaces left that looks ridiculus

@fix
2016-07-05 15:09:20 +03:00
Vitalii Vorobiov 679d5437cd elc_combobox: fix theme and style set for combobox
@fix
2016-07-04 17:54:17 +03: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
Vitalii Vorobiov a192dd0cf3 elc_combobox.c: apply style to inner parts of combobox like entry and genlist
this will allow to make more custom styles and themes for combobox

@fix
2016-06-22 14:38:48 +03: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
Amitesh Singh 3bb26af3bf elm_combobox/video: remove EO_BASE_BETA
composite_attach() is no more a beta API after d7c45e41d4
2016-06-20 09:58:52 +05:30
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
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00