Commit Graph

31 Commits

Author SHA1 Message Date
Amitesh Singh b7ee5d608d work init. 2018-04-12 18:56:37 +09:00
WooHyun Jung d679425c48 efl_ui_nstate: make "changed" callback is called properly
- "changed" callback is not called when theme_apply is called
- elm_check_state_set does not call "changed" callback to keep
  backward compatibility
2018-02-13 22:50:14 +09:00
WooHyun Jung 5d5538de5c Revert "elm: do not call "changed" callback when setting style"
This reverts commit b1ee35e35c.
2018-02-13 19:20:19 +09:00
WooHyun Jung 23877f2c44 Revert "Efl.Ui.Nstate: do not call "changed" callback"
This reverts commit fd8e9f9c4e.
2018-02-13 18:39:20 +09:00
Shinwoo Kim fd8e9f9c4e Efl.Ui.Nstate: do not call "changed" callback
Before solving following problem in Efl.Ui.Check

https://phab.enlightenment.org/T6673

The changed callback is called with opposite value,
if application is using Efl.Ui.Check with state pointer.

The reason is that the changed callback is called in
efl_ui_nstate_activate, and the value refered by state pointer
is changed only after the efl_ui_nstate_activate is called.

static void
_activate(Evas_Object *obj)
{
   EFL_UI_CHECK_DATA_GET(obj, sd);

   efl_ui_nstate_activate(obj);
   if (sd->statep) *sd->statep = efl_ui_nstate_value_get(obj);
2018-02-07 16:25:36 +09:00
Shinwoo Kim b1ee35e35c elm: do not call "changed" callback when setting style 2018-02-06 22:40:11 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Jean-Philippe Andre 3136500fbe elm: Uniform change event for nstate,radio,check
I added convenience macros for check and radio, easing discoverability
in C.

This will avoid C# issues such as:

lib/elementary/elm_pan.eo.cs(14,23): warning CS0108: `elm.Pan.CHANGED'
hides inherited member `efl.Gfx.CHANGED'. Use the new keyword if hiding
was intended
lib/efl/interfaces/efl_gfx.eo.cs(24,23): (Location of the symbol related
to previous warning)

Since nstate is not a legacy widget, I can safely change the event name
and the test case.
2017-12-13 13:47:48 +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
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +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
Jean-Philippe Andre 1e83dd84c6 nstate: Remove some legacy code
This uses constructor/destructor instead of group_add/group_del.

Note: finalize can't be used for theme loading as any action done inside
efl_add(...) would be lost (eg. part text set).
2017-10-24 11:57:27 +09:00
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 ad7e16bcf4 layout: Use only legacy "elm_layout_sizing_eval"
This removes all uses of elm_obj_layout_sizing_eval.

Ref T5315
2017-08-04 11:52:16 +09:00
Amitesh Singh 850498e977 rename elm_button to Efl.Ui.Button
ref T5323

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-22 17:28:47 +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
Amitesh Singh fd2111d9d0 nstate: correct the legacy class name
@fix
2017-05-18 17:15:39 +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
Amitesh Singh 958308fa8a elm: nstate - cleanup edje signal cb
@fix
2016-09-29 10:29:58 +05:30
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
Carsten Haitzler 2936834d31 elementary - fix focus switching again after break
this fixes T4053

this was due to everal widgets haveing changed their class names and
are using the new names for mapping to keybinding config that used
legacy names to match binding to widget.
2016-07-12 18:06:13 +09: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
Amitesh Singh be47c4b9c0 elm: rename Elm.Nstate to Efl.Ui.Nstate 2016-05-10 12:41:03 +05:30