summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland/ecore_wl_dnd.c
diff options
context:
space:
mode:
authorvivek <vivek.ellur@samsung.com>2014-09-19 09:04:49 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-19 09:04:49 -0400
commit59710fadbdca435a822dd5638cb963aa6a57330b (patch)
tree57ed209c7773728552256da0a618fbe26f4104a0 /src/lib/ecore_wayland/ecore_wl_dnd.c
parent0e9a691d6253744ca9fe84a2b8ad34b8f0188c1b (diff)
Ecore_Wayland: Raise a event when data source target accepts events
Summary: 1) Added data source target struct for target event 2) Raise a event when data source target accepts pointer focus or motion events Signed-off-by: vivek <vivek.ellur@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1466
Diffstat (limited to 'src/lib/ecore_wayland/ecore_wl_dnd.c')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_dnd.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c b/src/lib/ecore_wayland/ecore_wl_dnd.c
index c816e9dc86..ad28e7cd66 100644
--- a/src/lib/ecore_wayland/ecore_wl_dnd.c
+++ b/src/lib/ecore_wayland/ecore_wl_dnd.c
@@ -26,6 +26,7 @@ static void _ecore_wl_dnd_selection_data_ready_cb_free(void *data EINA_UNUSED, v
26static Eina_Bool _ecore_wl_dnd_selection_cb_idle(void *data); 26static Eina_Bool _ecore_wl_dnd_selection_cb_idle(void *data);
27 27
28static void _ecore_wl_dnd_source_cb_target(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type EINA_UNUSED); 28static void _ecore_wl_dnd_source_cb_target(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type EINA_UNUSED);
29static void _ecore_wl_dnd_source_cb_target_free(void *data EINA_UNUSED, void *event);
29static void _ecore_wl_dnd_source_cb_send(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type, int32_t fd); 30static void _ecore_wl_dnd_source_cb_send(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type, int32_t fd);
30static void _ecore_wl_dnd_source_cb_send_free(void *data EINA_UNUSED, void *event); 31static void _ecore_wl_dnd_source_cb_send_free(void *data EINA_UNUSED, void *event);
31static void _ecore_wl_dnd_source_cb_cancelled(void *data EINA_UNUSED, struct wl_data_source *source); 32static void _ecore_wl_dnd_source_cb_cancelled(void *data EINA_UNUSED, struct wl_data_source *source);
@@ -724,11 +725,31 @@ _ecore_wl_dnd_selection_cb_idle(void *data)
724static void 725static void
725_ecore_wl_dnd_source_cb_target(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type EINA_UNUSED) 726_ecore_wl_dnd_source_cb_target(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type EINA_UNUSED)
726{ 727{
728 Ecore_Wl_Event_Data_Source_Target *event;
727 Ecore_Wl_Input *input; 729 Ecore_Wl_Input *input;
728 730
731 LOGFN(__FILE__, __LINE__, __FUNCTION__);
729 if (!(input = data)) return; 732 if (!(input = data)) return;
730 733
731 printf("Dnd Source Target\n"); 734 if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Data_Source_Target)))) return;
735
736 event->type = strdup(mime_type);
737
738 ecore_event_add(ECORE_WL_EVENT_DATA_SOURCE_TARGET, event,
739 _ecore_wl_dnd_source_cb_target_free, NULL);
740}
741
742static void
743_ecore_wl_dnd_source_cb_target_free(void *data EINA_UNUSED, void *event)
744{
745 Ecore_Wl_Event_Data_Source_Target *ev;
746
747 LOGFN(__FILE__, __LINE__, __FUNCTION__);
748
749 if (!(ev = event)) return;
750
751 free(ev->type);
752 free(ev);
732} 753}
733 754
734static void 755static void