Commit Graph

97 Commits

Author SHA1 Message Date
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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Cedric Bail a7bb1662e2 Revert "elementary/layout: attach edje object API with eo compositing"
This reverts commit 8a988717e1.

It seems we can't actually inherit from class more than once and neither eo
nor eolian will complain about it. You will just get random weird behavior.
This patch should come back once we have made an interface of edje.
2016-08-05 11:09:55 -07:00
Stefan Schmidt a17d59c7c3 Revert "access: add API to get access object of given part"
This reverts commit 57d77c9041.

We are in freeze right now and this is a new feature. Considering the access
API is still in beta I might have let this slip by but its does not even build

../../../src/tests/elementary/elm_test_popup.c:27:1: error: conflicting types for ‘elm_object_part_access_object_get’
 START_TEST (elm_object_part_access_object_get)
 ^
In file included from ../../../src/lib/elementary/Elementary.h:240:0,
                 from ../../../src/tests/elementary/elm_test_popup.c:6:
../../../src/lib/elementary/elm_object.h:521:54: note: previous declaration of ‘elm_object_part_access_object_get’ was here
 EAPI Evas_Object *elm_object_part_access_object_get(const Evas_Object *obj, const char *part);
                                                      ^
../../../src/tests/elementary/elm_test_popup.c: In function ‘elm_object_part_access_object_get’:
../../../src/tests/elementary/elm_test_popup.c:39:47: warning: passing argument 1 of ‘elm_object_part_access_object_get’ makes integer from pointer without a cast [-Wint-conversion]
    access = elm_object_part_access_object_get(popup, "access.title");
                                               ^
../../../src/tests/elementary/elm_test_popup.c:27:1: note: expected ‘int’ but argument is of type ‘Evas_Object * {aka struct _Eo_Opaque *}’
 START_TEST (elm_object_part_access_object_get)
 ^
../../../src/tests/elementary/elm_test_popup.c:39:13: error: too many arguments to function ‘elm_object_part_access_object_get’
    access = elm_object_part_access_object_get(popup, "access.title");
             ^
../../../src/tests/elementary/elm_test_popup.c:27:1: note: declared here
 START_TEST (elm_object_part_access_object_get)
 ^
../../../src/tests/elementary/elm_test_popup.c:39:11: error: void value not ignored as it ought to be
    access = elm_object_part_access_object_get(popup, "access.title");
           ^
Makefile:43996: recipe for target 'tests/elementary/tests_elementary_elm_suite-elm_test_popup.o' failed
make[5]: *** [tests/elementary/tests_elementary_elm_suite-elm_test_popup.o] Error 1

If you still want this in make sure it actually can compile the tests you added.
2016-07-25 18:01:37 +02:00
Shinwoo Kim 57d77c9041 access: add API to get access object of given part 2016-07-25 22:05:24 +09:00
Taehyub Kim ddeab76da0 elc_popup: move the code making buttons buffer for readability
Summary:
The code of making buttons buffer is away from related codes.
@fix

Reviewers: Hermet, Jaehyun_Cho, jpeg, raster, cedric

Subscribers: Blackmole

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-06 12:50:39 -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
Jinyong Park 5262fe7b99 popup: remove max_sc_w because it's duplicate job
Summary:
max_sc_w decide popup's "content" area size when popup scrollable is TRUE.
but in popup's edc, "elm/popup/content/XXXX" has min size when scrollable is TRUE. (and it is content area layout)
max_sc_w has fixed value, so I think deciding by edc is better than fixed code.

Test Plan:
1. elementary_test -to popup
2. check "Enable popup scroll"
3. click any list item.
4. observe popup and compare before this patch.

Reviewers: singh.amitesh, herb, Hermet, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4113
2016-06-28 13:37:04 +09:00
Jee-Yong Um 8a988717e1 elementary/layout: attach edje object API with eo compositing
Test Plan: make check

Reviewers: Hermet, jpeg, cedric

Subscribers: slotus.lee

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-06-27 11:18:05 -07: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 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
Ji-Youn Park 8cf9ee67bd efl_ui_win: rename elm_win to efl_ui_win 2016-06-07 23:11:48 +08:30
Jaehwan Kim 62cf70034d widget: set the parent-child relation again, when the widget is unset
Summary:
When the widget is unset from any container, a parent of the widget
doesn't exist. So we should set its parent to the top object.
But if we just set sd->parent, the parent can not find the widget as a
child. So the container widgets set the parent-child relation when
sub object is unset.
This commit is related to 0822ad2195.

@fix

Test Plan:
Check this issue.
https://phab.enlightenment.org/D3855
The unset widget don't added any widget as child.
So when it set scale, the widget can not reload the thmeme.

Reviewers: raster, cedric, Hermet, reutskiy.v.v

Reviewed By: Hermet, reutskiy.v.v

Subscribers: cedric, jpeg

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

Conflicts:
	src/lib/elementary/elm_mapbuf.c
2016-05-30 09:49:04 +09:00
Jean-Philippe Andre 99924852ab Efl: Remove part name in Efl.Container (use Efl.Part)
This touches Edje and also Elementary where part names are used.
This commit blew up in size since now all content part APIs
(get, set, unset) require to use Efl.Part instead.

This is a big refactoring commit, but no logic should
have been changed. Fingers crossed.
2016-05-26 19:55:50 +09:00
Taehyub Kim 55a6bd7fbb elc_popup: add escape key binding
Summary:
There are no methods to close the popup with key down.
So I added the escape key binding to close the popup with escape key.

Test Plan:
1. patch this code
2. delete /home/{user}/.elementary to refresh the config value
3. launch elementary_test -to "popup"
4. click one example of the list and press escape key
5. see closing the popup

Reviewers: cedric, raster, jpeg, Jaehyun_Cho, Hermet

Reviewed By: Hermet

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

Conflicts:
	src/lib/elementary/elm_priv.h
2016-05-18 22:15:08 +09:00
Jinyong Park 1b765359ee popup: add popup default scrollable flag config for other profiles.
Summary:
The default scrollable flag of popup can be different in each profiles.
So I added the scrollable configuration of popup.
@feature

Test Plan:
1. Before
 1) elementary_test -to popup
 2) resize window to smaller
 3) Click 15th item, "popup-center-title + genlist content + 1 button"
 4) Then popup will show, but its list is very long, only small part of popup could be shown.

2. After Patch
 1) change "popup_scroller" value to 1 in base.src, then run elementary_test -to popup or ELM_POPUP_SCROLLABLE=1 elemantary_test -to popup
 2) resize window to smaller
 3) Click 15th item, "popup-center-title + genlist content + 1 button"
 4) Then popup will show, popup's genlist will be in scroller, so entire popup can be shown.

Reviewers: jaehwan, id213sin, cedric, raster, singh.amitesh, SanghyeonLee, Hermet

Subscribers: Hermet, minkyu, herb, jpeg

Differential Revision: https://phab.enlightenment.org/D3856
2016-05-17 10:22:07 +09:00
Davide Andreoli d7c9790450 Revert "popup: default scrollable option change to TRUE"
This reverts commit 2ddbc5fc9a.

You cannot change default behaviour of released code!
In this way you make applications behave differently on different
efl version.
2016-05-15 18:56:57 +02:00
Jinyong Park 2ddbc5fc9a popup: default scrollable option change to TRUE
Summary:
Usually, popup have a scroll bar when its content is too long to display in popup's size.
But now, default option is unscrollable.
So change default option and popup's test case.

Reviewers: jaehwan, Hermet, herb

Subscribers: cedric, singh.amitesh, jpeg

Differential Revision: https://phab.enlightenment.org/D3941
2016-05-13 14:49:18 +09:00
Jean-Philippe Andre 902950018b Efl: Introduce Efl.Container and unify APIs
This removes Efl.Pack_Named which had a terrible name,
removes Elm.Container which should have been renamed
Efl.Ui.Container anyway, and introduces an interface
Efl.Container instead.

The hierarchy tree is now changed as objects don't inherit
from Efl.Container (it's an interface, not a regular class)
but only implement it. Obviously it is very easy to
reintroduce an Efl.Ui.Container parent class if we need it,
but I guess it should have some actual logic. It's basically
part of what Elm.Widget already does.

Some function names have been modified to look better in C
with the efl_content prefix.

@feature
2016-04-26 11:36:23 +09:00
Tom Hacohen 1d7caffed5 Elm popup: use the correct parent for calculations.
It just so happens that these parents are the same at the moment.
They don't have to be. We should use the correct, popup specific parent for
that.
2016-04-18 10:10:23 +01:00
Tom Hacohen aff4171e73 Elm widget: rename parent to widget_parent and mark as protected.
This removes the conflicts between the different parents and also
indicates that this is to be used internally by widgets and should
not be confused with the normal user visible parent.

It is an internal attribute that should not be used by people
not implementing widgets. Marking it as protected signifies it
as such.
2016-04-18 10:10:23 +01:00
Hermet Park 5f9e73b966 elementary/scroller: code refactoring.
try to update scroller size when popup layout is updated.
2016-04-12 00:36:12 +09:00
Jinyong Park 33d9bcc551 elc_popup: If popup's parent is resized, popup need to resized, too
Summary:
When window's size is not enough to show popup, popup resize smaller to show it in appropriate size.
But if window resize larger enough to show popup, popup is locked in small size.
On the contrary to this case, if window resize too smaller, popup has still large size, so popup doesn't display properly.

Test Plan:
1. elementary_test popup
2. maximize test list window
3. click 8th item, "popup-center-title + items + 3 buttons"
4. restore window size
5. close popup, resize window to smaller than popup in 3).
6. click 8th item, "popup-center-title + items + 3 buttons"
7. restore window size
popup size of 4. and 7. is different

Reviewers: jaehwan, cedric, raster, id213sin, singh.amitesh, SanghyeonLee

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3854
2016-04-12 00:28:55 +09:00
Jinyong Park edcfc6d036 popup : fix scale calculation in _scroller_size_calc
Summary:
when calculate real size of action area in _scroller_size_calc,
edje base scale is omitted.

Reviewers: jaehwan, id213sin, cedric, raster, singh.amitesh, SanghyeonLee, Hermet

Reviewed By: Hermet

Subscribers: Hermet, herb, jpeg

Differential Revision: https://phab.enlightenment.org/D3857
2016-04-11 23:31:03 +09:00
Jinyong Park c2cebb9fbc popup : fix create scroller bug when list item add.
Summary:
data-> scr = scroller object
data-> scroll = scrollable flag.
in _list_add function, when scroller object is not created, do _create_scroller.
 if (!sd->scroll) _create_scroller(obj);
must change to
 if (!sd->scr) _create_scroller(obj);

@fix

Reviewers: jaehwan, id213sin, cedric, raster, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: herb, jpeg

Differential Revision: https://phab.enlightenment.org/D3866
2016-04-05 13:59:12 +05:30
Daniel Zaoui a7400abbf6 Popup: don't set wrap type if ELM_WRAP_NONE is given
If ELM_WRAP_NONE is forbidden, the internal variable should not be set
if this value is given as parameter.
2016-04-05 08:43:35 +03:00
Taehyub Kim 4d9a19a1d5 elc_popup: support siganl emit for the main layout of popup
Summary:
Popup has the main layout to show popup view, but it is not resize object of popup.
As the result, we cannot emit the signal to the main layout when we want to change the state of the popup.
So, popup inherited a layout signal emit and redirect the signal to the main layout.

Test Plan:
1. add the custom signal in elm/popup/base/default layout
2. send the custom siganl in application code

Reviewers: woohyun, raster, cedric, Hermet, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3852
2016-04-05 10:16:38 +05:30
Jean-Philippe Andre 3c40ebb998 elm: Replace contents list by iterators
This introduces two new methods:
- content_names_iterate
- content_objects_iterate

Replacing:
- elm_layout_content_swallow_list_get
2016-03-29 13:58:39 +09:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00