diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/efl/interfaces/efl_canvas.eo | 5 | ||||
-rw-r--r-- | src/lib/evas/Evas_Legacy.h | 24 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_canvas.eo | 31 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_main.c | 10 |
4 files changed, 38 insertions, 32 deletions
diff --git a/src/lib/efl/interfaces/efl_canvas.eo b/src/lib/efl/interfaces/efl_canvas.eo index 6655dabd4a..2711111c73 100644 --- a/src/lib/efl/interfaces/efl_canvas.eo +++ b/src/lib/efl/interfaces/efl_canvas.eo | |||
@@ -209,7 +209,10 @@ interface Efl.Canvas () | |||
209 | A canvas begins with the mouse being assumed outside ($false). | 209 | A canvas begins with the mouse being assumed outside ($false). |
210 | ]] | 210 | ]] |
211 | } | 211 | } |
212 | /* FIXME: missing keys { seat } */ | 212 | /* keys { |
213 | seat: Efl.Input.Device @optional; [[The seat to consider, if $null | ||
214 | then the default seat will be used.]] | ||
215 | } */ | ||
213 | values { | 216 | values { |
214 | inside: bool; [[$true if the mouse pointer is inside the canvas, | 217 | inside: bool; [[$true if the mouse pointer is inside the canvas, |
215 | $false otherwise]] | 218 | $false otherwise]] |
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index ddfb67f907..32ef78e4c1 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h | |||
@@ -1033,6 +1033,30 @@ EAPI const Evas_Lock *evas_key_lock_get(const Evas *obj) EINA_WARN_UNUSED_RESULT | |||
1033 | */ | 1033 | */ |
1034 | 1034 | ||
1035 | /** | 1035 | /** |
1036 | * @brief Returns whether the default mouse pointer is logically inside the | ||
1037 | * canvas. | ||
1038 | * | ||
1039 | * When this function is called it will return a value of either @c false or | ||
1040 | * @c true, depending on if event_feed_mouse_in or event_feed_mouse_out have | ||
1041 | * been called to feed in a mouse enter event into the canvas. | ||
1042 | * | ||
1043 | * A return value of @c true indicates the mouse is logically inside the | ||
1044 | * canvas, and @c false implies it is logically outside the canvas. | ||
1045 | * | ||
1046 | * A canvas begins with the mouse being assumed outside ($false). | ||
1047 | * | ||
1048 | * If @c e is not a valid canvas, the return value is undefined. | ||
1049 | * | ||
1050 | * @param[in] obj The object. | ||
1051 | * | ||
1052 | * @return @c true if the mouse pointer is inside the canvas, @c false | ||
1053 | * otherwise | ||
1054 | * | ||
1055 | * @ingroup Evas_Canvas | ||
1056 | */ | ||
1057 | EAPI Eina_Bool evas_pointer_inside_get(const Evas *obj) EINA_WARN_UNUSED_RESULT; | ||
1058 | |||
1059 | /** | ||
1036 | * @defgroup Evas_Touch_Point_List Touch Point List Functions | 1060 | * @defgroup Evas_Touch_Point_List Touch Point List Functions |
1037 | * | 1061 | * |
1038 | * Functions to get information of touched points in the Evas. | 1062 | * Functions to get information of touched points in the Evas. |
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo index b43c3ba152..cb6b902738 100644 --- a/src/lib/evas/canvas/evas_canvas.eo +++ b/src/lib/evas/canvas/evas_canvas.eo | |||
@@ -280,36 +280,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface, | |||
280 | in: bool; [[$true if the pointer is inside, $false otherwise.]] | 280 | in: bool; [[$true if the pointer is inside, $false otherwise.]] |
281 | } | 281 | } |
282 | } | 282 | } |
283 | @property pointer_inside { | ||
284 | get { | ||
285 | [[Returns whether the default mouse pointer is logically inside the | ||
286 | canvas. | ||
287 | |||
288 | When this function is called it will return a value of either | ||
289 | $false or $true, depending on if event_feed_mouse_in or | ||
290 | event_feed_mouse_out have been called to feed in a mouse | ||
291 | enter event into the canvas. | ||
292 | |||
293 | A return value of $true indicates the mouse is logically | ||
294 | inside the canvas, and $false implies it is logically | ||
295 | outside the canvas. | ||
296 | |||
297 | A canvas begins with the mouse being assumed outside ($false). | ||
298 | |||
299 | If $e is not a valid canvas, the return value is undefined. | ||
300 | ]] | ||
301 | /* FIXME-doc | ||
302 | Example: | ||
303 | @code | ||
304 | extern Evas *evas; | ||
305 | |||
306 | if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n"); | ||
307 | else printf("Mouse is out!\n"); | ||
308 | @endcode | ||
309 | */ | ||
310 | return: bool @warn_unused; [[$true if the mouse pointer is inside the canvas, $false otherwise]] | ||
311 | } | ||
312 | } | ||
313 | @property image_max_size { | 283 | @property image_max_size { |
314 | get { | 284 | get { |
315 | [[Get the maximum image size evas can possibly handle. | 285 | [[Get the maximum image size evas can possibly handle. |
@@ -1170,6 +1140,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface, | |||
1170 | Efl.Object.provider_find; | 1140 | Efl.Object.provider_find; |
1171 | Efl.Loop_User.loop { get; } | 1141 | Efl.Loop_User.loop { get; } |
1172 | //Efl.Canvas.seats; | 1142 | //Efl.Canvas.seats; |
1143 | Efl.Canvas.pointer_inside { get; } | ||
1173 | Efl.Canvas.device { get; } | 1144 | Efl.Canvas.device { get; } |
1174 | Efl.Canvas.seat { get; } | 1145 | Efl.Canvas.seat { get; } |
1175 | } | 1146 | } |
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 9efd0ca57d..3266af17ad 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c | |||
@@ -662,7 +662,7 @@ _evas_canvas_pointer_button_down_mask_get(Eo *eo_e, Evas_Public_Data *e) | |||
662 | } | 662 | } |
663 | 663 | ||
664 | EOLIAN static Eina_Bool | 664 | EOLIAN static Eina_Bool |
665 | _evas_canvas_pointer_inside_get(Eo *eo_e, Evas_Public_Data *e) | 665 | _evas_canvas_efl_canvas_pointer_inside_get(Eo *eo_e, Evas_Public_Data *e) |
666 | { | 666 | { |
667 | return _evas_canvas_pointer_inside_by_device_get(eo_e, e, NULL); | 667 | return _evas_canvas_pointer_inside_by_device_get(eo_e, e, NULL); |
668 | } | 668 | } |
@@ -1295,6 +1295,14 @@ _evas_pointer_list_in_rect_get(Evas_Public_Data *edata, Evas_Object *obj, | |||
1295 | return list; | 1295 | return list; |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | /* Legacy EAPI */ | ||
1299 | |||
1300 | EAPI Eina_Bool | ||
1301 | evas_pointer_inside_get(const Evas *obj) | ||
1302 | { | ||
1303 | return efl_canvas_pointer_inside_get(obj); | ||
1304 | } | ||
1305 | |||
1298 | /* Internal EO APIs */ | 1306 | /* Internal EO APIs */ |
1299 | 1307 | ||
1300 | EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE = | 1308 | EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE = |