summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-05-18 20:10:21 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-05-18 20:10:27 +0900
commit86751fdbaf28796736876e23b86f26480e22de52 (patch)
treebbd5ff8b320331e5548085bbe41ccc364a74d9d8 /src
parent183cef932e47d0694032f641b3c54172fba5c3fe (diff)
evas: New Evas Callback added when viewport is resized.
Summary: @feature Reviewers: seoz, Hermet, cedric, raster Subscribers: seoz, cedric, sachin.dev Differential Revision: https://phab.enlightenment.org/D2526
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/Evas_Common.h1
-rw-r--r--src/lib/evas/Evas_Eo.h2
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c4
-rw-r--r--src/lib/evas/canvas/evas_main.c1
4 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 7a6bbff4ae..bc2e18428a 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -118,6 +118,7 @@ typedef enum _Evas_Callback_Type
118 EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */ 118 EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */
119 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */ 119 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */
120 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */ 120 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */
121 EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, /**< Canvas viewport resized @since 1.15 */
121 122
122 /* 123 /*
123 * More Evas object event types - see evas_object_event_callback_add(): 124 * More Evas object event types - see evas_object_event_callback_add():
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 8850a45cbc..c81ce469d2 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -12,6 +12,7 @@ EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_PRE;
12EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST; 12EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST;
13EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED; 13EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED;
14EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE; 14EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE;
15EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_VIEWPORT_RESIZE;
15 16
16// Callbacks events for use with Evas canvases 17// Callbacks events for use with Evas canvases
17#define EVAS_CANVAS_EVENT_FOCUS_IN (&(_EVAS_CANVAS_EVENT_FOCUS_IN)) 18#define EVAS_CANVAS_EVENT_FOCUS_IN (&(_EVAS_CANVAS_EVENT_FOCUS_IN))
@@ -24,6 +25,7 @@ EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE;
24#define EVAS_CANVAS_EVENT_RENDER_POST (&(_EVAS_CANVAS_EVENT_RENDER_POST)) 25#define EVAS_CANVAS_EVENT_RENDER_POST (&(_EVAS_CANVAS_EVENT_RENDER_POST))
25#define EVAS_CANVAS_EVENT_DEVICE_CHANGED (&(_EVAS_CANVAS_EVENT_DEVICE_CHANGED)) 26#define EVAS_CANVAS_EVENT_DEVICE_CHANGED (&(_EVAS_CANVAS_EVENT_DEVICE_CHANGED))
26#define EVAS_CANVAS_EVENT_AXIS_UPDATE (&(_EVAS_CANVAS_EVENT_AXIS_UPDATE)) 27#define EVAS_CANVAS_EVENT_AXIS_UPDATE (&(_EVAS_CANVAS_EVENT_AXIS_UPDATE))
28#define EVAS_CANVAS_EVENT_VIEWPORT_RESIZE (&(_EVAS_CANVAS_EVENT_VIEWPORT_RESIZE))
27 29
28#include "canvas/evas_signal_interface.eo.h" 30#include "canvas/evas_signal_interface.eo.h"
29#include "canvas/evas_draggable_interface.eo.h" 31#include "canvas/evas_draggable_interface.eo.h"
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index e7526ba0a1..59850f62d9 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -31,6 +31,9 @@ EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT =
31EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED = 31EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED =
32 EO_HOT_EVENT_DESCRIPTION("Device changed", 32 EO_HOT_EVENT_DESCRIPTION("Device changed",
33 "Devices added, removed or changed to the canvas"); 33 "Devices added, removed or changed to the canvas");
34EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_VIEWPORT_RESIZE =
35 EO_HOT_EVENT_DESCRIPTION("Canvas viewport resize",
36 "Canvas viewport is resized");
34/** 37/**
35 * Evas events descriptions for Eo. 38 * Evas events descriptions for Eo.
36 */ 39 */
@@ -65,6 +68,7 @@ static const Eo_Event_Description *_legacy_evas_callback_table[EVAS_CALLBACK_LAS
65 EVAS_CANVAS_EVENT_RENDER_FLUSH_POST, 68 EVAS_CANVAS_EVENT_RENDER_FLUSH_POST,
66 EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN, 69 EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN,
67 EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT, 70 EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT,
71 EVAS_CANVAS_EVENT_VIEWPORT_RESIZE,
68 EVAS_OBJECT_EVENT_IMAGE_UNLOADED, 72 EVAS_OBJECT_EVENT_IMAGE_UNLOADED,
69 EVAS_CANVAS_EVENT_RENDER_PRE, 73 EVAS_CANVAS_EVENT_RENDER_PRE,
70 EVAS_CANVAS_EVENT_RENDER_POST, 74 EVAS_CANVAS_EVENT_RENDER_POST,
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 7e281a4efb..b14194d3be 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -413,6 +413,7 @@ _evas_canvas_output_viewport_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas
413 e->viewport.changed = 1; 413 e->viewport.changed = 1;
414 e->output_validity++; 414 e->output_validity++;
415 e->changed = 1; 415 e->changed = 1;
416 evas_event_callback_call(e->evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, NULL);
416} 417}
417 418
418EOLIAN static void 419EOLIAN static void