Commit Graph

52 Commits

Author SHA1 Message Date
Amitesh Singh b7ee5d608d work init. 2018-04-12 18:56:37 +09: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
YeongJong Lee 403c014bd2 efl.ui.progressbar: change signal name for icon/text
Summary: see also 73f8b3b78f

Test Plan:
1. elementary_test -to progressbar
and elementary_test -to efl.ui.progressbar
2. check that icon and text are visible

Reviewers: cedric, woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5818
2018-02-26 21:22:26 +09:00
Carsten Haitzler d26f2237f1 elm progressbar - fix val set
set initial min and max to 0 and 1 respectively so val set works at
the start...

fixes T6697

@fix
2018-02-10 16:44:35 +09:00
Carsten Haitzler 1d5de2e58e efl ui progressbar - no space between value and percent in default fmt
do you write 20 % or 20% ? :) no space by default. fix.
2018-02-10 16:44:03 +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
Amitesh Singh 0aca43be23 efl.ui.progressbar: add checks for min & max value
this improves the validity check for min & max values
provided from user side.
2018-02-06 22:35:33 +09:00
Amitesh Singh 98f38ac0f7 Efl.ui.progressbar: remove duplicate call
eina_value_set() was already getting called
2018-01-31 18:04:39 +09:00
Amitesh Singh c99b37ad47 Efl.Ui.Progressbar: implement range min max 2018-01-31 17:44:20 +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
Amitesh Singh 4e3d71ef22 Efl.Ui.Progressbar: Add missing Efl.Text/Content 2018-01-16 20:15:10 +09:00
Jean-Philippe Andre a92186be6a ecore/edje/elm: Fix a few WRN from calls to NULL
This fixes some of the warnings generated by calling functions on NULL
objects. One of the main remaining points is to avoid unwanted warnings
on non-existing parts.

Ref T6326
2018-01-16 18:37:05 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Cedric BAIL 6e446c64d6 elementary: fixup typo breaking compilation. 2017-12-11 14:56:37 -08:00
Chris Michael 3cd4a5e77f 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 CID1383551

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-12-11 14:51:09 -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 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
Lukasz Stanislawski 20c9dd1e84 elm: add Efl.Access.Value interface to progressbar
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5479
2017-11-16 12:05:21 +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
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
Amitesh Singh 21259e411d Efl.Ui.Progressbar: fix val to be val when legacy format_function_set() is called
In Pb, the legacy units_format_set's user callback uses value to
be 100*value (0.0 to 100.0) and legacy format_function_set uses
value of range "0.0 to 1.0". This was broken after my patch.
Lets keep this behaviour in legacy APIs.

In case of new EO APIs, the value will be always from 0.0 to 1.0
in both format_string() and format_cb callbacks.
2017-10-27 11:56:22 +09:00
Amitesh Singh 111caabf10 Efl.Ui.Progressbar: move legacy funcs at bottom of file 2017-10-26 21:28:20 +09:00
Amitesh Singh 3092c0fdea Efl.Ui.Progressbar: implement format_cb.set
Also remove format_string.set/get implmentation
since it takes care by base Efl.Ui.Format.format_string

Ref T6204
2017-10-26 21:11:36 +09:00
Jean-Philippe Andre 006546a042 elm: Use auto_unref for parts
This avoids leaks.
2017-10-24 14:49:12 +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
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 1ef5ea660f efl_ui_progressbar: remove old api! 2017-10-10 19:28:46 +02: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 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
Jean-Philippe Andre 3f9c239b27 widget: Make sub_object add/del protected (EO)
Also prefix with widget.

I want to rename this as child rather than sub. It's inconsistent with
the other parent/child hierarchies. Anyway the various hierarchies are
confusing, so let's keep this name :)

Ref T5363
2017-08-23 20:56:37 +09:00
Jean-Philippe Andre c87f6018f9 progressbar: Switch to Efl.Ui.Dir (EO)
Ref T5870
2017-08-10 14:42:08 +09:00
Jean-Philippe Andre dee61f4097 elm: Cleanup theme and style set functions
This makes efl_ui_layout_theme_set() return a Theme_Apply error
code. The type is now public as Efl.Ui.Theme.Apply.

Ref T5329
Ref T5363
2017-08-09 17:08:24 +09:00
Jean-Philippe Andre 3add24fa45 elm: Continue elm_layout renaming
This renames a few macros.

Ref T5315
2017-08-08 13:39:44 +09:00
Jean-Philippe Andre 9a2d4928f0 elm: Rename elm_layout to Efl.Ui.Layout
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.

This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.

Ref T5315
2017-08-08 13:25:58 +09:00
Jean-Philippe Andre 6864495c99 elm: Move elm_layout_sizing_eval to legacy
elm_layout_sizing_eval() marks an object as requiring recalc.

Unfortunately, it's been massively abused by various widgets into
actually doing the calc, or the min calc. So we end up with one API
that has 3 different definitions depending on the widget type:
1. Mark as requiring recalc (correct, respects doc, elm_layout)
2. Calculate min size and other size hints
3. Actually do some geometry modification

I believe we need to clarify these 3 requirements into 3 very clear
and specific APIs in elementary. Right now we have similar functions
in evas for 1 (evas_object_smart_changed) and 3 (smart_calculate).
But their exact definition also isn't necessarily what we want for
elementary.

Another clear problem is that layout_eval does not do any calculation
(in theory), so the "eval" word is a bit of a stretch here.

Once we're sure about the exact API we want, we can add this back to
EO and make it work across our EO widgets. For now let's just keep
the legacy API, and its EO overrides, as is.

Ref T5315
2017-08-08 11:10:56 +09:00
Jean-Philippe Andre 796d4b138b elm: Make content and text aliases internal only
This removes the APIs from the EO API.

Ref T5315
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Amitesh Singh 0851d568a1 Efl.Ui.Progressbar: rename data get macros. 2017-06-16 16:32:46 +09:00
Amitesh Singh a7b49f2129 intf: range: rename unit_format to range_unit_format
ref T5361
2017-06-15 13:57:45 +09:00
Amitesh Singh 0911375d51 intf: rename progress to range
This is more appropriate name especially on slider widget.

ref T5361
2017-06-15 13:57:45 +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
Amitesh Singh 99738e4d39 Efl.Ui.Progressbar: Implement Efl.Ui.Progress intf for progressbar part
and remove part_value_set/get as EO APIs

ref T5360

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-24 19:25:28 +09:00