summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm.c
diff options
context:
space:
mode:
authorSeunghun Lee <shiin.lee@samsung.com>2014-12-10 12:12:21 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-10 12:12:21 -0500
commit5720a350f995c017efc1bf5d4472856dc7552962 (patch)
tree50d7b64923e69cba0b6d6e87b21330af5633eb3b /src/lib/ecore_drm/ecore_drm.c
parent5d767aff32e42040da0dd6a5c4d70cff7139e1b2 (diff)
ecore-drm: Add event to notify session activation state.
Summary: this event is to notify session activation state to compositor. thus compositor can change composite state by this event. Reviewers: devilhorns Subscribers: torori, cedric Differential Revision: https://phab.enlightenment.org/D1767
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c
index 6413270a08..1bbd49caa0 100644
--- a/src/lib/ecore_drm/ecore_drm.c
+++ b/src/lib/ecore_drm/ecore_drm.c
@@ -2,6 +2,7 @@
2# include "config.h" 2# include "config.h"
3#endif 3#endif
4 4
5#include "Ecore_Drm.h"
5#include "ecore_drm_private.h" 6#include "ecore_drm_private.h"
6 7
7/* local variables */ 8/* local variables */
@@ -10,6 +11,24 @@ static int _ecore_drm_init_count = 0;
10/* external variables */ 11/* external variables */
11int _ecore_drm_log_dom = -1; 12int _ecore_drm_log_dom = -1;
12 13
14EAPI int ECORE_DRM_EVENT_ACTIVATE = 0;
15
16static void
17_ecore_drm_event_activate_free(void *data EINA_UNUSED, void *event)
18{
19 free(event);
20}
21
22void
23_ecore_drm_event_activate_send(Eina_Bool active)
24{
25 Ecore_Drm_Event_Activate *e;
26
27 e = calloc(1, sizeof(Ecore_Drm_Event_Activate));
28 e->active = active;
29 ecore_event_add(ECORE_DRM_EVENT_ACTIVATE, e, _ecore_drm_event_activate_free, NULL);
30}
31
13/** 32/**
14 * @defgroup Ecore_Drm_Init_Group Drm Library Init and Shutdown Functions 33 * @defgroup Ecore_Drm_Init_Group Drm Library Init and Shutdown Functions
15 * 34 *
@@ -67,6 +86,8 @@ ecore_drm_init(void)
67 /* try to init eeze */ 86 /* try to init eeze */
68 if (!eeze_init()) goto eeze_err; 87 if (!eeze_init()) goto eeze_err;
69 88
89 ECORE_DRM_EVENT_ACTIVATE = ecore_event_type_new();
90
70 /* return init count */ 91 /* return init count */
71 return _ecore_drm_init_count; 92 return _ecore_drm_init_count;
72 93