Data Structures | Macros | Typedefs | Functions | Variables
CopyPaste

Copy and paste feature implementations. More...

Data Structures

struct  _Elm_Selection_Data
 Structure holding the info about selected data. More...
 
struct  Elm_Cnp_Event_Selection_Changed
 Event to notify when a display server's selection has changed Only sent for PRIMARY and CLIPBOARD selections. More...
 
struct  _Elm_Drag_User_Info
 

Macros

#define ELM_SEL_TYPE_PRIMARY   EFL_SELECTION_TYPE_PRIMARY
 
#define ELM_SEL_TYPE_SECONDARY   EFL_SELECTION_TYPE_SECONDARY
 
#define ELM_SEL_TYPE_XDND   EFL_SELECTION_TYPE_DND
 
#define ELM_SEL_TYPE_CLIPBOARD   EFL_SELECTION_TYPE_CLIPBOARD
 
#define ELM_SEL_FORMAT_TARGETS   EFL_SELECTION_FORMAT_TARGETS
 
#define ELM_SEL_FORMAT_NONE   EFL_SELECTION_FORMAT_NONE
 
#define ELM_SEL_FORMAT_TEXT   EFL_SELECTION_FORMAT_TEXT
 
#define ELM_SEL_FORMAT_MARKUP   EFL_SELECTION_FORMAT_MARKUP
 
#define ELM_SEL_FORMAT_IMAGE   EFL_SELECTION_FORMAT_IMAGE
 
#define ELM_SEL_FORMAT_VCARD   EFL_SELECTION_FORMAT_VCARD
 
#define ELM_SEL_FORMAT_HTML   EFL_SELECTION_FORMAT_HTML
 
#define ELM_XDND_ACTION_UNKNOWN   EFL_SELECTION_ACTION_UNKNOWN
 
#define ELM_XDND_ACTION_COPY   EFL_SELECTION_ACTION_COPY
 
#define ELM_XDND_ACTION_MOVE   EFL_SELECTION_ACTION_MOVE
 
#define ELM_XDND_ACTION_PRIVATE   EFL_SELECTION_ACTION_PRIVATE
 
#define ELM_XDND_ACTION_ASK   EFL_SELECTION_ACTION_ASK
 
#define ELM_XDND_ACTION_LIST   EFL_SELECTION_ACTION_LIST
 
#define ELM_XDND_ACTION_LINK   EFL_SELECTION_ACTION_LINK
 
#define ELM_XDND_ACTION_DESCRIPTION   EFL_SELECTION_ACTION_DESCRIPTION
 

Typedefs

typedef Efl_Selection_Type Elm_Sel_Type
 Defines the types of selection property names. More...
 
typedef Efl_Selection_Format Elm_Sel_Format
 Defines the types of content.
 
typedef Efl_Selection_Action Elm_Xdnd_Action
 Defines the kind of action associated with the drop data if for XDND. More...
 
typedef struct _Elm_Selection_Data Elm_Selection_Data
 
typedef struct Elm_Cnp_Event_Selection_Changed Elm_Cnp_Event_Selection_Changed
 Event to notify when a display server's selection has changed Only sent for PRIMARY and CLIPBOARD selections. More...
 
typedef Eina_Bool(* Elm_Drop_Cb) (void *data, Evas_Object *obj, Elm_Selection_Data *ev)
 Callback invoked in when the selected data is 'dropped' at its destination. More...
 
typedef Elm_Object_Item *(* Elm_Xy_Item_Get_Cb) (Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int *yposret)
 Callback invoked to find out what object is under (x,y) coords. More...
 
typedef void(* Elm_Selection_Loss_Cb) (void *data, Elm_Sel_Type selection)
 Callback invoked in when the selection ownership for a given selection is lost. More...
 
typedef Evas_Object *(* Elm_Drag_Icon_Create_Cb) (void *data, Evas_Object *win, Evas_Coord *xoff, Evas_Coord *yoff)
 Callback called to create a drag icon object. More...
 
typedef void(* Elm_Drag_State) (void *data, Evas_Object *obj)
 Callback called when a drag is finished, enters, or leaves an object. More...
 
typedef void(* Elm_Drag_Done) (void *data, Evas_Object *obj, Eina_Bool accepted)
 Callback called when a drag is finished. More...
 
typedef void(* Elm_Drag_Accept) (void *data, Evas_Object *obj, Eina_Bool doaccept)
 Callback called when a drag is responded to with an accept or deny. More...
 
typedef void(* Elm_Drag_Pos) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action)
 Callback called when a drag is over an object, and gives object-relative coordinates. More...
 
typedef void(* Elm_Drag_Start) (void *data, Evas_Object *obj)
 Callback called when a drag starts from an item container. More...
 
typedef void(* Elm_Drag_Item_Container_Pos) (void *data, Evas_Object *cont, Elm_Object_Item *it, Evas_Coord x, Evas_Coord y, int xposret, int yposret, Elm_Xdnd_Action action)
 Callback called when a drag is over an object. More...
 
typedef Eina_Bool(* Elm_Drop_Item_Container_Cb) (void *data, Evas_Object *obj, Elm_Object_Item *it, Elm_Selection_Data *ev, int xposret, int yposret)
 Callback invoked in when the selected data is 'dropped' on container. More...
 
typedef struct _Elm_Drag_User_Info Elm_Drag_User_Info
 Structure describing user information for the drag process. More...
 
typedef Eina_Bool(* Elm_Item_Container_Data_Get_Cb) (Evas_Object *obj, Elm_Object_Item *it, Elm_Drag_User_Info *info)
 Callback invoked when starting to drag for a container. More...
 

Functions

Eina_Bool elm_cnp_selection_set (Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, const void *buf, size_t buflen)
 Set copy data for a widget. More...
 
Eina_Bool elm_cnp_selection_get (const Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata)
 Get data from a widget that has a selection. More...
 
Eina_Bool elm_object_cnp_selection_clear (Evas_Object *obj, Elm_Sel_Type selection)
 Clear the selection data of a widget. More...
 
void elm_cnp_selection_loss_callback_set (Evas_Object *obj, Elm_Sel_Type selection, Elm_Selection_Loss_Cb func, const void *data)
 Set a function to be called when a selection is lost. More...
 
Eina_Bool elm_cnp_clipboard_selection_has_owner (Evas_Object *win)
 Determine whether the clipboard selection has an owner. More...
 
Eina_Bool elm_drop_target_add (Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State entercb, void *enterdata, Elm_Drag_State leavecb, void *leavedata, Elm_Drag_Pos poscb, void *posdata, Elm_Drop_Cb dropcb, void *dropdata)
 Set the given object as a target for drops for drag-and-drop. More...
 
Eina_Bool elm_drop_target_del (Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State entercb, void *enterdata, Elm_Drag_State leavecb, void *leavedata, Elm_Drag_Pos poscb, void *posdata, Elm_Drop_Cb dropcb, void *dropdata)
 Deletes the drop target status of an object. More...
 
Eina_Bool elm_drag_start (Evas_Object *obj, Elm_Sel_Format format, const char *data, Elm_Xdnd_Action action, Elm_Drag_Icon_Create_Cb createicon, void *createdata, Elm_Drag_Pos dragpos, void *dragdata, Elm_Drag_Accept acceptcb, void *acceptdata, Elm_Drag_State dragdone, void *donecbdata)
 Begins a drag given a source object. More...
 
Eina_Bool elm_drag_cancel (Evas_Object *obj)
 Cancels the current drag operation. More...
 
Eina_Bool elm_drag_action_set (Evas_Object *obj, Elm_Xdnd_Action action)
 Changes the current drag action. More...
 
Eina_Bool elm_drag_item_container_add (Evas_Object *obj, double tm_to_anim, double tm_to_drag, Elm_Xy_Item_Get_Cb itemgetcb, Elm_Item_Container_Data_Get_Cb data_get)
 Set a item container (list, genlist, grid) as source of drag. More...
 
Eina_Bool elm_drag_item_container_del (Evas_Object *obj)
 Deletes a item container from drag-source list. More...
 
Eina_Bool elm_drop_item_container_add (Evas_Object *obj, Elm_Sel_Format format, Elm_Xy_Item_Get_Cb itemgetcb, Elm_Drag_State entercb, void *enterdata, Elm_Drag_State leavecb, void *leavedata, Elm_Drag_Item_Container_Pos poscb, void *posdata, Elm_Drop_Item_Container_Cb dropcb, void *dropdata)
 Set a item container (list, genlist, grid) as target for drop. More...
 
Eina_Bool elm_drop_item_container_del (Evas_Object *obj)
 Removes a container from list of drop targets. More...
 

Variables

int ELM_CNP_EVENT_SELECTION_CHANGED
 Event notifying that the selection has changed. More...
 

Detailed Description

Copy and paste feature implementations.

Implements the following functionality a. select, copy/cut and paste b. clipboard c. drag and drop in order to share data across application windows.

Contains functions to select text or a portion of data, send it to a buffer, and paste the data into a target.

elm_cnp provides a generic copy and paste facility based on its windowing system. It is not necessary to know the details of each windowing system, but some terms and behavior are common. Currently the X11 window system is widely used, and only X11 functionality is implemented.

In X11R6 window system, CopyPaste works like a peer-to-peer communication. Copying is an operation on an object in an X server. X11 calls those objects 'selections' which have names. Generally, two selection types are needed for copy and paste: The Primary selection and the Clipboard selection. Primary selection is for selecting text (that means highlighted text). Clipboard selection is for explicit copying behavior (such as ctrl+c, or 'copy' in a menu). Thus, in applications most cases only use the clipboard selection. As stated before, taking ownership of a selection doesn't move any actual data. Copying and Pasting is described as follows:

  1. Copy text in Program A : Program A takes ownership of the selection
  2. Paste text in Program B : Program B notes that Program A owns the selection
  3. Program B asks A for the text
  4. Program A responds and sends the text to program B
  5. Program B pastes the response More information is on

TODO: add for other window system.

Typedef Documentation

◆ Elm_Sel_Type

typedef Efl_Selection_Type Elm_Sel_Type

Defines the types of selection property names.

See also
http://www.x.org/docs/X11/xlib.pdf for more details.

◆ Elm_Xdnd_Action

typedef Efl_Selection_Action Elm_Xdnd_Action

Defines the kind of action associated with the drop data if for XDND.

Since
1.8

◆ Elm_Cnp_Event_Selection_Changed

Event to notify when a display server's selection has changed Only sent for PRIMARY and CLIPBOARD selections.

Since
1.20

◆ Elm_Drop_Cb

typedef Eina_Bool(* Elm_Drop_Cb) (void *data, Evas_Object *obj, Elm_Selection_Data *ev)

Callback invoked in when the selected data is 'dropped' at its destination.

Parameters
dataApplication specific data
objThe evas object where selected data is 'dropped'.
evstruct holding information about selected data FIXME: this should probably be a smart callback

◆ Elm_Xy_Item_Get_Cb

typedef Elm_Object_Item*(* Elm_Xy_Item_Get_Cb) (Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int *yposret)

Callback invoked to find out what object is under (x,y) coords.

Parameters
objThe container object
xcord to check
ycord to check
xposretPosition relative to item (left (-1), middle (0), right (1)
yposretPosition relative to item (upper (-1), middle (0), bottom (1)
Returns
object under x,y cords or NULL if not found.

◆ Elm_Selection_Loss_Cb

typedef void(* Elm_Selection_Loss_Cb) (void *data, Elm_Sel_Type selection)

Callback invoked in when the selection ownership for a given selection is lost.

Parameters
dataApplication specific data
selectionThe selection that is lost
Since
1.7

◆ Elm_Drag_Icon_Create_Cb

typedef Evas_Object*(* Elm_Drag_Icon_Create_Cb) (void *data, Evas_Object *win, Evas_Coord *xoff, Evas_Coord *yoff)

Callback called to create a drag icon object.

Parameters
dataApplication specific data
winThe window to create the objects relative to
xoffA return coordinate for the X offset at which to place the drag icon object relative to the source drag object
yoffA return coordinate for the Y offset at which to place the drag icon object relative to the source drag object
Returns
An object to fill the drag window with or NULL if not needed
Since
1.8

◆ Elm_Drag_State

typedef void(* Elm_Drag_State) (void *data, Evas_Object *obj)

Callback called when a drag is finished, enters, or leaves an object.

Parameters
dataApplication specific data
objThe object where the drag started
Since
1.8

◆ Elm_Drag_Done

typedef void(* Elm_Drag_Done) (void *data, Evas_Object *obj, Eina_Bool accepted)

Callback called when a drag is finished.

Parameters
dataApplication specific data
objThe object where the drag started
acceptedTRUE if the droppped-data is accepted on drop
Since
1.8

◆ Elm_Drag_Accept

typedef void(* Elm_Drag_Accept) (void *data, Evas_Object *obj, Eina_Bool doaccept)

Callback called when a drag is responded to with an accept or deny.

Parameters
dataApplication specific data
objThe object where the drag started
doacceptA boolean as to if the target accepts the drag or not
Since
1.8

◆ Elm_Drag_Pos

typedef void(* Elm_Drag_Pos) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y, Elm_Xdnd_Action action)

Callback called when a drag is over an object, and gives object-relative coordinates.

Parameters
dataApplication specific data
objThe object where the drag started
xThe X coordinate relative to the top-left of the object
yThe Y coordinate relative to the top-left of the object
Since
1.8

◆ Elm_Drag_Start

typedef void(* Elm_Drag_Start) (void *data, Evas_Object *obj)

Callback called when a drag starts from an item container.

Parameters
dataApplication specific data
objThe object where the drag started
Since
1.8

◆ Elm_Drag_Item_Container_Pos

typedef void(* Elm_Drag_Item_Container_Pos) (void *data, Evas_Object *cont, Elm_Object_Item *it, Evas_Coord x, Evas_Coord y, int xposret, int yposret, Elm_Xdnd_Action action)

Callback called when a drag is over an object.

Parameters
dataApplication specific data
contThe container object where the drag started
itThe object item in container where mouse-over
xThe X coordinate relative to the top-left of the object
yThe Y coordinate relative to the top-left of the object
xposretPosition relative to item (left (-1), middle (0), right (1)
yposretPosition relative to item (upper (-1), middle (0), bottom (1)
actionThe drag action to be done
Since
1.8

◆ Elm_Drop_Item_Container_Cb

typedef Eina_Bool(* Elm_Drop_Item_Container_Cb) (void *data, Evas_Object *obj, Elm_Object_Item *it, Elm_Selection_Data *ev, int xposret, int yposret)

Callback invoked in when the selected data is 'dropped' on container.

Parameters
dataApplication specific data
objThe evas object where selected data is 'dropped'.
itThe item in container where drop-cords
evstruct holding information about selected data
xposretPosition relative to item (left (-1), middle (0), right (1)
yposretPosition relative to item (upper (-1), middle (0), bottom (1)

◆ Elm_Drag_User_Info

Structure describing user information for the drag process.

Parameters
formatThe drag formats supported by the data (output)
dataThe drag data itself (a string) (output)
iconsif value not NULL, play default anim (output)
actionThe drag action to be done (output)
createiconFunction to call to create a drag object, or NULL if not wanted (output)
createdataApplication data passed to createicon (output)
dragposFunction called with each position of the drag, x, y being screen coordinates if possible, and action being the current action. (output)
dragdataApplication data passed to dragpos (output)
acceptcbFunction called indicating if drop target accepts (or does not) the drop data while dragging (output)
acceptdataApplication data passed to acceptcb (output)
dragdoneFunction to call when drag is done (output)
donecbdataApplication data to pass to dragdone (output)

◆ Elm_Item_Container_Data_Get_Cb

typedef Eina_Bool(* Elm_Item_Container_Data_Get_Cb) (Evas_Object *obj, Elm_Object_Item *it, Elm_Drag_User_Info *info)

Callback invoked when starting to drag for a container.

Parameters
objThe container object
itThe Elm_Object_Item pointer where drag-start
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.

Function Documentation

◆ elm_cnp_selection_set()

Eina_Bool elm_cnp_selection_set ( Evas_Object obj,
Elm_Sel_Type  selection,
Elm_Sel_Format  format,
const void *  buf,
size_t  buflen 
)

Set copy data for a widget.

Set copy data and take ownership of selection. Format is used for specifying the selection type, and this is used during pasting.

Parameters
selectionSelection type for copying and pasting
objThe source widget pointer
formatSelection format
bufThe data selected
buflenThe size of buf
Returns
If EINA_TRUE, setting data was successful.

References EINA_FALSE, eina_future_then_easy, EINA_TRUE, EINA_VALUE_TYPE_UINT, _Eina_Slice::len, and _Eina_Slice::mem.

Referenced by elm_code_widget_selection_copy(), and elm_code_widget_selection_cut().

◆ elm_cnp_selection_get()

Eina_Bool elm_cnp_selection_get ( const Evas_Object obj,
Elm_Sel_Type  selection,
Elm_Sel_Format  format,
Elm_Drop_Cb  datacb,
void *  udata 
)

Get data from a widget that has a selection.

Get the current selection data from a widget. The widget input here will usually be elm_entry, in which case datacb and udata can be NULL. If a different widget is passed, datacb and udata are used for retrieving data.

See also
also elm_cnp_selection_set()
Parameters
selectionSelection type for copying and pasting
formatSelection format
objThe source widget
datacbThe user data callback if the target widget isn't elm_entry
udataThe user data pointer for datacb
Returns
If EINA_TRUE, getting selection data was successful.

References EINA_FALSE, and EINA_TRUE.

Referenced by elm_code_widget_selection_paste().

◆ elm_object_cnp_selection_clear()

Eina_Bool elm_object_cnp_selection_clear ( Evas_Object obj,
Elm_Sel_Type  selection 
)

Clear the selection data of a widget.

Clear all data from the selection which is owned by a widget.

See also
also elm_cnp_selection_set()
Parameters
objThe source widget
selectionSelection type for copying and pasting
Returns
If EINA_TRUE, clearing data was successful.

References EINA_TRUE.

◆ elm_cnp_selection_loss_callback_set()

void elm_cnp_selection_loss_callback_set ( Evas_Object obj,
Elm_Sel_Type  selection,
Elm_Selection_Loss_Cb  func,
const void *  data 
)

Set a function to be called when a selection is lost.

The function func is set of be called when selection selection is lost to another process or when elm_cnp_selection_set() is called. If func is NULL then it is not called. data is passed as the data parameter to the callback functions and selection is passed in as the selection that has been lost.

elm_cnp_selection_set() and elm_object_cnp_selection_clear() automatically set this los callback to NULL when called. If you wish to take the selection and then be notified of loss please do this (for example):

elm_cnp_selection_set(obj, ELM_SEL_TYPE_PRIMARY, ELM_SEL_FORMAT_TEXT, "hello", strlen(hello));
elm_cnp_selection_loss_callback_set(obj, ELM_SEL_TYPE_PRIMARY, loss_cb, NULL);
See also
also elm_cnp_selection_set()
Parameters
objThe object to indicate the window target/display system.
selectionSelection to be notified of for loss
funcThe function to call
dataThe data pointer passed to the function.
Since
1.7

References eina_list_append().

◆ elm_cnp_clipboard_selection_has_owner()

Eina_Bool elm_cnp_clipboard_selection_has_owner ( Evas_Object win)

Determine whether the clipboard selection has an owner.

Parameters
winThe window object to check for
Returns
EINA_TRUE if the clipboard has a selection
Since
1.20

◆ elm_drop_target_add()

Eina_Bool elm_drop_target_add ( Evas_Object obj,
Elm_Sel_Format  format,
Elm_Drag_State  entercb,
void *  enterdata,
Elm_Drag_State  leavecb,
void *  leavedata,
Elm_Drag_Pos  poscb,
void *  posdata,
Elm_Drop_Cb  dropcb,
void *  dropdata 
)

Set the given object as a target for drops for drag-and-drop.

Parameters
objThe target object
formatThe formats supported for dropping
entercbThe function to call when the object is entered with a drag
enterdataThe application data to pass to enterdata
leavecbThe function to call when the object is left with a drag
leavedataThe application data to pass to leavedata
poscbThe function to call when the object has a drag over it
posdataThe application data to pass to posdata
dropcbThe function to call when a drop has occurred
dropdataThe application data to pass to dropcb
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References efl_event_callback_add, efl_key_data_get(), efl_key_data_set(), EINA_FALSE, eina_list_append(), EINA_TRUE, EVAS_CALLBACK_DEL, and evas_object_event_callback_add().

Referenced by elm_entry_entry_get(), and elm_thumb_ethumb_client_connected_get().

◆ elm_drop_target_del()

Eina_Bool elm_drop_target_del ( Evas_Object obj,
Elm_Sel_Format  format,
Elm_Drag_State  entercb,
void *  enterdata,
Elm_Drag_State  leavecb,
void *  leavedata,
Elm_Drag_Pos  poscb,
void *  posdata,
Elm_Drop_Cb  dropcb,
void *  dropdata 
)

Deletes the drop target status of an object.

Parameters
objThe target object
formatThe formats supported for dropping
entercbThe function to call when the object is entered with a drag
enterdataThe application data to pass to enterdata
leavecbThe function to call when the object is left with a drag
leavedataThe application data to pass to leavedata
poscbThe function to call when the object has a drag over it
posdataThe application data to pass to posdata
dropcbThe function to call when a drop has occurred
dropdataThe application data to pass to dropcb
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References _Elm_Selection_Data::action, _Elm_Selection_Data::data, efl_event_callback_del(), efl_key_data_get(), efl_key_data_set(), eina_list_data_get(), eina_list_remove(), EINA_TRUE, EVAS_CALLBACK_DEL, evas_object_event_callback_del(), evas_object_geometry_get(), _Elm_Selection_Data::format, _Elm_Selection_Data::len, and _Elm_Selection_Data::y.

Referenced by elm_entry_entry_get().

◆ elm_drag_start()

Eina_Bool elm_drag_start ( Evas_Object obj,
Elm_Sel_Format  format,
const char *  data,
Elm_Xdnd_Action  action,
Elm_Drag_Icon_Create_Cb  createicon,
void *  createdata,
Elm_Drag_Pos  dragpos,
void *  dragdata,
Elm_Drag_Accept  acceptcb,
void *  acceptdata,
Elm_Drag_State  dragdone,
void *  donecbdata 
)

Begins a drag given a source object.

Parameters
objThe source object
formatThe drag formats supported by the data
dataThe drag data itself (a string)
actionThe drag action to be done
createiconFunction to call to create a drag object, or NULL if not wanted
createdataApplication data passed to createicon
dragposFunction called with each position of the drag, x, y being screen coordinates if possible, and action being the current action.
dragdataApplication data passed to dragpos
acceptcbFunction called indicating if drop target accepts (or does not) the drop data while dragging
acceptdataApplication data passed to acceptcb
dragdoneFunction to call when drag is done
donecbdataApplication data to pass to dragdone
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References efl_event_callback_add, EINA_FALSE, EINA_TRUE, _Eina_Slice::len, and _Eina_Slice::mem.

◆ elm_drag_cancel()

Eina_Bool elm_drag_cancel ( Evas_Object obj)

Cancels the current drag operation.

It can only be initiated from the source window.

Parameters
objThe source of the current drag.
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.9

References efl_event_callback_del(), efl_key_data_get(), efl_key_data_set(), EINA_LIST_FREE, and EINA_TRUE.

◆ elm_drag_action_set()

Eina_Bool elm_drag_action_set ( Evas_Object obj,
Elm_Xdnd_Action  action 
)

Changes the current drag action.

Parameters
objThe source of a drag if a drag is underway
actionThe drag action to be done
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References EINA_TRUE.

◆ elm_drag_item_container_add()

Eina_Bool elm_drag_item_container_add ( Evas_Object obj,
double  tm_to_anim,
double  tm_to_drag,
Elm_Xy_Item_Get_Cb  itemgetcb,
Elm_Item_Container_Data_Get_Cb  data_get 
)

Set a item container (list, genlist, grid) as source of drag.

Parameters
objThe container object.
tm_to_animTime period to wait before start animation.
tm_to_dragTime period to wait before start dragging.
itemgetcbCallback to get Evas_Object pointer for item at (x,y)
data_getCallback to get drag info
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References efl_key_data_get(), efl_key_data_set(), EINA_FALSE, eina_list_append(), EINA_TRUE, EVAS_CALLBACK_DEL, and evas_object_event_callback_add().

◆ elm_drag_item_container_del()

Eina_Bool elm_drag_item_container_del ( Evas_Object obj)

Deletes a item container from drag-source list.

Parameters
objThe target object
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References EINA_TRUE, EVAS_CALLBACK_DEL, and evas_object_event_callback_del().

◆ elm_drop_item_container_add()

Eina_Bool elm_drop_item_container_add ( Evas_Object obj,
Elm_Sel_Format  format,
Elm_Xy_Item_Get_Cb  itemgetcb,
Elm_Drag_State  entercb,
void *  enterdata,
Elm_Drag_State  leavecb,
void *  leavedata,
Elm_Drag_Item_Container_Pos  poscb,
void *  posdata,
Elm_Drop_Item_Container_Cb  dropcb,
void *  dropdata 
)

Set a item container (list, genlist, grid) as target for drop.

Parameters
objThe container object.
formatThe formats supported for dropping
itemgetcbCallback to get Evas_Object pointer for item at (x,y)
entercbThe function to call when the object is entered with a drag
enterdataThe application data to pass to enterdata
leavecbThe function to call when the object is left with a drag
leavedataThe application data to pass to leavedata
poscbThe function to call when the object has a drag over it
posdataThe application data to pass to posdata
dropcbThe function to call when a drop has occurred
dropdataThe application data to pass to dropcb
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References efl_event_callback_add, efl_key_data_get(), efl_key_data_set(), EINA_FALSE, eina_list_append(), EINA_TRUE, EVAS_CALLBACK_DEL, and evas_object_event_callback_add().

◆ elm_drop_item_container_del()

Eina_Bool elm_drop_item_container_del ( Evas_Object obj)

Removes a container from list of drop targets.

Parameters
objThe container object
Returns
Returns EINA_TRUE, if successful, or EINA_FALSE if not.
Since
1.8

References efl_key_data_get(), efl_key_data_set(), eina_list_data_get(), eina_list_remove(), EINA_TRUE, EVAS_CALLBACK_DEL, evas_object_event_callback_del(), _Eina_Rw_Slice::len, and _Eina_Rw_Slice::mem.

Variable Documentation

◆ ELM_CNP_EVENT_SELECTION_CHANGED

int ELM_CNP_EVENT_SELECTION_CHANGED

Event notifying that the selection has changed.

See also
Elm_Cnp_Event_Selection_Changed
Since
1.20