diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h index 713ad9748f..e3e8b63000 100644 --- a/src/lib/ecore_evas/Ecore_Evas.h +++ b/src/lib/ecore_evas/Ecore_Evas.h @@ -3756,7 +3756,7 @@ EAPI Eina_Future* ecore_evas_selection_get(Ecore_Evas *ee, unsigned int seat, Ec * * Set this callback using ecore_evas_callback_drop_state_changed_set. */ -typedef void (*Ecore_Evas_Drag_Finished)(Ecore_Evas *ee, unsigned int seat, void *data, Eina_Bool accepted); +typedef void (*Ecore_Evas_Drag_Finished_Cb)(Ecore_Evas *ee, unsigned int seat, void *data, Eina_Bool accepted); /** * @brief Starts a new drag operation. @@ -3776,7 +3776,8 @@ typedef void (*Ecore_Evas_Drag_Finished)(Ecore_Evas *ee, unsigned int seat, void * * This method must be called when a drag operation is initiated in order to provide the necessary information. */ -EAPI Eina_Bool ecore_evas_drag_start(Ecore_Evas *ee, unsigned int seat, Eina_Content *content, Ecore_Evas *drag_rep, const char* action, Ecore_Evas_Drag_Finished terminate_cb, void *data); +EAPI Eina_Bool ecore_evas_drag_start(Ecore_Evas *ee, unsigned int seat, Eina_Content *content, Ecore_Evas *drag_rep, + const char* action, Ecore_Evas_Drag_Finished_Cb terminate_cb, void *data); /** * @brief Cancels an ongoing drag operation. @@ -3798,7 +3799,7 @@ EAPI Eina_Bool ecore_evas_drag_cancel(Ecore_Evas *ee, unsigned int seat); * * Set this callback using ecore_evas_callback_drop_state_changed_set. */ -typedef void (*Ecore_Evas_State_Changed)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, Eina_Bool inside); +typedef void (*Ecore_Evas_Drag_State_Changed_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, Eina_Bool inside); /** * @brief Sets the method (callback) to call when the mouse pointer enters or exits the specified window while @@ -3810,7 +3811,7 @@ typedef void (*Ecore_Evas_State_Changed)(Ecore_Evas *ee, unsigned int seat, Eina * Only one such callback can exist for each Ecore_Evas. Calling this method multiple * times overwrites previous functions. Use a NULL @cb func to stop being notified. */ -EAPI void ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_State_Changed cb); +EAPI void ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_Drag_State_Changed_Cb cb); /** * @brief This method is called when the mouse pointer moves over the specified window while @@ -3822,7 +3823,7 @@ EAPI void ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_ * Set this callback using ecore_evas_callback_drop_motion_set. */ -typedef void (*Ecore_Evas_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p); +typedef void (*Ecore_Evas_Drag_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p); /** * @brief Sets the method (callback) to call when the mouse pointer moves over the specified window while * performing a drag operation. @@ -3833,7 +3834,7 @@ typedef void (*Ecore_Evas_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Pos * Only one such callback can exist for each Ecore_Evas. Calling this method multiple * times overwrites previous functions. Use a NULL @cb func to stop being notified. */ -EAPI void ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Motion_Cb cb); +EAPI void ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Drag_Motion_Cb cb); /** * @brief This method is called when the mouse pointer is released over the specified window while @@ -3861,16 +3862,14 @@ typedef void (*Ecore_Evas_Drop_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Posit */ EAPI void ecore_evas_callback_drop_drop_set(Ecore_Evas *ee, Ecore_Evas_Drop_Cb cb); -// app calls this (from one of the motion cb's, for example) to know the type (and auto conversion) of the thing being dragged. -// This is the same as calling selection_get and retrieving the types from there (but faster). /** * @brief Retrieves the list of types the data currently being dragged can be automatically converted to. * * @param[in] ee The Ecore Evas the drag operation started on. * @return * - * This can be used in any of the drag and drop callbacks (Ecore_Evas_State_Changed, Ecore_Evas_Motion_Cb and - * Ecore_Evas_Drop_Cb) to check if the data being dragged is acceptable and give the user some early feedback + * This can be used in any of the drag and drop callbacks (Ecore_Evas_Drag_State_Changed_Cb, Ecore_Evas_Drag_Motion_Cb + * and Ecore_Evas_Drop_Cb) to check if the data being dragged is acceptable and give the user some early feedback * before the data is actually dropped on the window. * * This is functionally equivalent to calling ecore_evas_selection_get and examining the available types in the diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index a95f7903d8..ab28af1a2f 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -5641,7 +5641,7 @@ ecore_evas_selection_get(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection } EAPI Eina_Bool -ecore_evas_drag_start(Ecore_Evas *ee, unsigned int seat, Eina_Content *content, Ecore_Evas *drag_rep, const char* action, Ecore_Evas_Drag_Finished terminate_cb, void *data) +ecore_evas_drag_start(Ecore_Evas *ee, unsigned int seat, Eina_Content *content, Ecore_Evas *drag_rep, const char* action, Ecore_Evas_Drag_Finished_Cb terminate_cb, void *data) { EINA_SAFETY_ON_NULL_RETURN_VAL(ee, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(content, EINA_FALSE); @@ -5676,14 +5676,14 @@ ecore_evas_drag_cancel(Ecore_Evas *ee, unsigned int seat) } EAPI void -ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Motion_Cb cb) +ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Drag_Motion_Cb cb) { ECORE_EVAS_CHECK(ee); ee->func.fn_dnd_motion = cb; } EAPI void -ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_State_Changed cb) +ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_Drag_State_Changed_Cb cb) { ECORE_EVAS_CHECK(ee); ee->func.fn_dnd_state_change = cb; diff --git a/src/lib/ecore_evas/ecore_evas_fallback_selection.c b/src/lib/ecore_evas/ecore_evas_fallback_selection.c index 1088e617f7..b3f59c7921 100644 --- a/src/lib/ecore_evas/ecore_evas_fallback_selection.c +++ b/src/lib/ecore_evas/ecore_evas_fallback_selection.c @@ -26,7 +26,7 @@ fallback_selection_shutdown(Ecore_Evas *ee) } Eina_Bool -fallback_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel) +fallback_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel) { Ecore_Evas_Selection_Callbacks *callbacks = &data->callbacks[selection]; @@ -103,7 +103,7 @@ fallback_selection_request(Ecore_Evas *ee EINA_UNUSED, unsigned int seat, Ecore_ return eina_future_resolved(efl_loop_future_scheduler_get(efl_main_loop_get()), value); } Eina_Bool -fallback_dnd_start(Ecore_Evas *ee EINA_UNUSED, unsigned int seat EINA_UNUSED, Eina_Array *available_types EINA_UNUSED, Ecore_Evas *drag_rep EINA_UNUSED, Ecore_Evas_Internal_Delivery delivery EINA_UNUSED, Ecore_Evas_Internal_Cancel cancel EINA_UNUSED, const char* action EINA_UNUSED) +fallback_dnd_start(Ecore_Evas *ee EINA_UNUSED, unsigned int seat EINA_UNUSED, Eina_Array *available_types EINA_UNUSED, Ecore_Evas *drag_rep EINA_UNUSED, Ecore_Evas_Selection_Internal_Delivery delivery EINA_UNUSED, Ecore_Evas_Selection_Internal_Cancel cancel EINA_UNUSED, const char* action EINA_UNUSED) { return EINA_FALSE; } diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h index 10191b0152..6fb2c988b5 100644 --- a/src/lib/ecore_evas/ecore_evas_private.h +++ b/src/lib/ecore_evas/ecore_evas_private.h @@ -82,11 +82,11 @@ typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface; typedef struct _Ecore_Evas_Aux_Hint Ecore_Evas_Aux_Hint; typedef struct _Ecore_Evas_Cursor Ecore_Evas_Cursor; -typedef Eina_Bool (*Ecore_Evas_Internal_Delivery)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, const char *type, Eina_Rw_Slice *slice); -typedef void (*Ecore_Evas_Internal_Cancel)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer); +typedef Eina_Bool (*Ecore_Evas_Selection_Internal_Delivery)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, const char *type, Eina_Rw_Slice *slice); +typedef void (*Ecore_Evas_Selection_Internal_Cancel)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer); typedef struct { - Ecore_Evas_Internal_Delivery delivery; - Ecore_Evas_Internal_Cancel cancel; + Ecore_Evas_Selection_Internal_Delivery delivery; + Ecore_Evas_Selection_Internal_Cancel cancel; Eina_Array *available_types; } Ecore_Evas_Selection_Callbacks; /* Engines interfaces */ @@ -183,10 +183,10 @@ struct _Ecore_Evas_Engine_Func double (*fn_last_tick_get)(Ecore_Evas *ee); - Eina_Bool (*fn_selection_claim)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel); + Eina_Bool (*fn_selection_claim)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel); Eina_Bool (*fn_selection_has_owner)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection); Eina_Future* (*fn_selection_request)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *acceptable_types); // a future containing a Eina_Content, type must be in acceptable_types - Eina_Bool (*fn_dnd_start)(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel, const char *action); + Eina_Bool (*fn_dnd_start)(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel, const char *action); Eina_Bool (*fn_dnd_stop)(Ecore_Evas *ee, unsigned int seat); }; @@ -385,7 +385,7 @@ struct _Ecore_Evas struct { Ecore_Evas *rep; void *data; - Ecore_Evas_Drag_Finished free; + Ecore_Evas_Drag_Finished_Cb free; Eina_Bool accepted; } drag; @@ -531,10 +531,10 @@ EAPI Eina_Position2D ecore_evas_dnd_pos_get(Ecore_Evas *ee, unsigned int seat); void fallback_selection_init(Ecore_Evas *ee); void fallback_selection_shutdown(Ecore_Evas *ee); -Eina_Bool fallback_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel); +Eina_Bool fallback_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel); Eina_Bool fallback_selection_has_owner(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection); Eina_Future* fallback_selection_request(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *acceptable_type); -Eina_Bool fallback_dnd_start(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel, const char* action); +Eina_Bool fallback_dnd_start(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel, const char* action); Eina_Bool fallback_dnd_stop(Ecore_Evas *ee, unsigned int seat); #ifdef IPA_YLNO_ESU_LANRETNI_MLE diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c index 3352efb135..c8e2895358 100644 --- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c +++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c @@ -458,7 +458,7 @@ end: } static Eina_Bool -_ecore_evas_cocoa_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel) +_ecore_evas_cocoa_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel) { if (selection != ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER) return EINA_FALSE; diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index d5cb3d8b49..b2bf7c75ec 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -2421,7 +2421,7 @@ _clear_selection(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer } static void -_store_selection_cbs(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel) +_store_selection_cbs(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel) { Ecore_Evas_Wl_Selection_Data *sdata; Ecore_Evas_Engine_Wl_Data *edata; @@ -2449,7 +2449,7 @@ _fetch_input(Ecore_Evas *ee, unsigned int seat) } static Eina_Bool -_ecore_evas_wl_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel) +_ecore_evas_wl_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel) { Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data; Ecore_Evas_Wl_Selection_Data *data = &wdata->selection_data[selection]; @@ -2822,7 +2822,7 @@ _ecore_evas_wl_selection_init(Ecore_Evas *ee) } static Eina_Bool -_ecore_evas_wl_dnd_start(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel, const char *action EINA_UNUSED) +_ecore_evas_wl_dnd_start(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel, const char *action EINA_UNUSED) { Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data; const char *tmp_array[eina_array_count(available_types) + 1]; diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c index d0686c535c..7f6eb98e48 100644 --- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c +++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c @@ -1232,7 +1232,7 @@ end: } static Eina_Bool -_ecore_evas_win32_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel) +_ecore_evas_win32_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel) { if (selection != ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER) return EINA_FALSE; diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c index 36afeb5495..11719ee1b1 100644 --- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c +++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c @@ -4281,7 +4281,7 @@ _store_selection_cbs(Ecore_Evas *ee, Ecore_Evas_Selection_Buffer selection, Eina } static Eina_Bool -_ecore_evas_x_selection_claim(Ecore_Evas *ee, unsigned int seat EINA_UNUSED, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Internal_Delivery delivery, Ecore_Evas_Internal_Cancel cancel) +_ecore_evas_x_selection_claim(Ecore_Evas *ee, unsigned int seat EINA_UNUSED, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel) { Ecore_Evas_X11_Selection_Data *sdata; Ecore_Evas_Engine_Data_X11 *edata;