summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2020-03-03 13:10:49 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-04 17:26:30 +0100
commit54b2ddd88ec8f61234a37bdd82fb990f9090aded (patch)
treee7c1718aea0a704f3d88f893c0a23f1dee6adbb2
parent8cdc8e9c8fe4e018e7a63b49671a398e67725bc9 (diff)
ecore_evas: Use EFL naming convention in cnp & dnd methodsdevs/bu5hm4n/work_cnp
Some methods were missing the Drag namespace or the _Cb suffix. Depends on D11219 Differential Revision: https://phab.enlightenment.org/D11426
-rw-r--r--src/lib/ecore_evas/Ecore_Evas.h19
-rw-r--r--src/lib/ecore_evas/ecore_evas.c6
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h2
3 files changed, 13 insertions, 14 deletions
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
3756 * 3756 *
3757 * Set this callback using ecore_evas_callback_drop_state_changed_set. 3757 * Set this callback using ecore_evas_callback_drop_state_changed_set.
3758 */ 3758 */
3759typedef void (*Ecore_Evas_Drag_Finished)(Ecore_Evas *ee, unsigned int seat, void *data, Eina_Bool accepted); 3759typedef void (*Ecore_Evas_Drag_Finished_Cb)(Ecore_Evas *ee, unsigned int seat, void *data, Eina_Bool accepted);
3760 3760
3761/** 3761/**
3762 * @brief Starts a new drag operation. 3762 * @brief Starts a new drag operation.
@@ -3776,7 +3776,8 @@ typedef void (*Ecore_Evas_Drag_Finished)(Ecore_Evas *ee, unsigned int seat, void
3776 * 3776 *
3777 * This method must be called when a drag operation is initiated in order to provide the necessary information. 3777 * This method must be called when a drag operation is initiated in order to provide the necessary information.
3778 */ 3778 */
3779EAPI 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); 3779EAPI Eina_Bool ecore_evas_drag_start(Ecore_Evas *ee, unsigned int seat, Eina_Content *content, Ecore_Evas *drag_rep,
3780 const char* action, Ecore_Evas_Drag_Finished_Cb terminate_cb, void *data);
3780 3781
3781/** 3782/**
3782 * @brief Cancels an ongoing drag operation. 3783 * @brief Cancels an ongoing drag operation.
@@ -3798,7 +3799,7 @@ EAPI Eina_Bool ecore_evas_drag_cancel(Ecore_Evas *ee, unsigned int seat);
3798 * 3799 *
3799 * Set this callback using ecore_evas_callback_drop_state_changed_set. 3800 * Set this callback using ecore_evas_callback_drop_state_changed_set.
3800 */ 3801 */
3801typedef void (*Ecore_Evas_State_Changed)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, Eina_Bool inside); 3802typedef void (*Ecore_Evas_Drag_State_Changed_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, Eina_Bool inside);
3802 3803
3803/** 3804/**
3804 * @brief Sets the method (callback) to call when the mouse pointer enters or exits the specified window while 3805 * @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
3810 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple 3811 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple
3811 * times overwrites previous functions. Use a NULL @cb func to stop being notified. 3812 * times overwrites previous functions. Use a NULL @cb func to stop being notified.
3812 */ 3813 */
3813EAPI void ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_State_Changed cb); 3814EAPI void ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_Drag_State_Changed_Cb cb);
3814 3815
3815/** 3816/**
3816 * @brief This method is called when the mouse pointer moves over the specified window while 3817 * @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_
3822 * Set this callback using ecore_evas_callback_drop_motion_set. 3823 * Set this callback using ecore_evas_callback_drop_motion_set.
3823 */ 3824 */
3824 3825
3825typedef void (*Ecore_Evas_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p); 3826typedef void (*Ecore_Evas_Drag_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p);
3826/** 3827/**
3827 * @brief Sets the method (callback) to call when the mouse pointer moves over the specified window while 3828 * @brief Sets the method (callback) to call when the mouse pointer moves over the specified window while
3828 * performing a drag operation. 3829 * performing a drag operation.
@@ -3833,7 +3834,7 @@ typedef void (*Ecore_Evas_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Pos
3833 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple 3834 * Only one such callback can exist for each Ecore_Evas. Calling this method multiple
3834 * times overwrites previous functions. Use a NULL @cb func to stop being notified. 3835 * times overwrites previous functions. Use a NULL @cb func to stop being notified.
3835 */ 3836 */
3836EAPI void ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Motion_Cb cb); 3837EAPI void ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Drag_Motion_Cb cb);
3837 3838
3838/** 3839/**
3839 * @brief This method is called when the mouse pointer is released over the specified window while 3840 * @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
3861 */ 3862 */
3862EAPI void ecore_evas_callback_drop_drop_set(Ecore_Evas *ee, Ecore_Evas_Drop_Cb cb); 3863EAPI void ecore_evas_callback_drop_drop_set(Ecore_Evas *ee, Ecore_Evas_Drop_Cb cb);
3863 3864
3864// app calls this (from one of the motion cb's, for example) to know the type (and auto conversion) of the thing being dragged.
3865// This is the same as calling selection_get and retrieving the types from there (but faster).
3866/** 3865/**
3867 * @brief Retrieves the list of types the data currently being dragged can be automatically converted to. 3866 * @brief Retrieves the list of types the data currently being dragged can be automatically converted to.
3868 * 3867 *
3869 * @param[in] ee The Ecore Evas the drag operation started on. 3868 * @param[in] ee The Ecore Evas the drag operation started on.
3870 * @return 3869 * @return
3871 * 3870 *
3872 * This can be used in any of the drag and drop callbacks (Ecore_Evas_State_Changed, Ecore_Evas_Motion_Cb and 3871 * This can be used in any of the drag and drop callbacks (Ecore_Evas_Drag_State_Changed_Cb, Ecore_Evas_Drag_Motion_Cb
3873 * Ecore_Evas_Drop_Cb) to check if the data being dragged is acceptable and give the user some early feedback 3872 * and Ecore_Evas_Drop_Cb) to check if the data being dragged is acceptable and give the user some early feedback
3874 * before the data is actually dropped on the window. 3873 * before the data is actually dropped on the window.
3875 * 3874 *
3876 * This is functionally equivalent to calling ecore_evas_selection_get and examining the available types in the 3875 * 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
5641} 5641}
5642 5642
5643EAPI Eina_Bool 5643EAPI Eina_Bool
5644ecore_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) 5644ecore_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)
5645{ 5645{
5646 EINA_SAFETY_ON_NULL_RETURN_VAL(ee, EINA_FALSE); 5646 EINA_SAFETY_ON_NULL_RETURN_VAL(ee, EINA_FALSE);
5647 EINA_SAFETY_ON_NULL_RETURN_VAL(content, EINA_FALSE); 5647 EINA_SAFETY_ON_NULL_RETURN_VAL(content, EINA_FALSE);
@@ -5676,14 +5676,14 @@ ecore_evas_drag_cancel(Ecore_Evas *ee, unsigned int seat)
5676} 5676}
5677 5677
5678EAPI void 5678EAPI void
5679ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Motion_Cb cb) 5679ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Drag_Motion_Cb cb)
5680{ 5680{
5681 ECORE_EVAS_CHECK(ee); 5681 ECORE_EVAS_CHECK(ee);
5682 ee->func.fn_dnd_motion = cb; 5682 ee->func.fn_dnd_motion = cb;
5683} 5683}
5684 5684
5685EAPI void 5685EAPI void
5686ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_State_Changed cb) 5686ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_Drag_State_Changed_Cb cb)
5687{ 5687{
5688 ECORE_EVAS_CHECK(ee); 5688 ECORE_EVAS_CHECK(ee);
5689 ee->func.fn_dnd_state_change = cb; 5689 ee->func.fn_dnd_state_change = cb;
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 10191b0152..c305c39915 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -385,7 +385,7 @@ struct _Ecore_Evas
385 struct { 385 struct {
386 Ecore_Evas *rep; 386 Ecore_Evas *rep;
387 void *data; 387 void *data;
388 Ecore_Evas_Drag_Finished free; 388 Ecore_Evas_Drag_Finished_Cb free;
389 Eina_Bool accepted; 389 Eina_Bool accepted;
390 } drag; 390 } drag;
391 391