- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Typedefs | Enumerations
Edje Drag
Edje Part

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

#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

Referenced by edje_object_part_drag_dir_get().

#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().

#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().

#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().

#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().

#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().

#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().

#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().

#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().

#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().

#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_Drag_Dir edje_object_part_drag_dir_get | ( | const Evas_Object * | obj,
|  | const char * | part
| ) |  |

Determine dragable directions.

Parameters

  obj | A valid Evas_Object handle
  part | The 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

References edje_obj_part_drag_dir_get.

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

Set the dragable object location.

Parameters

  obj | A valid Evas_Object handle
  part | The part name
  dx | The x value
  dy | The 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 edje_obj_part_drag_value_set, and EINA_FALSE.

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

  obj | A valid Evas_Object handle
  part | The part name
  dx | The X value pointer
  dy | The 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 edje_obj_part_drag_value_get, and EINA_FALSE.

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

Set the dragable object size.

Parameters

  obj | A valid Evas_Object handle
  part | The part name
  dw | The drag width
  dh | The 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 edje_obj_part_drag_size_set, and EINA_FALSE.

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

  obj | A valid Evas_Object handle
  part | The part name
  dw | The drag width pointer
  dh | The drag height pointer

Gets the dragable object size.

See Also
  edje_object_part_drag_size_set()

References edje_obj_part_drag_size_get, and EINA_FALSE.

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

Sets the drag step increment.

Parameters

  obj | A valid Evas_Object handle
  part | The part name
  dx | The x step amount
  dy | The 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 edje_obj_part_drag_step_set, and EINA_FALSE.

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

  obj | A valid Evas_Object handle
  part | The part
  dx | The x step increment pointer
  dy | The y step increment pointer

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

See Also
  edje_object_part_drag_step_set()

References edje_obj_part_drag_step_get, and EINA_FALSE.

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

Sets the page step increments.

Parameters

  obj | A valid Evas_Object handle
  part | The part name
  dx | The x page step increment
  dy | The 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 edje_obj_part_drag_page_set, and EINA_FALSE.

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

  obj | A valid Evas_Object handle
  part | The part name
  dx | The dx page increment pointer
  dy | The dy page increment pointer

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

See Also
  edje_object_part_drag_page_set()

References edje_obj_part_drag_page_get, and EINA_FALSE.

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

Steps the dragable x,y steps.

Parameters

  obj | A valid Evas_Object handle
  part | The part name
  dx | The x step
  dy | The 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 edje_obj_part_drag_step, and EINA_FALSE.

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

Pages x,y steps.

Parameters

  obj | A valid Evas_Object handle
  part | The part name
  dx | The x step
  dy | The 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 edje_obj_part_drag_page, and EINA_FALSE.