Commit Graph

49 Commits

Author SHA1 Message Date
Marcel Hollerbach de183719b3 efl_ui_spin_button: rename editable to direct_text_input
Summary: as suggested in T8097.

Reviewers: cedric, zmike, woohyun

Reviewed By: woohyun

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9707
2019-08-26 14:21:10 +09:00
Marcel Hollerbach 94b05f15e6 efl_ui_spin/button: move from elm_ to efl_ prefixed functions
Summary:
this moves a bunch of api calls from elm_ to efl_. Those calls that are
called on the entry object are still elm, as well as access APIs, they
will have to be moved once efl_ui_text is usable.
Depends on D9475

Reviewers: segfaultxavi, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9488
2019-08-05 08:47:00 -04:00
Marcel Hollerbach 7869778d02 efl_ui_spin: move the step implementation to spin_button
having efl_ui_spin implementing efl.ui.range_interactive does not make
sense. Efl.Ui.Spin is a not interactive widget, so it should not
implement that interface.

ref T7897

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9475
2019-08-03 20:40:11 +02:00
Marcel Hollerbach 42bbe0e58f efl_ui_spin_button: fix initial displaying of formatting string
spin_button should also implement formatted_apply, the label has a
different part name then spin.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9474
2019-08-03 20:40:10 +02:00
Marcel Hollerbach 7558620957 efl_ui_spin_button: stop calling only the parent
if the spin button is skipped the spin is called directly, the label
will display the wrong value.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9473
2019-08-03 20:40:09 +02:00
Marcel Hollerbach fd860eb6e8 efl_ui_spin_button: rename circulate to wraparound
ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9461
2019-08-01 14:36:53 -07:00
Marcel Hollerbach 45b763a2dc efl_ui_spin_button: use the newly emitted event from range_interactive
this event is not also in range_interactive, so better use this.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9459
2019-08-01 14:36:48 -07:00
Mike Blumenkrantz adc510f9ee efl_ui: change calls to elm_layout_sizing_eval to efl_canvas_group_change
Summary:
elm_layout_sizing_eval is a legacy function which should not need to be called
on new widgets

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9434
2019-07-30 13:12:52 -04:00
WooHyun Jung 77e268e6ab efl_input_clickable: rename efl_ui_clickable to efl_input_clickable
Summary:
Renamed all efl_ui_clickable_XXX to efl_input_clickable_XXX based on
the discussion in T7847

ref T7847 T7976

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7976, T7847

Differential Revision: https://phab.enlightenment.org/D9427
2019-07-29 11:43:01 +02:00
Cedric BAIL 477611f014 elementary: fix potential race condition by using Eina_Future attached to the object.
I get some random segfault in elementary test suite pointing to this code. Most likely
we do not properly destroy the timer during destruction. Could be because we initiate
a delay while destruction is going on or something like that. Anyway, it is easier and
more robust to get it fixed by linking the lifetime of the timeout to the lifetime of
the widget as future allow us to do easily.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9298
2019-07-17 21:57:59 +02:00
Marcel Hollerbach d5df7e459d efl_ui_spin_button: fix event calling in spin_button
before the spin event for changing the value was called twice if you
changed the value by the entry. Additionally, the changed,delay event is
not emitted when the value was changed via the arrow buttons.
This corrects this, additionally, this enables the delay timer when
focus is gone, this is expected and should be supported by the API.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9231
2019-07-08 19:56:41 +02:00
Marcel Hollerbach d8f32042c4 efl_ui_spin_button: make theme consistent
this reduces the amount of code needed in the widget itself,
additionally, the theme now follows a scheme.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9230
2019-07-08 19:56:40 +02:00
Marcel Hollerbach 7ddd286f7b efl_ui_spin_button: cleanup internal data
there is no reason to store those two times in the internal data, as
they do not change at all. Additionally, saving the direction in the
internal data has also no reason, since it is *always* used in the call
after the setting, so this makes this a parameter.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9229
2019-07-08 19:56:39 +02:00
Marcel Hollerbach 1414b8a921 efl_ui_spin_button: this can also be done with the focus callback
this makes the code more readable, and reduces the amount of events we
are subscribing to.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9227
2019-07-08 19:56:38 +02:00
Marcel Hollerbach eaeb67e571 efl_ui_spin_button: change entry to button before changing value
doing this in pressed is kind of weird, if you are on a touchscreen,
missclick, and move the finger away, the entry is already transformed,
which is weird, this fixes that.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9226
2019-07-08 19:56:37 +02:00
Marcel Hollerbach c72ccdadfd efl_ui_spin_button: this function is 1:1 like this in efl_ui_spin
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9225
2019-07-08 19:56:36 +02:00
Marcel Hollerbach f4f4856758 efl_ui_spin_button: replace timers with autorepeat of button
this was just reimplementing existing behaviour. This can be done more
easily

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9224
2019-07-08 19:56:34 +02:00
Marcel Hollerbach 5efb4b374e efl_ui_*: get range users onto the same semantics
this commits introduces unified behaviour for the users of the range
interfaces. This includes:
- The same errors for limit_set errors
- The same errors for value setting outside the range

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9241
2019-07-08 19:56:33 +02:00
Xavi Artigas e776f5f0d7 Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).

Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.

This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.

Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.

Tests have been added to the Elementary Spec suite for all cases.

Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-04 19:38:20 +02:00
Xavi Artigas 38d7d33354 Rename Efl.Ui.Direction -> Efl.Ui.Layout_Orientation
Summary:
This clarifies a bit the whole Orientation vs. Direction confusion, at the
expense of longer names (Image_Orientation vs. Layout_Orientation).
Also, the interfaces are now adjectives (Orientable) and the enums have long
names (*_Orientation).

Pretty big patch, but no functional changes.

Relates to T7863

Test Plan:
Everything builds and passes tests.
Elementary_tests show same behavior, including the "inverted" widgets, which
are the only parts which received a bit of code changes.
Proof:
https://travis-ci.org/Enlightenment/efl/builds/536277282

Reviewers: zmike, bu5hm4n, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8946
2019-05-24 12:30:32 -04:00
Yeongjong Lee 41136db8e8 ui.widget: remove elm_widget_sub_object_parent_add from each of widgets
since commit a1addad60e, To add myself as a sub object of parent object will be
done in Efl.Ui.Widget constructor.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8280
2019-04-18 11:01:19 +02:00
Mike Blumenkrantz a8057a3403 elm_entry: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8166
2019-03-07 14:15:12 -08:00
Mike Blumenkrantz bc0c50c507 efl.ui.widget: widget_event -> widget_input_event_handler
Summary:
ref T7553
Depends on D8081

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

Differential Revision: https://phab.enlightenment.org/D8082
2019-03-04 13:37:18 -05:00
Mike Blumenkrantz bb6caaa471 efl.ui: remove Efl.Ui.Theme_Apply_Error
Summary:
now that the error codes have been change to be compatible with eina_error,
this can be removed and will work through eina_error naturally

fix T7718

Depends on D8067

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8068
2019-03-04 13:37:07 -05:00
Mike Blumenkrantz 644b771fe4 efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error
Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
2019-03-04 13:36:41 -05:00
Marcel Hollerbach a2162b90ca efl: split efl_ui_range into display and interactive
display contains properties that are used to manipulate the display.
Range_step is a interactive property since it manipulates the way the
user interacts with this widget. This resolves a few unimplemented APIs.

ref T5719

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7715
2019-01-23 16:43:02 +01:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
Summary:
Efl.Ui.Theme class is required to support language bindings.
Efl.Ui.Theme works based on current elm_theme features.

This patch fixes T7357.

Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee

Reviewed By: segfaultxavi, SanghyeonLee

Subscribers: SanghyeonLee, herdsman, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7357

Differential Revision: https://phab.enlightenment.org/D7244
2018-11-20 13:56:37 +09:00
Hermet Park 8312a99a92 ui_spin_button: avoid duplicated calls. 2018-08-21 14:04:58 +09:00
Woochanlee 739da4f736 efl_ui_spin_button: Addded direction feature.
Summary:
The Spin_Button class supports two types(horizontal, vertical).

User can use 'efl_ui_direction()' for spin_button.

@feature

Test Plan: elementary_test-> spin_button sample.

Reviewers: Hermet, Jaehyun_Cho

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6680
2018-08-21 13:52:29 +09:00
Woochan Lee 976b9d877e efl_ui_spin: Added special value feature.
Summary:
User may want to set as meanignful words for the value instead of numberic value.

@feature

Test Plan: elementary_test->test_ui_spin_button.

Reviewers: cedric, woohyun, Jaehyun_Cho, herb

Reviewed By: Jaehyun_Cho

Subscribers: zmike, felipealmeida, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5969
2018-05-20 03:11:55 +09:00
Jaehyun Cho 08a11dcbf9 efl theme: Replace legacy signal names with efl ui signal names
Replace legacy signal/source names with efl ui signal/source names.
e.g. From "elm,state,content,set" "elm" to "efl,state,content,set" "efl"
2018-04-26 22:45:59 +09:00
Taehyub Kim 6e49db0739 efl theme: remove the elm legacy name of efl ui theme
Summary: remove the elm legacy name of efl ui theme

Test Plan: run elementary_test and test efl ui widget cases

Reviewers: Jaehyun_Cho, woohyun, cedric, raster, jpeg

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5934
2018-04-26 19:41:03 +09:00
Woochan Lee ef2e6afd1f Intrudoce Efl Ui Date, Time interface and picker.
Summary: Create datepicker, timepicker with one manager class(efl_datetime).

Test Plan: datepicker, timepicker sample.

Reviewers: herb, Jaehyun_Cho, woohyun, SanghyeonLee

Reviewed By: Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5871
2018-04-25 16:48:21 +09:00
Xavi Artigas 9dcc31ed4a Efl.Access.Object (from Efl.Access)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:24 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Woochan Lee 533537c0f2 elemetary: spinner - free the longpress_timer when unfocused
Summary:
It needs to delete when widget unfocused.

@minkyu
Gets from tizen.
0bc1a19703dc204c8d347794bae0290006f4bde5

Reviewers: jpeg, Jaehyun_Cho, minkyu, cedric

Subscribers: minkyu, cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-03-06 19:05:57 -08:00
Mike Blumenkrantz 8b7bbb2398 efl.access: name -> i18n_name 2018-02-15 13:11:00 -05:00
Jean-Philippe Andre 20570f74d3 widget: Move on_focus_update to Focus.Object
Following @taxi2se's recommendation. This is indeed a focus method, and
Widget already inherits from Focus.Object.

Ping @bu5hm4n who probably wants to adapt this further.

Ref T5363
2018-01-19 17:30:04 +09:00
Jean-Philippe Andre c35f257bf2 widget: Remove item from on_focus_update
It's legacy stuff, and always NULL.
2018-01-19 17:17:01 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Yeongjong Lee 434e7b4470 efl_ui_spin_button: remove needless focus_set
Summary:
because _entry_show_cb callback call focus_set function,
efl_ui_focus_manager_focus_set is unnecessary.
also, this fixes focus error message.

Test Plan:
1. elementary_test -to Efl.Ui.Spin.Button
2. click the entry.

Reviewers: CHAN, Jaehyun_Cho, bu5hm4n

Reviewed By: CHAN

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5641
2017-12-19 14:25:08 +09:00
Woochan Lee 845d6d1b57 efl_ui_spin_button: Fix can't input number in case of the min value is bigger than 1.
Summary:
Min Max validate logic has been changed to support decimal point counting.
It makes this side effect.

Test Plan:
elementary_test -> efl_ui_spin_button sample.
(On the min max filter enabled.)

Reviewers: jpeg, Jaehyun_Cho, woohyun

Reviewed By: Jaehyun_Cho

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5580
2017-12-18 13:23:32 +09:00
Woochan Lee 4b2f1abc9f efl_ui_spin_button: Change property name to avoid name duplicating.
Summary:
The name 'loop' is already there in efl canvas.

loop -> circulate.

Test Plan: elementary_test -> efl_ui_spin_button test.

Reviewers: jpeg, Jaehyun_Cho, woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5639
2017-12-11 16:45:27 +09:00
Sungtaek Hong 1503fb5359 efl_ui_spin: apply new theme set policy
Summary: Applied new theme group name. Moved logic in finalize to constructor.

Test Plan: Run elementary_test->Efl.Ui.Spin, Efl.Ui.Spin.Button, Part_Background

Reviewers: jpeg, woohyun, CHAN

Reviewed By: CHAN

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5592
2017-12-08 16:02:24 +09:00
Woochan Lee 1588b8be0a efl_ui_spin_button: Replace legacy widgets to efl ui widgets.
Summary:
elm_button -> efl_ui_button class.

elm_entry will be changed after filter feature added.

Reviewers: Jaehyun_Cho, jpeg, woohyun

Reviewed By: Jaehyun_Cho

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5555
2017-12-08 16:02:23 +09:00
Marcel Hollerbach 78afa2fb84 efl_ui_focus_user/object: fix api duplication
just like the commit before, this fixes duplicated api names
2017-12-05 17:19:28 +01:00
Yeongjong Lee 9fac52134c efl_ui_spin_button: check focus state
Summary:
Because toggle_entry function control entry focus, it need to check
focus state in focus changed callback

Test Plan:
1. elementary_test - Efl.Ui.Spin.Button
2. Click the entry of spin_button

Reviewers: Jaehyun_Cho, CHAN

Reviewed By: Jaehyun_Cho

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5569
2017-12-01 12:06:24 +09:00
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
Woochan Lee eefcb49419 efl_ui_spin: Add new spin and spin_button widgets
Summary:
https://phab.enlightenment.org/T5900

Creating base class(efl_ui_spin) to support various shape of spinner.

Added button interaction widget efl_ui_spin_button inherited from efl_ui_spin.

Test Plan: Add tests in elementary_test.

Reviewers: Jaehyun_Cho, woohyun, jpeg, singh.amitesh

Subscribers: jenkins, id213sin, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5424
2017-11-27 19:40:31 +09:00