Commit Graph

109 Commits

Author SHA1 Message Date
Mike Blumenkrantz 823b7b05cd elm: resolve float comparison warnings
Summary: Depends on D11790

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11791
2020-05-09 09:25:21 +01:00
Mateusz Denys ad00102842 Summary: code refactoring - get rid of unneccessary Efl.Access.Value interface.
reviewers_: l.oleksak, stanluk, bu5hm4n, zmike

Reviewed By: l.oleksak

Subscribers: zmike, l.oleksak, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8578

Reviewed-by: Lukasz Oleksak <Lukas.Oleksak>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11304
2020-02-24 17:21:20 +01:00
Bowon Ryu eb13df21d0 slider: fix behavior of slider when mirrored
Summary:
The vertical slider(!horizontal) should not be inverted when mirrored.
This patch fixes and cleans up this.

Test Plan:
elementary_test -to slider
elementary_test -to efl.ui.slider

UI-Mirroring on/off and observe vertical slides.

Reviewers: woohyun, cedric, bu5hm4n

Reviewed By: woohyun

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10693
2019-11-19 14:04:05 +09:00
Bowon Ryu c30176e7ff slider: fix value error from step
Summary:
When the slider moves using step,
_drag_value_fetch(), _val_fetch() calculates a value from position of edje_part.
Then the calculated value is updated.
However, this causes a slight error.

This patch updates value ​​first when moving with steps.

* Test Example

```
Evas_Object *sl = elm_slider_add(bx);
elm_slider_min_max_set(sl, -5, 5);
elm_slider_value_set(sl, 0.0);
elm_slider_step_set(sl, 0.1);
evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_smart_callback_add(sl, "changed", _change_cb, NULL);
```
```
void
_change_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
   double val = elm_slider_value_get(obj);

   if (val == -5.0) printf("val[%f] == -5.0 \n", val);
   if (val == -4.0) printf("val[%f] == -4.0 \n", val);
   if (val == -3.0) printf("val[%f] == -3.0 \n", val);
   if (val == -2.0) printf("val[%f] == -2.0 \n", val);
   if (val == -1.0) printf("val[%f] == -1.0 \n", val);
   if (val == 0.0) printf("val[%f] == 0.0 \n", val);
   if (val == 1.0) printf("val[%f] == 1.0 \n", val);
   if (val == 2.0) printf("val[%f] == 2.0 \n", val);
   if (val == 3.0) printf("val[%f] == 3.0 \n", val);
   if (val == 4.0) printf("val[%f] == 4.0 \n", val);
   if (val == 5.0) printf("val[%f] == 5.0 \n", val);
}
```

If you move the slider using step in this test,
You can see that some logs are not visible. (Some values ​​are incorrect)

Test Plan:
elementary_test -to slider
elementary_test -to efl.ui.slider

Reviewers: woohyun, cedric, bu5hm4n

Reviewed By: woohyun, bu5hm4n

Subscribers: bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10662
2019-11-18 21:25:26 +09:00
Xavi Artigas 18ea5fd118 themes: Rename "dragable" to "draggable"
Summary:
"Dragable" is a misspelling:
https://en.wiktionary.org/wiki/dragable

We have it EVERYWHERE in EFL, even with jokes:
./src/lib/efl/interfaces/efl_ui_drag.eo:1

This patch only fixes the theme API so it does not get carved in stone for this release.

Depends on D10217

Test Plan: No functional changes.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10218
2019-09-27 08:42:27 -04:00
Marcel Hollerbach bc8c432841 efl_ui_slider: correct to a multiple of step when drag is finished
Summary:
this is needed in order to support the value to be a multiple of the
step when drag has finished. The normal changed event is still emitted
with non-multiple of step, but the steady event only contains the
correct values now.

ref T8187

Reviewers: zmike, segfaultxavi, woohyun

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8187

Differential Revision: https://phab.enlightenment.org/D9928
2019-09-13 10:14:59 -04:00
WooHyun Jung 5636bb8b0b efl_ui_slider: refactor for better data flow and code readability
1. efl_ui_range_value_set only sets value
2. remove internal eo functions (such as xxx_knob, val_fetch, and val_set)
3. make access_value_and_text works correctly

@ref T7893

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9720
2019-08-27 15:35:01 +02:00
WooHyun Jung 1cbcbbdfa6 efl_ui_slider : remove all the legacy checking
Summary:
Legacy checking is not needed because elm_slider
was separated from efl_ui_slider.

@ref T7893

Reviewers: Jaehyun_Cho, bu5hm4n, zmike

Reviewed By: Jaehyun_Cho

Subscribers: YOhoho, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7893

Differential Revision: https://phab.enlightenment.org/D9670
2019-08-21 19:14:57 +09:00
Marcel Hollerbach 010f813572 efl_ui_range_interactive: add a new event
the steady event from slider now moved here. A spec test suite and the
corresponding implementations will follow.

ref T7894

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9458
2019-08-01 14:36:45 -07:00
Marcel Hollerbach 8f7fa82244 efl_ui_*: add the new events to the widgets
previous commit introduced new events to range_display. This commit
ensures correct emittation of those events.

ref T7895

Differential Revision: https://phab.enlightenment.org/D9372
2019-07-31 10:18:20 +02:00
Marcel Hollerbach c0082b1c71 efl_ui_range_display: move events from spin
we concluded min,reached and max,reached should be on every widget that
implements range_display. This here is the start of that work, the
events are moved, next commit fixes all widgets, the last commits
enables tests in the spec unit test.

ref T7897
ref T7895

Differential Revision: https://phab.enlightenment.org/D9371
2019-07-31 10:18:20 +02:00
Mike Blumenkrantz 7e517e2a11 elm/efl_ui: remove elm_layout_sizing_eval implementations
Summary:
historically there have been two methods of calculating sizes in elm:
* elm_layout_sizing_eval
* evas_object_smart_calculate (now efl_canvas_group_calculate)

the former was used to set size hints on widgets, while the latter was
used to perform internal size calcs for the widget. for things to
work correctly, these functions had to be triggered in just the right
order at just the right time. many hard-to-fix bugs related to widget
sizing over the years have been the result of this split

this patch removes elm_layout_sizing_eval implementations so that all
widgets perform both internal size calcs and size hint setting all
in the same function, ensuring that these are always in sync

the result is that in the vast majority of cases, far fewer recalcs
happen for widgets, and they are quicker to achieve their final size

Depends on D9438

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9439
2019-07-30 13:12:52 -04:00
Marcel Hollerbach 4b1a1e85b2 efl_ui_slider: fix focus interaction
Summary:
when we move the slider up or down, we might be at the minimum or
maximu, if this is the case. Then we must not eat the key event,
otherwise focus is stuck on this widget.
Depends on D9328

Reviewers: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9329
2019-07-16 16:37:29 +02:00
Marcel Hollerbach 1bae8ec521 efl_ui_slider: change the semantical meaning of step property
Summary:
before the step property was used as a relative value. The value that
was added in the end was (max-min)*step. Which is quite confusing given
the fact that the other APIs in in efl_ui_range_display are also taking
values absolut. Other implementations also do so.

fix T4834

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T4834

Differential Revision: https://phab.enlightenment.org/D9327
2019-07-16 16:37:29 +02:00
Shinwoo Kim d8fcd8d300 efl_ui_*: fix regressions on legacy side
elm_progressbar_value_set with value bigger than max (or less than min) set to
max value instead of the bigger value. Following commit broke this behavior.

   5efb4b3 efl_ui_*: get range users onto the same semantics

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9277
2019-07-11 07:30:53 +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
Mike Blumenkrantz 06024475cc efl_ui_slider: remove setting pass_events on internal spacer in constructor
this object is swallowed into a layout, which means the layout will be managing
this property

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9151
2019-06-24 18:31:49 +02:00
Mike Blumenkrantz 969c7f7287 efl_ui_range_display: range_min_max -> range_limits
Summary: ref T7895

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7895

Differential Revision: https://phab.enlightenment.org/D9110
2019-06-19 10:03:21 +02:00
Xavi Artigas bc98c94dc9 Efl.Ui.Slider: Rename event delay,changed to steady
Summary:
And update the docs to explain its purpose.

Related to T7893

Test Plan: Everything builds and tests pass

Reviewers: zmike, bu5hm4n

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9090
2019-06-14 12:03:32 -04: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
Marcel Hollerbach 62b3759db5 efl_ui_slider: block scrolling when on slider
when a mouse cursor is over a slider, the mouse wheel should be used to
affect the state of the slider, not also the one of the slider.

ref T2529

Reviewed-by: Bowon Ryu <bowon.ryu@samsung.com>
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8455
2019-03-28 09:39:39 +01: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
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
Cedric BAIL f484ca0951 edje: migrate Eo API to use Eo callback instead of opaque type.
Summary: Depends on D7869

Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7870
2019-02-06 13:48:43 -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
Cedric BAIL 8a513a522e efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.

Differential Revision: https://phab.enlightenment.org/D6098
2018-05-24 16:02:18 -07:00
Hosang Kim 5db61e4d64 efl_ui_slider: refactor slider widget.
Test Plan: elementary_test -> Efl.Ui.Slider, Efl.Ui.Slider_Interval, slider

Reviewers: woohyun, cedric, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: zmike, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5908
2018-05-15 14:16:00 +09:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07: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
YeongJong Lee 3114ee264b efl_part: remove duplicated text_aliases code
Summary: this widgets inherit from Layout. they can use same text_aliases of Layout.

Reviewers: Jaehyun_Cho, woohyun

Subscribers: herb, cedric

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

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-06 10:10:08 -07:00
Amitesh Singh f5b0cd2b3b Efl.Ui.Slider: implement Efl.Ui.Range.range_step_set/get()
Also move elm_slider_step_set/get() as legacy APIs.
remove eo api step.set/get() as well since range intf
already implements it.
2018-03-06 16:25:41 +09:00
Sungtaek Hong 08d86d3941 efl_part: use efl_ui_widget's default_part_get
Summary:
efl_part macros are using each widget's internally defined
default_part_get() functions to get default part name.
This might potentially cause errors when future widgets
inherits the widget but not overriding Efl.Text.text and
Efl.Content.content.

Reviewers: jpeg, cedric, woohyun, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5797
2018-02-08 14:53:59 +09:00
Jaehyun Cho 000d43b29e elm_part_helper: Fix to use registered default text part 2018-02-07 20:52:12 +09:00
Sungtaek Hong cb25699dac efl_ui_legacy: add new interface to indicate legacy widget
Summary:
For now, how to check whether a widget is legacy or not
is to check flags in private data or static flag, which is set
during elm_legacy_add.
If Efl.Ui.Legacy interface is added, it can be easilly checked
by efl_isa(obj, EFL_UI_LEGACY_INTERFACE)

Reviewers: woohyun, jpeg, cedric, Jaehyun_Cho

Subscribers: conr2d, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5748
2018-01-24 18:14:26 +09: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
Jean-Philippe Andre 0de20aeafa elm: Rename slider part to part_indicator
This is specific to the indicator.

Fixes T6376
Fixes T5361
2017-12-12 11:14:04 +09:00
Chris Michael 13d29eda98 elementary: Fix resource leak
Coverity reports a resource leak here. According to eina_strbuf
documentation, the result of eina_strbuf_release should be
free'd when not needed anymore.

Fixes Coverity CID1383550

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-12-11 14:49:29 -05:00
Sungtaek Hong 751cf2c0d0 efl_ui_widget: make Elm.Widget.theme, Elm.Widget.theme_object internal 2017-12-08 16:02:22 +09:00
Sungtaek Hong fc8cc4a9b3 efl_ui_widget: find theme just once in layout inherited widget
When a widget inherits layout in tries to set theme in group_add or in
constructor. When another widget inherits the previous widget, it sets
layout again with new klass name. This sets klass in the widget and
sets layout in super class, so that it can set layout only once.

Test Plan: Run efl_ui_widget related elementary test.

Reviewers: jpeg, cedric, woohyun, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D5473
2017-12-08 16:02:22 +09:00
Sungtaek Hong f80ab519af efl_ui_widget: use elm_widget_element_update to set subobj edc
affected widget list:
efl_ui_clock: test, ampm
efl_ui_multibuttonentry: guidetext, label, closedbutton
efl_ui_slider: popup(indicator)
efl_ui_text: scroller, handler, magnifier, cursor, selection, anchor
2017-12-08 15:57:26 +09:00
Sungtaek Hong dd4467505e efl_ui_widget: find new edc resource for efl_ui_widgets
new eo widgets(efl_ui_ prefix) finds new edc group in
data/elementary/themes/edc/efl/*.edc.
New group name is "klass/group:style" and "base" group name and
"default" style name can be omitted.

for now, separator for style is ':' but needs to be decided.
2017-12-08 15:57:26 +09:00
Sungtaek Hong cff9b1b11a efl_ui_widget: add new internal EAPI for new group name
theme_klass: set/get klass name used for resize_obj
theme_element: set/get group name used for resize_obj
theme_style: set/get style name used for resize_obj
element_update: automatically sets and apply theme for
             sub object of widget.
2017-12-08 15:57:25 +09:00
Amitesh Singh 10103b9b45 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:38:39 +09:00