summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-02-14 14:32:52 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-21 20:24:33 +0100
commit2df6e1103de30fa5c3a4e2ed7ebbc0f5bd5fbf77 (patch)
treed568d6c381f3a86bb783bf427bfa8a589b9e004e /src
parente166486107565e70431ab08bb02cceca2ed58637 (diff)
efl.canvas.scene: add 'seat_default' property
there seems to be no other way to directly return the default seat object? ref T7584 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7956
Diffstat (limited to 'src')
-rw-r--r--src/lib/efl/interfaces/efl_canvas_scene.eo15
-rw-r--r--src/lib/elementary/efl_ui_win.c6
-rw-r--r--src/lib/elementary/efl_ui_win.eo1
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo1
-rw-r--r--src/lib/evas/canvas/evas_device.c6
5 files changed, 29 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_canvas_scene.eo b/src/lib/efl/interfaces/efl_canvas_scene.eo
index c98e28f0ab..77818f011a 100644
--- a/src/lib/efl/interfaces/efl_canvas_scene.eo
+++ b/src/lib/efl/interfaces/efl_canvas_scene.eo
@@ -191,6 +191,21 @@ interface @beta Efl.Canvas.Scene
191 seat: Efl.Input.Device; [[The seat or $null if not found.]] 191 seat: Efl.Input.Device; [[The seat or $null if not found.]]
192 } 192 }
193 } 193 }
194 @property seat_default {
195 [[Get the default seat attached to this canvas.
196
197 A canvas may have exactly one default seat.
198
199 See also @.device to find a seat by name.
200 See also @.seat to find a seat by id.
201 ]]
202 get {
203 [[Get the default seat.]]
204 }
205 values {
206 seat: Efl.Input.Device; [[The default seat or $null if one does not exist.]]
207 }
208 }
194 @property pointer_position { 209 @property pointer_position {
195 get { 210 get {
196 [[This function returns the current known pointer coordinates 211 [[This function returns the current known pointer coordinates
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index e6f1741dfe..186c22a752 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2617,6 +2617,12 @@ _efl_ui_win_efl_canvas_scene_device_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Da
2617} 2617}
2618 2618
2619EOLIAN static Efl_Input_Device * 2619EOLIAN static Efl_Input_Device *
2620_efl_ui_win_efl_canvas_scene_seat_default_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
2621{
2622 return efl_canvas_scene_seat_default_get(sd->evas);
2623}
2624
2625EOLIAN static Efl_Input_Device *
2620_efl_ui_win_efl_canvas_scene_seat_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int id) 2626_efl_ui_win_efl_canvas_scene_seat_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int id)
2621{ 2627{
2622 return efl_canvas_scene_seat_get(sd->evas, id); 2628 return efl_canvas_scene_seat_get(sd->evas, id);
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index bb493f7285..9cf9c7b185 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -880,6 +880,7 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac
880 Efl.Gfx.Hint.hint_weight { set; } 880 Efl.Gfx.Hint.hint_weight { set; }
881 Efl.Gfx.Hint.hint_size_max { set; } 881 Efl.Gfx.Hint.hint_size_max { set; }
882 Efl.Text.text { get; set; } 882 Efl.Text.text { get; set; }
883 Efl.Canvas.Scene.seat_default { get; }
883 Efl.Canvas.Scene.pointer_position { get; } 884 Efl.Canvas.Scene.pointer_position { get; }
884 Efl.Canvas.Pointer.pointer_inside { get; } 885 Efl.Canvas.Pointer.pointer_inside { get; }
885 Efl.Canvas.Scene.image_max_size { get; } 886 Efl.Canvas.Scene.image_max_size { get; }
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index 32e7347504..2ce9c47361 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -965,6 +965,7 @@ class Evas.Canvas extends Efl.Loop_Consumer implements Efl.Canvas.Scene, Efl.Ani
965 Efl.Canvas.Pointer.pointer_inside { get; } 965 Efl.Canvas.Pointer.pointer_inside { get; }
966 Efl.Canvas.Scene.device { get; } 966 Efl.Canvas.Scene.device { get; }
967 Efl.Canvas.Scene.seat { get; } 967 Efl.Canvas.Scene.seat { get; }
968 Efl.Canvas.Scene.seat_default { get; }
968 Efl.Canvas.Scene.image_max_size { get; } 969 Efl.Canvas.Scene.image_max_size { get; }
969 Efl.Canvas.Scene.objects_at_xy_get; 970 Efl.Canvas.Scene.objects_at_xy_get;
970 Efl.Canvas.Scene.object_top_at_xy_get; 971 Efl.Canvas.Scene.object_top_at_xy_get;
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index 3f52d59635..a5a28fa27b 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -145,6 +145,12 @@ evas_device_get(Evas *eo_e, const char *name)
145} 145}
146 146
147EOLIAN Efl_Input_Device * 147EOLIAN Efl_Input_Device *
148_evas_canvas_efl_canvas_scene_seat_default_get(Evas *eo_e EINA_UNUSED, Evas_Public_Data *e)
149{
150 return e->default_seat;
151}
152
153EOLIAN Efl_Input_Device *
148_evas_canvas_efl_canvas_scene_seat_get(Evas *eo_e EINA_UNUSED, Evas_Public_Data *e, unsigned int id) 154_evas_canvas_efl_canvas_scene_seat_get(Evas *eo_e EINA_UNUSED, Evas_Public_Data *e, unsigned int id)
149{ 155{
150 Evas_Device *dev; 156 Evas_Device *dev;