Tizen Native API

This group discusses functions that deal with draggable parts.

Remarks:
To create a movable part it must be declared as draggable in the EDC file. To do so, one must define a "draggable" block inside the "part" block.
These functions are used to set dragging properties for a part or get dragging information about it.

Functions

Edje_Drag_Dir edje_object_part_drag_dir_get (const Evas_Object *obj, const char *part)
 Gets the draggable directions.
Eina_Bool edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy)
 Sets the draggable object location.
Eina_Bool edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
 Gets the draggable object location.
Eina_Bool edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh)
 Sets the draggable object size.
Eina_Bool edje_object_part_drag_size_get (const Evas_Object *obj, const char *part, double *dw, double *dh)
 Gets the draggable object size.
Eina_Bool edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy)
 Sets the drag step increment.
Eina_Bool edje_object_part_drag_step_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
 Gets the drag step increment values.
Eina_Bool edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy)
 Sets the page step increments.
Eina_Bool edje_object_part_drag_page_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
 Gets the page step increments.
Eina_Bool edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy)
 Steps the draggable x,y steps.
Eina_Bool edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy)
 Pages the draggable x,y steps.

Typedefs

typedef enum _Edje_Drag_Dir Edje_Drag_Dir
 Edje drag direction.

Enumeration Type Documentation

Edje drag direction.

Enumerator:
EDJE_DRAG_DIR_NONE 

Direction None.

EDJE_DRAG_DIR_X 

Direction X.

EDJE_DRAG_DIR_Y 

Direction Y.

EDJE_DRAG_DIR_XY 

Direction XY.


Function Documentation

Edje_Drag_Dir edje_object_part_drag_dir_get ( const Evas_Object obj,
const char *  part 
)

Gets the draggable directions.

Since :
2.3.1
Remarks:
The draggable directions are defined in the EDC file, inside the draggable section, by the attributes x and y. See the edcref for more information.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
Returns:
EDJE_DRAG_DIR_NONE: Not draggable
EDJE_DRAG_DIR_X: Draggable in the X direction
EDJE_DRAG_DIR_Y: Draggable in the Y direction
EDJE_DRAG_DIR_XY: Draggable in the X & Y directions
Eina_Bool edje_object_part_drag_page ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Pages the draggable x,y steps.

This pages x,y, where the increment is defined by edje_object_part_drag_page_set.

Since :
2.3.1
Remarks:
The values for dx and dy are real numbers that range from 0 to 1.
Paging contains bugs.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]dxThe x step
[in]dyThe y step
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_step()
Eina_Bool edje_object_part_drag_page_get ( const Evas_Object obj,
const char *  part,
double *  dx,
double *  dy 
)

Gets the page step increments.

This sets the x,y page step increments for the draggable object.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[out]dxThe dx page increment pointer
[out]dyThe dy page increment pointer
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_page_set()
Eina_Bool edje_object_part_drag_page_set ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Sets the page step increments.

This sets the x,y page step increment values.

Since :
2.3.1
Remarks:
The values for dx and dy are real numbers that range from 0 to 1, representing the relative size of the draggable area on that axis by which the part is moved.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]dxThe x page step increment
[in]dyThe y page step increment
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_page_get()
Eina_Bool edje_object_part_drag_size_get ( const Evas_Object obj,
const char *  part,
double *  dw,
double *  dh 
)

Gets the draggable object size.

This gets the draggable object size

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[out]dwThe drag width pointer
[out]dhThe drag height pointer
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_size_set()
Eina_Bool edje_object_part_drag_size_set ( Evas_Object obj,
const char *  part,
double  dw,
double  dh 
)

Sets the draggable object size.

This sets the size of the draggable object.

Since :
2.3.1
Remarks:
The values for dw and dh are real numbers that range from 0 to 1, representing the relative size of the draggable area on that axis.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]dwThe drag width
[in]dhThe drag height
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_size_get()
Eina_Bool edje_object_part_drag_step ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Steps the draggable x,y steps.

This steps x,y, where the step increment is the amount set by edje_object_part_drag_step_set.

Since :
2.3.1
Remarks:
The values for dx and dy are real numbers that range from 0 to 1.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]dxThe x step
[in]dyThe y step
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_page()
Eina_Bool edje_object_part_drag_step_get ( const Evas_Object obj,
const char *  part,
double *  dx,
double *  dy 
)

Gets the drag step increment values.

This gets the x and y step increments for the draggable object.

Since :
2.3.1
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part
[out]dxThe x step increment pointer
[out]dyThe y step increment pointer
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_step_set()
Eina_Bool edje_object_part_drag_step_set ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Sets the drag step increment.

This sets the x,y step increments for a draggable object.

Since :
2.3.1
Remarks:
The values for dx and dy are real numbers that range from 0 to 1, representing the relative size of the draggable area on that axis by which the part is moved.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]dxThe x step amount
[in]dyThe y step amount
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_step_get()
Eina_Bool edje_object_part_drag_value_get ( const Evas_Object obj,
const char *  part,
double *  dx,
double *  dy 
)

Gets the draggable object location.

This gets the drag location values.

Since :
2.3.1
Remarks:
The values for dx and dy are real numbers that range from 0 to 1, representing its relative position on the draggable area on that axis.
Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[out]dxThe X value pointer
[out]dyThe Y value pointer
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_value_set()
Eina_Bool edje_object_part_drag_value_set ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Sets the draggable object location.

It places the draggable object at the given location.

Since :
2.3.1
Remarks:
The values for dx and dy are real numbers that range from 0 to 1, representing its relative position on the draggable area on that axis.

This value means, for the vertical axis, 0.0 is at the top if the first parameter of y in the draggable part theme is 1, and it is at the bottom if it is -1.

For the horizontal axis, 0.0 means left if the first parameter of x in the draggable part theme is 1, and it means right if it is -1.

Parameters:
[in]objA valid Evas_Object handle
[in]partThe part name
[in]dxThe x value
[in]dyThe y value
Returns:
EINA_TRUE if succeed, otherwise EINA_FALSE
See also:
edje_object_part_drag_value_get()