Commit Graph

89 Commits

Author SHA1 Message Date
Woochan Lee 6d31f5c7fd multibuttonentry: Fix item resource clean up logic.
Summary:
There are four cases where items are deleted.

1. Select item and push back button.
2. Delete "X" part of item.
3. Calling elm_object_item_del().
4. MBE deleted.

Previous logic is can't support for all cases.

below problems were there.

eina_list_remove() called twice.
list data free twice.

@fix

Test Plan: elementary_test -> multibuttonentry test.

Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5030
2017-07-19 13:59:42 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +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
Woochan Lee 3805544a32 multibuttonentry: Fix expand state changed callback called many times.
Summary:
The expand state changed callback has been called when layout property changed and other reason.
Even expand state is not changed.

So we need to check the current view state to call expand changed callback.
(We can't prevent calling the _shrink_mode_set() function. It needs to call the re-arrange internal items.)

Test Plan:
elemenatay_test - multibuttonentry.

Check the shrink, expand state.

Reviewers: jpeg, cedric, woohyun

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4970
2017-06-19 15:14:20 +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 ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Shilpa Singh da5ba14664 elc_multibuttonentry: role of MBE item, MBE updated, and state_set_get API added.
Summary:
Reason for role change:
MBE items do not  act like push buttons, they need to maintain their status and at a time only one item can be selected, they act like radio buttons.
Role change of MBE from entry to panel, because MBE is just a container and entry is one of the children, when entry gets access frame, it will work as how entry works, but making MBE role as entry does not work as expected and also MBE should not receive highlight as a whole but only its children should receive highlight one more reason why MBE role cannot be entry.
state_set_get API added to get items state.

Test Plan:
When atspi mode is enabled the access frame has to
navigate directly on item and not on MBE as a whole and state has to
be read out

Reviewers: kimcinoo, cedric

Reviewed By: cedric

Subscribers: cedric, govi, rajeshps, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 13:56:45 -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
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
JEONGHYUN YUN 3147066865 multibuttonentry : fix box indicated item correctly in item_insert_before and item_insert_after
Summary:
If user added item with item_insert_before and item_insert_after, item was not displayed.
For this reason, fixed box indicated item correctly from reference->button to VIEW(reference).
Additionally, remove the unused variable button in _Multibuttonentry_Item struct.

Reviewers: woohyun, CHAN, cedric, jpeg

Reviewed By: CHAN

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4708
2017-03-09 16:11:34 +09:00
Woochan Lee 2bc44b055e elc_multibuttonentry: input panel should be shown whenever mbe is clicked.
Summary:
When mbe got focus the input panel will be shown.
Otherwise, input panel will be hidden.

If the mbe still got focus then input panel hide by user action.
there is no way to reactivate the input panel in case.

Reviewers: woohyun, jpeg, cedric, Hermet

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4661
2017-02-15 13:06:49 +09:00
Woochan Lee 746ac26425 elm_multibuttonentry: Fix MBE got a wrong state.
Summary:
Even User set a MBE state as "shrink" when MBE created.
MBE has been changed the state as "none" during added items.

This patch will be fixed that bug state.

@fix

Test Plan:
Add below line after create mbe.

'elm_multibuttonentry_expanded_set(mbe, EINA_FALSE)'

Then Add items using item_append API.

See the result. mbe is not on shrink mode.

Reviewers: Hermet, jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4548
2017-01-16 11:48:49 +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
Woochan Lee 01d3139dba elmentary: prevent crash in multibuttonentry.
Summary: Do Null checking to prevent crash, if 'elm_object_text_get()' return NULL here.

Reviewers: Hermet, woohyun, jpeg, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-20 16:39:30 -08:00
Cedric BAIL bec8a19080 elementary: fix float comparison warning in multi button entry. 2016-12-20 16:39:30 -08:00
Stefan Schmidt 6f847f1f55 elm: multibuttomentry: check if value is valid before we access it
The ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN will access 'it' here before we
check it is NULL. Reverse the order of these checks.

CID: 1365324, 1365323
2016-12-05 17:07:39 +01:00
Woochan Lee 61f7865f95 elm_multibuttonentry: Using current w,h value for item size calc when box resized.
Summary:
Support in case that If the expand mode is set to false
and the item is added using the item_append API.

Checking focus, entry visible is not needed to change mode in shrink when box resized.

If the view type is shrink when the MBE is in focus and the box is resized, it should be in shrink mode.

Test Plan:
elementary_test
MBE sample

Reviewers: woohyun, Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4429
2016-11-28 21:33:43 +09:00
Shinwoo Kim e648f1e85e [elementary][atspi] change accessible description to char* from const char*
Summary:
The accessible name is char*, this could confuse API user.
If we provide user callback to get description, an user would return allocated string.
The usage of elm_interface_atspi_description_get/set should be same with elm_interface_atspi_name_get/set

Reviewers: lukasz.stanislawski, cedric, raster

Reviewed By: raster

Subscribers: stanluk, jpeg

Differential Revision: https://phab.enlightenment.org/D4378
2016-11-10 11:11:48 +09:00
Woochan Lee 19dcea07d1 elm_multibuttonentry: send "clicked" signal when item got hardware enter key.
Summary:
It was kind of bug state before.

There was no any action when the user gives a focus on an item. then press the enter key.
The item should be set as selected state after that should call clicked signal.

@fix

Test Plan: elementary test MBE sample.

Reviewers: woohyun, bu5hm4n, Hermet

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-01 11:48:44 -07:00
Woochan Lee 986264c556 elm_multibuttonentry: Apply focus UI feature for the item.
Summary:
It was not implemented.

Add focus_direct to give the internal box for focus UI feature.
- Item will be deleted when got a focus highlighted then user press delete button.
- Focus UI will not work if MBE shrunk.

@feature

Test Plan:
Run elementary_test.
multibuttonentry sample.

Reviewers: woohyun, Hermet, bu5hm4n

Subscribers: bu5hm4n, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4360
2016-10-27 13:27:25 +02: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
Woochan Lee 6e325ee691 multibuttonentry: Fix wrong definitions.
Summary:
There is no "ELM_MULTIBUTTONENTRY_EVENT_CHANGED"
Because of this, MBE's Internal entry did not get a changed callback.

And MBE does not have changed smart callback.

Those things made by someone during EO interface working i think.

Test Plan: elementary_test

Reviewers: Hermet, cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4195
2016-07-29 14:36:17 +09: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 db79f8499c elementary: add implementation for elm_multibuttonentry_item_selected_get API
Summary:
Added definition for item_selected_get API
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>

@fix

Test Plan: select an item, call item_selected_get API to check status of the item

Reviewers: cedric, CHAN

Reviewed By: CHAN

Subscribers: CHAN, rajeshps, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 13:48:24 -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
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
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00