Commit Graph

30 Commits

Author SHA1 Message Date
Jean-Philippe Andre 20a5968c12 elm: Use a macro to handle key bindings
This factorizes the code and makes most widgets handle key down events
in the same way:
 - check that the object is not disabled, event is not on hold
 - figure out the key binding based on the class name
 - mark event as on hold

The class name is usually MY_CLASS_NAME but in some cases it was
MY_CLASS_NAME_LEGACY which may be different from the EO class name (eg.
elm_win vs. Efl.Ui.Win). In that case the key bindings are broken.

This breaks key bindings for the following widgets:
 - Win (focus)
 - Image ("clicked")
 - Video (move, play)

This fixes key bindings for the following widgets:
 - Nstate

Some widgets remain broken:
 - Photocam / Efl.Ui.Image.Zoomable

A patch will be applied to restore the key bindings for the above
breaks.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 069747b9de widget: Add eo event info inside widget_event
This is an internal function that should probably become an overridable
protected method, as it's required for proper event handling in widgets.
Next step: use eo_event_info in the widgets implementations. Then remove
legacy event struct.

Ref T5363
2017-08-23 11:16:45 +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
Carsten Haitzler ae79052376 elm calendar - fix gmtime call to use an actual value
e85c92662b added this bug. before it was
always set to 259200 (first sunday after epoch).

found by PVS studio
2017-07-31 10:00:00 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Cedric BAIL f2043359b0 elementary: refactor day handling in calendar to just use unsigned char. 2017-06-05 13:42:08 -07:00
Woochan Lee 503d46f704 calendar: fix elm_calendar_interval_set() API not working.
Summary:
The API was not working because of an internal logical error.

@fix

Test Plan: Calling elm_calendar_interval_set API in elementary_test.

Reviewers: jpeg, cedric, Hermet, woohyun

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07: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
Woochan Lee e85c92662b elm_calendar: Improve code quality.
Summary:
The values(259200, 86400) are hard to know the meaning.
And we don't have to call gmtime() in for loop.

Test Plan: elementary_test -> calendar

Reviewers: jpeg, Hermet, shilpasingh, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4717
2017-04-18 10:17:07 +09:00
Jee-Yong Um 6d0a2398ad Elm.Widget: rename "event.*" methods to solve name conflict
Summary:
Elm.Widget.event_callback_add conflicts with Efl.Object.event_callback_add.
To solve this problem, "widget_" prefix is added to methods starting with
"event".

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4521
2017-01-03 10:59:49 +09:00
Hermet Park 7a71559eff elementary calendar: it'd rather return false here. 2016-12-06 11:10:27 +09:00
Woochan Lee 40364b4985 elm_calendar: Changed the calendar focus highlight concept.
Summary:
The highlight image enable when calendar got a focus.

We enable the highlight image when the user sent a key event to calendar before.
The above concept seems to be incorrect when focus highlight activated already.

Test Plan:
elementary_test
calendar sample.

Reviewers: woohyun, cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4438
2016-12-01 10:41:48 +09:00
Woochan Lee 7b97d55004 elm_calendar: Use the flag already declared.
Summary: Oops, i missed use it in previous commit(6c04755a92)

Reviewers: cedric, jpeg, woohyun, Hermet

Reviewed By: Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4437
2016-11-30 13:24:37 +09:00
Jean-Philippe Andre f927169a10 elm: Fix build break 2016-11-29 15:41:56 +09:00
Woochan Lee 6c04755a92 elm/calendar: apply focus UI feature.
Summary:
elm_calendar is not subject to current automated focus policies due to internal implementation issues.
(Each date in the calendar is an edje part. )

For the above reasons, I have implemented the focus policy support manually.

Test Plan: elementary_test - calendar sample.

Reviewers: bu5hm4n, woohyun

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-28 11:35:27 -08:00
Cedric BAIL e317099426 elm/calendar: fix legacy API use. 2016-11-18 10:56:47 -08:00
JEONGHYUN YUN 3f76638b37 elm/calendar: add APIs for minimum and maximum values for the date
Summary:
elm_calendar already have minimum and maximum year set/get APIs.
I've added new APIs that exapanded from the year to the date.
These APIs help us not only set min/max month but also set min/max day.
If you set the minimum date, changing the displayed month or year if needed.
Displayed day also to be disabled if it is smaller than minimum date.

Reviewers: woohyun, Hermet, jpeg, CHAN, cedric

Reviewed By: CHAN, cedric

Subscribers: CHAN, cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-11-17 17:40:12 -08:00
Woochan Lee cb15722768 elm_calendar: Fix header text bug.
Summary:
There is a bug. when calendar showing very first time.
the some of the headers(weekday name) is blank.

Because of elm_layout_text_set() called with NULL value.

Need to insert all of the weekday names before set text.

@fix

Test Plan:
Execute elementary_test
Open calendar sample.
See the all of the header names there.

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4290
2016-09-13 15:17:27 +09:00
Woochan Lee 81db8e9f32 elm_calendar: Add enum to mark display every day before event day.
Summary:
There was no way to add marks on every day before event day.

The user may want to add mark something on every day before today.
(passed mark or disable etc...)

Test Plan:
Run elementary_test
Calling "elm_calendar_mark_add()" with ELM_CALENDAR_REVERSE_DAILY value.

Reviewers: cedric, Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4276
2016-09-06 16:20:15 +09:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jiwon Kim 50b549faa2 elm_calendar: fix first week is not changed
Summary: @fix

Test Plan:
1. elm_calendar_first_day_of_week_set(cal, ELM_DAY_MONDAY);
2. First week string should be changed to "Mon"

Reviewers: tasn, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-06 12:49:45 -07:00
Jinyong Park 3271ec8d18 theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum

* related history : 4ca3ef4514
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.

@fix

Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4073
2016-07-01 15:09:43 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre 9a052a740d Evas: Move smart_callbacks_descriptions to legacy 2016-06-17 19:25:47 +09:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00