summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
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-08 11:01:24 +0100
commit7a79e15ea3c808b92482dbdecb294c6cf3212f91 (patch)
tree25a2ae36b47829bdd0d6062ff129f701b77cccec /src/lib/ecore_evas
parent8b25bc41b33cf366ef068b04cc3de55b76310891 (diff)
ecore_evas: Use EFL naming convention in cnp & dnd methods
Some methods were missing the "Drag" or "Selection" namespaces or the _Cb suffix. Depends on D11219 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11426
Diffstat (limited to 'src/lib/ecore_evas')
-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_fallback_selection.c4
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h18
4 files changed, 23 insertions, 24 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_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)
26} 26}
27 27
28Eina_Bool 28Eina_Bool
29fallback_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) 29fallback_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)
30{ 30{
31 Ecore_Evas_Selection_Callbacks *callbacks = &data->callbacks[selection]; 31 Ecore_Evas_Selection_Callbacks *callbacks = &data->callbacks[selection];
32 32
@@ -103,7 +103,7 @@ fallback_selection_request(Ecore_Evas *ee EINA_UNUSED, unsigned int seat, Ecore_
103 return eina_future_resolved(efl_loop_future_scheduler_get(efl_main_loop_get()), value); 103 return eina_future_resolved(efl_loop_future_scheduler_get(efl_main_loop_get()), value);
104} 104}
105Eina_Bool 105Eina_Bool
106fallback_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) 106fallback_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)
107{ 107{
108 return EINA_FALSE; 108 return EINA_FALSE;
109} 109}
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;
82typedef struct _Ecore_Evas_Aux_Hint Ecore_Evas_Aux_Hint; 82typedef struct _Ecore_Evas_Aux_Hint Ecore_Evas_Aux_Hint;
83typedef struct _Ecore_Evas_Cursor Ecore_Evas_Cursor; 83typedef struct _Ecore_Evas_Cursor Ecore_Evas_Cursor;
84 84
85typedef Eina_Bool (*Ecore_Evas_Internal_Delivery)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, const char *type, Eina_Rw_Slice *slice); 85typedef 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);
86typedef void (*Ecore_Evas_Internal_Cancel)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer); 86typedef void (*Ecore_Evas_Selection_Internal_Cancel)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer);
87typedef struct { 87typedef struct {
88 Ecore_Evas_Internal_Delivery delivery; 88 Ecore_Evas_Selection_Internal_Delivery delivery;
89 Ecore_Evas_Internal_Cancel cancel; 89 Ecore_Evas_Selection_Internal_Cancel cancel;
90 Eina_Array *available_types; 90 Eina_Array *available_types;
91} Ecore_Evas_Selection_Callbacks; 91} Ecore_Evas_Selection_Callbacks;
92/* Engines interfaces */ 92/* Engines interfaces */
@@ -183,10 +183,10 @@ struct _Ecore_Evas_Engine_Func
183 183
184 double (*fn_last_tick_get)(Ecore_Evas *ee); 184 double (*fn_last_tick_get)(Ecore_Evas *ee);
185 185
186 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); 186 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);
187 Eina_Bool (*fn_selection_has_owner)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection); 187 Eina_Bool (*fn_selection_has_owner)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection);
188 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 188 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
189 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); 189 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);
190 Eina_Bool (*fn_dnd_stop)(Ecore_Evas *ee, unsigned int seat); 190 Eina_Bool (*fn_dnd_stop)(Ecore_Evas *ee, unsigned int seat);
191}; 191};
192 192
@@ -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
@@ -531,10 +531,10 @@ EAPI Eina_Position2D ecore_evas_dnd_pos_get(Ecore_Evas *ee, unsigned int seat);
531 531
532void fallback_selection_init(Ecore_Evas *ee); 532void fallback_selection_init(Ecore_Evas *ee);
533void fallback_selection_shutdown(Ecore_Evas *ee); 533void fallback_selection_shutdown(Ecore_Evas *ee);
534Eina_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); 534Eina_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);
535Eina_Bool fallback_selection_has_owner(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection); 535Eina_Bool fallback_selection_has_owner(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection);
536Eina_Future* fallback_selection_request(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *acceptable_type); 536Eina_Future* fallback_selection_request(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *acceptable_type);
537Eina_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); 537Eina_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);
538Eina_Bool fallback_dnd_stop(Ecore_Evas *ee, unsigned int seat); 538Eina_Bool fallback_dnd_stop(Ecore_Evas *ee, unsigned int seat);
539 539
540#ifdef IPA_YLNO_ESU_LANRETNI_MLE 540#ifdef IPA_YLNO_ESU_LANRETNI_MLE