Functions that deal with dragable parts. More...

Typedefs

typedef enum _Edje_Drag_Dir Edje_Drag_Dir
 

Enumerations

enum  _Edje_Drag_Dir {
  EDJE_DRAG_DIR_NONE = 0,
  EDJE_DRAG_DIR_X = 1,
  EDJE_DRAG_DIR_Y = 2,
  EDJE_DRAG_DIR_XY = 3
}
 
#define edje_obj_part_drag_dir_get(part, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_DIR_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Edje_Drag_Dir *, ret)
 Determine dragable directions. More...
 
#define edje_obj_part_drag_value_set(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_VALUE_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Set the dragable object location. More...
 
#define edje_obj_part_drag_value_get(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_VALUE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dx), EO_TYPECHECK(double *, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Get the dragable object location. More...
 
#define edje_obj_part_drag_size_set(part, dw, dh, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_SIZE_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dw), EO_TYPECHECK(double, dh), EO_TYPECHECK(Eina_Bool *, ret)
 Set the dragable object size. More...
 
#define edje_obj_part_drag_size_get(part, dw, dh, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_SIZE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dw), EO_TYPECHECK(double *, dh), EO_TYPECHECK(Eina_Bool *, ret)
 Get the dragable object size. More...
 
#define edje_obj_part_drag_step_set(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_STEP_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Sets the drag step increment. More...
 
#define edje_obj_part_drag_step_get(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_STEP_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dx), EO_TYPECHECK(double *, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Gets the drag step increment values. More...
 
#define edje_obj_part_drag_page_set(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_PAGE_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Sets the page step increments. More...
 
#define edje_obj_part_drag_page_get(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_PAGE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dx), EO_TYPECHECK(double *, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Gets the page step increments. More...
 
#define edje_obj_part_drag_step(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_STEP), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Steps the dragable x,y steps. More...
 
#define edje_obj_part_drag_page(part, dx, dy, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_PAGE), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)
 Pages x,y steps. More...
 
Edje_Drag_Dir edje_object_part_drag_dir_get (const Evas_Object *obj, const char *part)
 Determine dragable directions. More...
 
Eina_Bool edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy)
 Set the dragable object location. More...
 
Eina_Bool edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
 Get the dragable object location. More...
 
Eina_Bool edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh)
 Set the dragable object size. More...
 
Eina_Bool edje_object_part_drag_size_get (const Evas_Object *obj, const char *part, double *dw, double *dh)
 Get the dragable object size. More...
 
Eina_Bool edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy)
 Sets the drag step increment. More...
 
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. More...
 
Eina_Bool edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy)
 Sets the page step increments. More...
 
Eina_Bool edje_object_part_drag_page_get (const Evas_Object *obj, const char *part, double *dx, double *dy)
 Gets the page step increments. More...
 
Eina_Bool edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy)
 Steps the dragable x,y steps. More...
 
Eina_Bool edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy)
 Pages x,y steps. More...
 

Detailed Description

Functions that deal with dragable parts.

To create a movable part it must be declared as dragable in EDC file. To do so, one must define a "dragable" block inside the "part" block.

These functions are used to set dragging properties to a part or get dragging information about it.

See also
Dragable parts example

Macro Definition Documentation

§ edje_obj_part_drag_dir_get

#define edje_obj_part_drag_dir_get (   part,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_DIR_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Edje_Drag_Dir *, ret)

Determine dragable directions.

Since
1.8
Parameters
[in]part
[out]ret
See also
edje_object_part_drag_dir_get

§ edje_obj_part_drag_value_set

#define edje_obj_part_drag_value_set (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_VALUE_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)

Set the dragable object location.

Since
1.8
Parameters
[in]part
[in]dx
[in]dy
[out]ret
See also
edje_object_part_drag_value_set

Referenced by edje_object_part_drag_value_set().

§ edje_obj_part_drag_value_get

#define edje_obj_part_drag_value_get (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_VALUE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dx), EO_TYPECHECK(double *, dy), EO_TYPECHECK(Eina_Bool *, ret)

Get the dragable object location.

Since
1.8
Parameters
[in]part
[out]dx
[out]dy
[out]ret
See also
edje_object_part_drag_value_get

Referenced by edje_object_part_drag_value_get().

§ edje_obj_part_drag_size_set

#define edje_obj_part_drag_size_set (   part,
  dw,
  dh,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_SIZE_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dw), EO_TYPECHECK(double, dh), EO_TYPECHECK(Eina_Bool *, ret)

Set the dragable object size.

Since
1.8
Parameters
[in]part
[in]dw
[in]dh
[out]ret
See also
edje_object_part_drag_size_set

Referenced by edje_object_part_drag_size_set().

§ edje_obj_part_drag_size_get

#define edje_obj_part_drag_size_get (   part,
  dw,
  dh,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_SIZE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dw), EO_TYPECHECK(double *, dh), EO_TYPECHECK(Eina_Bool *, ret)

Get the dragable object size.

Since
1.8
Parameters
[in]part
[out]dw
[out]dh
[out]ret
See also
edje_object_part_drag_size_get

Referenced by edje_object_part_drag_size_get().

§ edje_obj_part_drag_step_set

#define edje_obj_part_drag_step_set (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_STEP_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)

Sets the drag step increment.

Since
1.8
Parameters
[in]part
[in]dx
[in]dy
[out]ret
See also
edje_object_part_drag_step_set

Referenced by edje_object_part_drag_step_set().

§ edje_obj_part_drag_step_get

#define edje_obj_part_drag_step_get (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_STEP_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dx), EO_TYPECHECK(double *, dy), EO_TYPECHECK(Eina_Bool *, ret)

Gets the drag step increment values.

Since
1.8
Parameters
[in]part
[out]dx
[out]dy
[out]ret
See also
edje_object_part_drag_step_get

Referenced by edje_object_part_drag_step_get().

§ edje_obj_part_drag_page_set

#define edje_obj_part_drag_page_set (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_PAGE_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)

Sets the page step increments.

Since
1.8
Parameters
[in]part
[in]dx
[in]dy
[out]ret
See also
edje_object_part_drag_page_set

Referenced by edje_object_part_drag_page_set().

§ edje_obj_part_drag_page_get

#define edje_obj_part_drag_page_get (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_PAGE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, dx), EO_TYPECHECK(double *, dy), EO_TYPECHECK(Eina_Bool *, ret)

Gets the page step increments.

Since
1.8
Parameters
[in]part
[out]dx
[out]dy
[out]ret
See also
edje_object_part_drag_page_get

Referenced by edje_object_part_drag_page_get().

§ edje_obj_part_drag_step

#define edje_obj_part_drag_step (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_STEP), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)

Steps the dragable x,y steps.

Since
1.8
Parameters
[in]part
[in]dx
[in]dy
[out]ret
See also
edje_object_part_drag_step

Referenced by edje_object_part_drag_step().

§ edje_obj_part_drag_page

#define edje_obj_part_drag_page (   part,
  dx,
  dy,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_DRAG_PAGE), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double, dx), EO_TYPECHECK(double, dy), EO_TYPECHECK(Eina_Bool *, ret)

Pages x,y steps.

Since
1.8
Parameters
[in]part
[in]dx
[in]dy
[out]ret
See also
edje_object_part_drag_page

Referenced by edje_object_part_drag_page().

Function Documentation

§ edje_object_part_drag_dir_get()

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

Determine dragable directions.

Parameters
objA valid Evas_Object handle
partThe part name

The dragable directions are defined in the EDC file, inside the dragable section, by the attributes x and y. See the Edje Data Collection reference for more information.

Returns
#EDJE_DRAG_DIR_NONE: Not dragable
#EDJE_DRAG_DIR_X: Dragable in X direction
#EDJE_DRAG_DIR_Y: Dragable in Y direction
#EDJE_DRAG_DIR_XY: Dragable in X & Y directions

§ edje_object_part_drag_value_set()

Eina_Bool edje_object_part_drag_value_set ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Set the dragable object location.

Parameters
objA valid Evas_Object handle
partThe part name
dxThe x value
dyThe y value

Places the dragable object at the given location.

Values for dx and dy are real numbers that range from 0 to 1, representing the relative position to the dragable area on that axis.

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

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

See also
edje_object_part_drag_value_get()
Examples:
edje-drag.c.

References EAPI, edje_obj_part_drag_value_set, EINA_FALSE, EINA_LIST_FOREACH, and EINA_TRUE.

§ edje_object_part_drag_value_get()

Eina_Bool edje_object_part_drag_value_get ( const Evas_Object obj,
const char *  part,
double *  dx,
double *  dy 
)

Get the dragable object location.

Parameters
objA valid Evas_Object handle
partThe part name
dxThe X value pointer
dyThe Y value pointer

Values for dx and dy are real numbers that range from 0 to 1, representing the relative position to the dragable area on that axis.

See also
edje_object_part_drag_value_set()

Gets the drag location values.

Examples:
edje-drag.c.

References EAPI, edje_obj_part_drag_value_get, EINA_FALSE, and EINA_TRUE.

§ edje_object_part_drag_size_set()

Eina_Bool edje_object_part_drag_size_set ( Evas_Object obj,
const char *  part,
double  dw,
double  dh 
)

Set the dragable object size.

Parameters
objA valid Evas_Object handle
partThe part name
dwThe drag width
dhThe drag height

Values for dw and dh are real numbers that range from 0 to 1, representing the relative size of the dragable area on that axis.

Sets the size of the dragable object.

See also
edje_object_part_drag_size_get()
Examples:
edje-drag.c.

References EAPI, edje_obj_part_drag_size_set, EINA_FALSE, EINA_LIST_FOREACH, and EINA_TRUE.

§ edje_object_part_drag_size_get()

Eina_Bool edje_object_part_drag_size_get ( const Evas_Object obj,
const char *  part,
double *  dw,
double *  dh 
)

Get the dragable object size.

Parameters
objA valid Evas_Object handle
partThe part name
dwThe drag width pointer
dhThe drag height pointer

Gets the dragable object size.

See also
edje_object_part_drag_size_set()

References EAPI, edje_obj_part_drag_size_get, EINA_FALSE, and EINA_TRUE.

§ 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.

Parameters
objA valid Evas_Object handle
partThe part name
dxThe x step amount
dyThe y step amount

Sets the x,y step increments for a dragable object.

Values for dx and dy are real numbers that range from 0 to 1, representing the relative size of the dragable area on that axis by which the part will be moved.

See also
edje_object_part_drag_step_get()
Examples:
edje-drag.c.

References EAPI, edje_obj_part_drag_step_set, EINA_FALSE, EINA_LIST_FOREACH, and EINA_TRUE.

§ edje_object_part_drag_step_get()

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.

Parameters
objA valid Evas_Object handle
partThe part
dxThe x step increment pointer
dyThe y step increment pointer

Gets the x and y step increments for the dragable object.

See also
edje_object_part_drag_step_set()

References EAPI, edje_obj_part_drag_step_get, EINA_FALSE, and EINA_TRUE.

§ 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.

Parameters
objA valid Evas_Object handle
partThe part name
dxThe x page step increment
dyThe y page step increment

Sets the x,y page step increment values.

Values for dx and dy are real numbers that range from 0 to 1, representing the relative size of the dragable area on that axis by which the part will be moved.

See also
edje_object_part_drag_page_get()
Examples:
edje-drag.c.

References EAPI, edje_obj_part_drag_page_set, EINA_FALSE, EINA_LIST_FOREACH, and EINA_TRUE.

§ edje_object_part_drag_page_get()

Eina_Bool edje_object_part_drag_page_get ( const Evas_Object obj,
const char *  part,
double *  dx,
double *  dy 
)

Gets the page step increments.

Parameters
objA valid Evas_Object handle
partThe part name
dxThe dx page increment pointer
dyThe dy page increment pointer

Gets the x,y page step increments for the dragable object.

See also
edje_object_part_drag_page_set()

References EAPI, edje_obj_part_drag_page_get, EINA_FALSE, and EINA_TRUE.

§ edje_object_part_drag_step()

Eina_Bool edje_object_part_drag_step ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Steps the dragable x,y steps.

Parameters
objA valid Evas_Object handle
partThe part name
dxThe x step
dyThe y step

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

Values for dx and dy are real numbers that range from 0 to 1.

See also
edje_object_part_drag_page()
Examples:
edje-drag.c.

References EAPI, edje_obj_part_drag_step, EINA_FALSE, EINA_LIST_FOREACH, and EINA_TRUE.

§ edje_object_part_drag_page()

Eina_Bool edje_object_part_drag_page ( Evas_Object obj,
const char *  part,
double  dx,
double  dy 
)

Pages x,y steps.

Parameters
objA valid Evas_Object handle
partThe part name
dxThe x step
dyThe y step

Pages x,y where the increment is defined by edje_object_part_drag_page_set.

Values for dx and dy are real numbers that range from 0 to 1.

Warning
Paging is bugged!
See also
edje_object_part_drag_step()
Examples:
edje-drag.c.

References EAPI, edje_obj_part_drag_page, EINA_FALSE, EINA_LIST_FOREACH, eina_rbtree_delete(), and EINA_TRUE.