aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-11 11:22:04 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-11 21:35:01 +0100
commitf7670ff5fd212d6db290cea4ac27ac4e8adb627e (patch)
treed8c4b60f48d96e1b2c018cd9e4a57b76c254cc7a
parentefl: mark most generated eina.error vars as @beta (diff)
downloadefl-f7670ff5fd212d6db290cea4ac27ac4e8adb627e.tar.gz
efl.ui.win: add event info to 'rotation,changed' event and rename
be consistent with property name and '*,changed' event info convention ref https://phab.enlightenment.org/T7511 Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8293
-rw-r--r--src/lib/elementary/efl_ui_selection_manager.c6
-rw-r--r--src/lib/elementary/efl_ui_win.c5
-rw-r--r--src/lib/elementary/efl_ui_win.eo2
-rw-r--r--src/lib/elementary/elm_conform.c4
4 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c
index aa48ba72a1..7b06cfc142 100644
--- a/src/lib/elementary/efl_ui_selection_manager.c
+++ b/src/lib/elementary/efl_ui_selection_manager.c
@@ -1340,7 +1340,7 @@ _x11_drag_mouse_up(void *data, int etype EINA_UNUSED, void *event)
{
Evas_Object *win = elm_widget_top_get(seat_sel->drag_obj);
if (win && efl_isa(win, EFL_UI_WIN_CLASS))
- efl_event_callback_del(win, EFL_UI_WIN_EVENT_ROTATION_CHANGED,
+ efl_event_callback_del(win, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED,
_x11_win_rotation_changed_cb, seat_sel->drag_win);
}
}
@@ -1496,7 +1496,7 @@ _x11_efl_sel_manager_drag_start(Eo *obj EINA_UNUSED, Efl_Ui_Selection_Manager_Da
if (win && efl_isa(win, EFL_UI_WIN_CLASS))
{
elm_win_rotation_set(seat_sel->drag_win, elm_win_rotation_get(win));
- efl_event_callback_add(win, EFL_UI_WIN_EVENT_ROTATION_CHANGED,
+ efl_event_callback_add(win, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED,
_x11_win_rotation_changed_cb, seat_sel->drag_win);
}
}
@@ -4927,7 +4927,7 @@ _efl_ui_selection_manager_drag_cancel(Eo *obj EINA_UNUSED, Efl_Ui_Selection_Mana
{
Evas_Object *win = elm_widget_top_get(seat_sel->drag_obj);
if (win && efl_isa(win, EFL_UI_WIN_CLASS))
- efl_event_callback_del(win, EFL_UI_WIN_EVENT_ROTATION_CHANGED,
+ efl_event_callback_del(win, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED,
_x11_win_rotation_changed_cb, seat_sel->drag_win);
}
}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 553e42aed9..dde917663d 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1644,8 +1644,9 @@ _win_rotate(Evas_Object *obj, Efl_Ui_Win_Data *sd, int rotation, Eina_Bool resiz
_elm_win_xwin_update(sd);
#endif
_elm_win_frame_obj_update(sd, 0);
- efl_event_callback_legacy_call
- (obj, EFL_UI_WIN_EVENT_ROTATION_CHANGED, NULL);
+ efl_event_callback_call
+ (obj, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED, (void*)(uintptr_t)rotation);
+ evas_object_smart_callback_call(obj, "rotation,changed", NULL);
if (_elm_config->atspi_mode)
{
Evas_Coord x = 0, y = 0, width = 0, height = 0;
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index 1766aff987..bc2e8e1917 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -880,7 +880,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
maximized: void; [[Called when window is set to maximized]]
unmaximized: void; [[Called when window is no longer set to maximized]]
indicator,prop,changed @beta: void; [[Called when indicator is property changed]]
- rotation,changed: void; [[Called when window rotation is changed]]
+ win_rotation,changed: int; [[Called when window rotation is changed, sends current rotation in degrees]]
profile,changed @beta: void; [[Called when profile is changed]]
wm,rotation,changed @beta: void; [[Called when window manager rotation is changed]]
theme,changed: void; [[Called when theme is changed]]
diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c
index 3f3549f1dc..82b5e2fe7d 100644
--- a/src/lib/elementary/elm_conform.c
+++ b/src/lib/elementary/elm_conform.c
@@ -960,7 +960,7 @@ _elm_conformant_efl_canvas_group_group_del(Eo *obj, Elm_Conformant_Data *sd)
evas_object_data_set(sd->win, "\377 elm,conformant", NULL);
efl_event_callback_del(sd->win, EFL_UI_WIN_EVENT_INDICATOR_PROP_CHANGED, _on_indicator_mode_changed, obj);
- efl_event_callback_del(sd->win, EFL_UI_WIN_EVENT_ROTATION_CHANGED, _on_rotation_changed, obj);
+ efl_event_callback_del(sd->win, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED, _on_rotation_changed, obj);
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
@@ -1014,7 +1014,7 @@ _elm_conformant_efl_object_constructor(Eo *obj, Elm_Conformant_Data *sd)
evas_object_data_set(sd->win, "\377 elm,conformant", obj);
efl_event_callback_add(sd->win, EFL_UI_WIN_EVENT_INDICATOR_PROP_CHANGED, _on_indicator_mode_changed, obj);
- efl_event_callback_add(sd->win, EFL_UI_WIN_EVENT_ROTATION_CHANGED, _on_rotation_changed, obj);
+ efl_event_callback_add(sd->win, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED, _on_rotation_changed, obj);
return obj;
}