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)
downloadefl-devs/bu5hm4n/work_cnp.tar.gz
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
*
* 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_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
struct {
Ecore_Evas *rep;
void *data;
- Ecore_Evas_Drag_Finished free;
+ Ecore_Evas_Drag_Finished_Cb free;
Eina_Bool accepted;
} drag;