Commit Graph

34 Commits

Author SHA1 Message Date
Amitesh Singh b7ee5d608d work init. 2018-04-12 18:56:37 +09:00
Woochan Lee 008d990181 efl_ui_clock: Fix wrong target to compare with.
Summary:
It breaks API action.

It missed when implement efl_ui_clock i think.

@fix

Test Plan: elementary_test -> efl_ui_clock sample.

Reviewers: cedric, woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5826
2018-03-20 21:09:30 +09:00
Cedric BAIL 7c2a1932c7 efl_ui_clock: do not locally store clock module api
there is no corresponding code to unset this global pointer when the module
is unloaded, so this will crash if elm_shutdown is ever called

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-13 15:14:50 -07: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
Sungtaek Hong e2dee2c92b efl_ui_clock: remove warning
Summary: separator0 part was not text part, thus printing error.

Test Plan: Run elementary_test->Efl.Ui.Clock

Reviewers: jpeg, woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D5629
2017-12-08 16:02:24 +09: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
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
WooHyun Jung c1094da0f4 efl_ui_clock: changed property name from value to time 2017-10-25 16:44:25 +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
WooHyun Jung 3e2f727d47 efl_ui_clock: remove unused signals 2017-10-11 11:00:25 +09:00
Marcel Hollerbach e922d753b8 efl_ui_clock: remove old api! 2017-10-10 19:28:46 +02:00
Jean-Philippe Andre e9dfcb44ff widget: Implement translation API in layout
This moves the API entry points from Widget to Layout parts. I don't
think the other widgets support translation, but that is easy to fix.
The actual code implementation remains in elm_widget.c.

Legacy-only widgets are covered by Part_Legacy, while all EO widgets
that have text inherit from Layout (except Win but I don't think the
window title was translatable in legacy).

This removes 2/3 remaining part APIs from Widget.

Ref T5363
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 839c4ed395 elm: Introduce interface Efl.Ui.Translatable
This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).

For now I'm taking the following approach:
 - All efl_text_set/get strings are untranslatable, i.e. get() returns
   the visible string, set replaces and can not be translated.
 - translatable_text_set/get needs to be used to enable automatic
   translation, which in turns calls efl_text_set to modify the visible
   string. Thus, translatable applications will have to use
   efl_ui_translatable_text_set a lot more than efl_text_set, unless
   they translate strings application-side.

Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.
2017-09-26 17:58:07 +09:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Amitesh Singh 3984148b8e efl.ui.clock: correct value_set/get & value_min/max APIs signature.
We could just pass Efl_Time value as copy by value to set time in setter APIs
and return Efl_Time value in getter APIs.

Thanks to @JackDanielZ for the report.

Fixes T6008
2017-09-13 20:38:52 +09:00
Jean-Philippe Andre c0d7ea4af0 widget: Rename on_focus to on_focus_update (EO)
on_focus seems to imply that focus was just given to the widget, but
that function is called on any focus change (in and out).

Ref T5363
2017-09-01 10:09:37 +09:00
Woochan Lee f4522d4124 efl_ui_clock: Add 'O' character to ignore POSIX alternative format in format.
Summary:
_parse_format() function filtering "_/-/0/^/*" to filter POSIX alternatvie/extension formats,
But the Datetime do not appear in some locale(fa_IR, lzh_TW, my_MM, or_IN) with 'O'.

+ improve code. (not compare with all of the characters. instead of that using strchr)

https://lh.2xlibre.net/values/d_t_fmt/

@fix

Test Plan: Set locale as fa_IR and create DateTime. and see fields, not appears.

Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5020
2017-08-31 14:16:26 +09:00
Jean-Philippe Andre b6bab481aa widget: Mark old focus API as beta.
It's not beta. It's about to die.
Also, move #define ELM_WIDGET_BETA to the common header file, as it is
consequently required by ALL widgets. :(

Ping @bu5hm4n :)

Ref T5363
2017-08-31 11:22:04 +09:00
Jean-Philippe Andre f90d0d1501 widget: Simplify & document "translate"
This is a protected function. It doesn't need to return anything, as all
implementation just returned true, always. Also, the legacy API was just
a wrapper doing nothing special (except verify that we have a widget,
which the recursive code already does).

Tested with fr_FR :)

Ref T5363
2017-08-30 18:54:59 +09:00
Jean-Philippe Andre 6aa309ffb8 widget: Rename hook "disable" (EO)
Renamed to on_disabled_update.
Also passed in the new state of disabled. It's more convenient this way,
than having the subclasses call disabled_get.

Also simplify some code...

Ref T5363
2017-08-29 10:40:53 +09:00
Jean-Philippe Andre 031ae12c2f elm: Rename some EO widget class names
It was discussed a while ago that Zoomable was a poor name in some
languages, like python.

This changes, in Efl.Ui, to use underscores:
 - Image.Zoomable
 - Grid.Static
 - Box.Flow
 - Box.Stack
2017-08-23 11:16:45 +09:00
Woochan Lee 4656f98e22 efl_ui_clock: Parses the format recursively.
Summary:
Some of locale formats convert as extension format.
For example,
             uk_UA d_t_fmt is "%a, %d-%b-%Y %X %z".
             The %X will convert as %T.
             The %T format has to convert one more time to convert as %H:%M:%S.

ref : https://lh.2xlibre.net/locale/uk_UA/

We need to parse the format recursively to support that kind of case.

@fix

Test Plan:
Change the locale as uk_UA.
Run elementary_test -> datetime
See the time field is not appear.

Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5021
2017-08-22 14:17:41 +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 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 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
Jean-Philippe Andre aac07ca6c1 elm: Make clock widget more resilient to invalid config
I was in a situation where my elm_config had the proper version
but did not contain a proper module name for the clock widget.
This resulted in not being able to create any field object in
the clock widget... in other words it made for a very useless
clock :)

Ideally the config should be updated at this point. I'm not
sure how to proceed exactly, though :(
2017-02-21 16:18:15 +09:00
Cedric BAIL 9f5c37cda7 efl_ui_clock: fix use when no module is present.
T4875
2016-11-14 11:22:39 -08:00
Amitesh Singh 0bcb0302fb efl_ui_clock: Merge datetime/dayselector/clock widgets into efl_ui_clock.
Summary:
Datetime widget is module based, so datetime widget is used as base for efl_ui_clock and merged dayselector/clock features into efl_ui_clock.
Added day selection and seconds support in efl_ui_clock.
 Added clock features like auto updation of time, stop timer etc in efl_ui_clock.
 Added API to enable/disable edit_mode. efl_ui_clock can be configurable to display either only day/date/time or display any two of them or display all three.
Added efl_ui_clock.c and test_ui_clock.c. Theme and Module is added in another patch by Amitesh.

Original author is Yeshwanth <r.yeshwanth@samsung.com>. I have polished this patch a bit and make it compatible with current EFL code.

Test Plan: test_ui_clock

Reviewers: bu5hm4n, tasn, yashu21985, jpeg, cedric, raster

Subscribers: CHAN, woohyun

Differential Revision: https://phab.enlightenment.org/D3938
2016-11-03 12:00:17 +05:30