forked from enlightenment/efl
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
This commit is contained in:
parent
0e9a691d62
commit
59710fadbd
|
@ -61,6 +61,7 @@ typedef struct _Ecore_Wl_Event_Dnd_Drop Ecore_Wl_Event_Dnd_Drop;
|
|||
typedef struct _Ecore_Wl_Event_Dnd_End Ecore_Wl_Event_Dnd_End;
|
||||
typedef struct _Ecore_Wl_Event_Data_Source_Cancelled Ecore_Wl_Event_Data_Source_Cancelled; /** @since 1.12 */
|
||||
typedef struct _Ecore_Wl_Event_Data_Source_Send Ecore_Wl_Event_Data_Source_Send; /** @since 1.7 */
|
||||
typedef struct _Ecore_Wl_Event_Data_Source_Target Ecore_Wl_Event_Data_Source_Target; /** @since 1.12 */
|
||||
typedef struct _Ecore_Wl_Event_Selection_Data_Ready Ecore_Wl_Event_Selection_Data_Ready; /** @since 1.7 */
|
||||
typedef struct _Ecore_Wl_Event_Interfaces_Bound Ecore_Wl_Event_Interfaces_Bound;
|
||||
|
||||
|
@ -197,6 +198,12 @@ struct _Ecore_Wl_Event_Data_Source_Send
|
|||
int fd;
|
||||
};
|
||||
|
||||
/** @since 1.12 */
|
||||
struct _Ecore_Wl_Event_Data_Source_Target
|
||||
{
|
||||
char *type;
|
||||
};
|
||||
|
||||
/** @since 1.7 */
|
||||
struct _Ecore_Wl_Event_Selection_Data_Ready
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ static void _ecore_wl_dnd_selection_data_ready_cb_free(void *data EINA_UNUSED, v
|
|||
static Eina_Bool _ecore_wl_dnd_selection_cb_idle(void *data);
|
||||
|
||||
static void _ecore_wl_dnd_source_cb_target(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type EINA_UNUSED);
|
||||
static void _ecore_wl_dnd_source_cb_target_free(void *data EINA_UNUSED, void *event);
|
||||
static void _ecore_wl_dnd_source_cb_send(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type, int32_t fd);
|
||||
static void _ecore_wl_dnd_source_cb_send_free(void *data EINA_UNUSED, void *event);
|
||||
static 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)
|
|||
static void
|
||||
_ecore_wl_dnd_source_cb_target(void *data, struct wl_data_source *source EINA_UNUSED, const char *mime_type EINA_UNUSED)
|
||||
{
|
||||
Ecore_Wl_Event_Data_Source_Target *event;
|
||||
Ecore_Wl_Input *input;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
if (!(input = data)) return;
|
||||
|
||||
printf("Dnd Source Target\n");
|
||||
if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Data_Source_Target)))) return;
|
||||
|
||||
event->type = strdup(mime_type);
|
||||
|
||||
ecore_event_add(ECORE_WL_EVENT_DATA_SOURCE_TARGET, event,
|
||||
_ecore_wl_dnd_source_cb_target_free, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_wl_dnd_source_cb_target_free(void *data EINA_UNUSED, void *event)
|
||||
{
|
||||
Ecore_Wl_Event_Data_Source_Target *ev;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
if (!(ev = event)) return;
|
||||
|
||||
free(ev->type);
|
||||
free(ev);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue