Commit Graph

74 Commits

Author SHA1 Message Date
Amitesh Singh b762743bb9 Efl.Ui.Slider: implement Efl.Ui.Range.range_step_set/get()
and move elm_slider_step_set/get() as legacy APIs.
2018-03-06 16:21:25 +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
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
Jaehyun Cho 4b18e754de elm_part_helper: Change macro name for default content part 2017-11-29 13:43:21 +09:00
Carsten Haitzler be6f4a870a efl ui slider - fix crashes with fmt callback data and class data
the format free cb was passed the class data (sd) as the callback data
but this was freed by the time _indi_default_format_free_cb was called
causing an invalid access. fix this by looking it up from the obj
which is probably invalid at this point...
2017-11-24 23:51:38 +09:00
Jean-Philippe Andre eae0885e0a slider: Implement Efl.Content 2017-11-20 20:39:44 +09:00
Pawel Aksiutowicz cb2ba05675 elementary: fix typos
Reviewers: stanluk, lukasz.stanislawski

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5494
2017-11-20 11:54:52 +09:00
Amitesh Singh 35f3019a6d Efl.Ui.Slider: add default indicator format to %0.2f
This was broken in legacy code as well.
Thanks to @taxi2se for reporting.

elm_test -> slider -> check vertical slider

@fix
2017-11-17 14:55:51 +09:00
Amitesh Singh 651d9e94a0 Efl.Ui.Slider: add visible_mode() as an indicator part API
Ref T6376
2017-11-17 14:38:32 +09:00
Amitesh Singh 67996afbf6 Efl.Ui.Slider: make indicator_visible_mode() legacy APIs
Ref T6376
2017-11-17 14:38:32 +09:00
Amitesh Singh 77164413cd Efl.Ui.Slider: make indicator_show_on_focus/indicator_show() legacy APIs
Ref T6376
2017-11-17 14:38:32 +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 528dfce251 slider: Export the part class
It needs to be exposed for things like c++ and others to work.
2017-11-07 22:17:04 +09:00
Amitesh Singh d6c9b37925 Efl.Ui.Slider: implement Slider.part & Ui.format functions
indicator_format_set/get & indicator_format_function_set are
now legacy APIs.
indicator format can be set by using generic Ui.Format function
e.g.
efl_ui_format_string_set(efl_part(sliderObj, "indicator"), "1.0%f");
2017-11-07 17:13:44 +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
WooHyun Jung 276d10c7bb efl_ui_slider: add eina_value_flush after using the value 2017-10-31 11:33:12 +09:00
Amitesh Singh 176ade58bb elm: call eina_value_flush to deallocate memory
I am not sure if Eina_Value allocates dynamic memory
for basic types but its better practice to call eina_value_flush()
at the end.
2017-10-30 20:29:42 +09:00
Cedric BAIL e4066474da elementary: efl_ui_format_cb_set is actually going to free the existing format. 2017-10-26 11:11:12 -07:00
Amitesh Singh 5298cb59d2 Efl.Ui.Format: implement generic format_string function
This generic format_string would be used in slider,progressbar
and other widgets.This default function handles INT
and DOUBLE eina value types for now.

Ref T6204
2017-10-26 21:11:36 +09:00
Amitesh Singh 944c4dee1b Efl.Ui.Slider: call format_free_cb() when object destroys
fix mistake done in previous patch 8661fe234c
2017-10-25 16:30:48 +09:00
Amitesh Singh 8661fe234c Efl.Ui.Slider: implement format_cb for units
Ref T6204
2017-10-25 16:18:54 +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 c9c9e6a209 elm: Rename Elm.Activate to Efl.Ui.Activate
Note: This is an EO-only beta API.

Ref T5329
2017-10-17 17:31:38 +09:00
Amitesh Singh 85d4a618a7 slider/progressbar: implement format_string of Efl.Ui.Format
remove the unit_format from Efl.Ui.Range.
2017-10-17 17:16:45 +09:00
Marcel Hollerbach 44554a6044 elm_slider: do not eat all key down events 2017-10-16 15:34:36 +02:00
Marcel Hollerbach 6f9beb01c5 efl_ui_slider: remove old api! 2017-10-10 19:28:46 +02:00
Daniel Hirt deca3c947f Ui layout: support markup for efl_part()
Also implement markup_set/get for:
  - Efl.Ui.Frame
  - Efl.Ui.Slider

Users may choose between text_set/get and markup_set/get, depending on
whether they want to escape their text or not.
2017-09-28 19:32:02 +03:00
Jean-Philippe Andre 112edeeea8 elm: Remove range "span_size" API in EO
Reasons:
 - This API has been confused with the min size of the widget, resulting
   in badly laid out applications.
 - The EO API was not very nice (Range is about numbers, the Gfx size
   hint in a part is really ugly).

While I understand the value of this API and how it can be used in
scalable applications, it is in fact not absolutely necessary.
Alternatively to that span size, the widget min size can already be
defined from the application side, or the widget can simply be expanded
to fill in its parent.

This can obviously be reinstated later if the need arises for EO. For
now, keep this feature as legacy-only.
2017-09-21 12:27:34 +09:00
Jean-Philippe Andre 28b387821d elm: Split off text and content for efl_part
This is VERY tricky.
For legacy, just create an internal class that has both. It's easier
this way. For parts that are handled by Layout directly, we know from
Edje which type to return.

For EO objects we should know from the part name which kind of part we
are dealing with:
 - text (overridden by the widget)
 - content (overridden by the widget)
 - special (new efl_part based functions)
 - generic (handled by Layout)

Note: Efl.Ui.Slider was handling "span size" on ALL parts. That's bad...
This is now limited to "span" only.
2017-09-21 12:27:34 +09:00
Jean-Philippe Andre 0339ad7740 elm: Move base implementation for efl_part in widget
This means that ALL part handles inherit from the base part class
Efl.Ui.Widget.Part. Layout is the only exception where Efl.Part is
specially overridden.

This is a first step towards generic part APIs, including background in
all widgets.
2017-09-21 12:27:33 +09:00
Jean-Philippe Andre 3bff7363b5 efl: Use Eina.Size2D for size hint min 2017-09-18 14:42:52 +09:00
Jean-Philippe Andre d5a31f3f30 edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.

As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.

Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.

Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.

This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)

Ref T5315
Ref T5306
2017-09-13 13:53:49 +09:00
Amitesh Singh 6c8ec7a319 efl.ui.slider: implement efl.text intf
efl_text_set/get would work on slider text part.
2017-09-12 18:25:41 +09:00
Amitesh Singh 120d0673a9 efl.ui.range: remove interval_enable/set/get APIs from interface
Remove interval related apis from interface since interval slider
implements these features now. Although legacy range APIs would still
work on slider widget.
2017-09-12 18:08:42 +09:00
Lukasz Stanislawski 9f7786544e elm: rename Elm.Interface.Atspi.Value => Efl.Access.Value
Reviewers: jpeg, cedric, stanluk

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5161
2017-09-12 15:46:19 +09:00