- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Flip

## Macros
#define | elm_obj_flip_front_visible_get(ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_FRONT_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Get flip front visibility state. More...
#define | elm_obj_flip_go_to(front, mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO_TO), EO_TYPECHECK(Eina_Bool, front), EO_TYPECHECK(Elm_Flip_Mode, mode)
| Runs the flip animation to front or back. More...
#define | elm_obj_flip_go(mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO), EO_TYPECHECK(Elm_Flip_Mode, mode)
| Runs the flip animation. More...
#define | elm_obj_flip_interaction_set(mode) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_SET), EO_TYPECHECK(Elm_Flip_Interaction, mode)
| Set the interactive flip mode. More...
#define | elm_obj_flip_interaction_get(ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_GET), EO_TYPECHECK(Elm_Flip_Interaction *, ret)
| Get the interactive flip mode. More...
#define | elm_obj_flip_interaction_direction_enabled_set(dir, enabled) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool, enabled)
| Set which directions of the flip respond to interactive flip. More...
#define | elm_obj_flip_interaction_direction_enabled_get(dir, ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool *, ret)
| Get the enabled state of that flip direction. More...
#define | elm_obj_flip_interaction_direction_hitsize_set(dir, hitsize) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double, hitsize)
| Set the amount of the flip that is sensitive to interactive flip. More...
#define | elm_obj_flip_interaction_direction_hitsize_get(dir, ret) ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double *, ret)
| Get the amount of the flip that is sensitive to interactive flip. More...

## Functions
Evas_Object * | elm_flip_add (Evas_Object *parent)
| Add a new flip to the parent. More...
Eina_Bool | elm_flip_front_visible_get (const Evas_Object *obj)
| Get flip front visibility state. More...
void | elm_flip_perspective_set (Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y)
| Set flip perspective. More...
void | elm_flip_go (Evas_Object *obj, Elm_Flip_Mode mode)
| Runs the flip animation. More...
void | elm_flip_go_to (Evas_Object *obj, Eina_Bool front, Elm_Flip_Mode mode)
| Runs the flip animation to front or back. More...
void | elm_flip_interaction_set (Evas_Object *obj, Elm_Flip_Interaction mode)
| Set the interactive flip mode. More...
Elm_Flip_Interaction | elm_flip_interaction_get (const Evas_Object *obj)
| Get the interactive flip mode. More...
void | elm_flip_interaction_direction_enabled_set (Evas_Object *obj, Elm_Flip_Direction dir, Eina_Bool enabled)
| Set which directions of the flip respond to interactive flip. More...
Eina_Bool | elm_flip_interaction_direction_enabled_get (Evas_Object *obj, Elm_Flip_Direction dir)
| Get the enabled state of that flip direction. More...
void | elm_flip_interaction_direction_hitsize_set (Evas_Object *obj, Elm_Flip_Direction dir, double hitsize)
| Set the amount of the flip that is sensitive to interactive flip. More...
double | elm_flip_interaction_direction_hitsize_get (Evas_Object *obj, Elm_Flip_Direction dir)
| Get the amount of the flip that is sensitive to interactive flip. More...

## Detailed Description

This widget holds 2 content objects(Evas_Object): one on the front and one on the back. It allows you to flip from front to back and vice-versa using various animations.

If either the front or back contents are not set the flip will treat that as transparent. So if you wore to set the front content but not the back, and then call elm_flip_go() you would see whatever is below the flip.

For a list of supported animations see elm_flip_go().

Signals that you can add callbacks for are: "animate,begin" - when a flip animation was started "animate,done" - when a flip animation is finished

Default content parts of the flip widget that you can use for are:

- "front" - A front content of the flip
- "back" - A back content of the flip

This widget inherits from The Elementary Container Class, so that the functions meant to act on it will work for mapbuf objects:

- elm_object_part_content_set
- elm_object_part_content_get
- elm_object_part_content_unset

Flip example show how to use most of the API.

## Macro Definition Documentation

#define elm_obj_flip_front_visible_get | ( |  | ret | ) | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_FRONT_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Get flip front visibility state.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_flip_front_visible_get

Referenced by elm_flip_front_visible_get().

#define elm_obj_flip_go | ( |  | mode | ) | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO), EO_TYPECHECK(Elm_Flip_Mode, mode)

Runs the flip animation.

Since
  1.8

Parameters

  [in] | mode |

See Also
  elm_flip_go

Referenced by elm_flip_go().

#define elm_obj_flip_go_to | ( |  | front,
|  |  | mode
| ) |  | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_GO_TO), EO_TYPECHECK(Eina_Bool, front), EO_TYPECHECK(Elm_Flip_Mode, mode)

Runs the flip animation to front or back.

Since
  1.8

Parameters

  [in] | front |
  [in] | mode |

See Also
  elm_flip_go_to

Referenced by elm_flip_go_to().

#define elm_obj_flip_interaction_direction_enabled_get | ( |  | dir,
|  |  | ret
| ) |  | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool *, ret)

Get the enabled state of that flip direction.

Since
  1.8

Parameters

  [in] | dir |
  [out] | ret |

See Also
  elm_flip_interaction_direction_enabled_get

Referenced by elm_flip_interaction_direction_enabled_get().

#define elm_obj_flip_interaction_direction_enabled_set | ( |  | dir,
|  |  | enabled
| ) |  | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_ENABLED_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(Eina_Bool, enabled)

Set which directions of the flip respond to interactive flip.

Since
  1.8

Parameters

  [in] | dir |
  [in] | enabled |

See Also
  elm_flip_interaction_direction_enabled_set

Referenced by elm_flip_interaction_direction_enabled_set().

#define elm_obj_flip_interaction_direction_hitsize_get | ( |  | dir,
|  |  | ret
| ) |  | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_GET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double *, ret)

Get the amount of the flip that is sensitive to interactive flip.

Since
  1.8

Parameters

  [in] | dir |
  [out] | ret |

See Also
  elm_flip_interaction_direction_hitsize_get

Referenced by elm_flip_interaction_direction_hitsize_get().

#define elm_obj_flip_interaction_direction_hitsize_set | ( |  | dir,
|  |  | hitsize
| ) |  | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_DIRECTION_HITSIZE_SET), EO_TYPECHECK(Elm_Flip_Direction, dir), EO_TYPECHECK(double, hitsize)

Set the amount of the flip that is sensitive to interactive flip.

Since
  1.8

Parameters

  [in] | dir |
  [in] | hitsize |

See Also
  elm_flip_interaction_direction_hitsize_set

Referenced by elm_flip_interaction_direction_hitsize_set().

#define elm_obj_flip_interaction_get | ( |  | ret | ) | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_GET), EO_TYPECHECK(Elm_Flip_Interaction *, ret)

Get the interactive flip mode.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_flip_interaction_get

Referenced by elm_flip_interaction_get().

#define elm_obj_flip_interaction_set | ( |  | mode | ) | ELM_OBJ_FLIP_ID(ELM_OBJ_FLIP_SUB_ID_INTERACTION_SET), EO_TYPECHECK(Elm_Flip_Interaction, mode)

Set the interactive flip mode.

Since
  1.8

Parameters

  [in] | mode |

See Also
  elm_flip_interaction_set

Referenced by elm_flip_interaction_set().

## Function Documentation

Evas_Object* elm_flip_add | ( | Evas_Object * | parent | ) |

Add a new flip to the parent.

Parameters

  parent | The parent object

Returns
  The new object or NULL if it cannot be created

Eina_Bool elm_flip_front_visible_get | ( | const Evas_Object * | obj | ) |

Get flip front visibility state.

Parameters

  obj | The flip object

Returns
  EINA_TRUE if front front is showing, EINA_FALSE if the back is showing.

References elm_obj_flip_front_visible_get.

void elm_flip_go | ( | Evas_Object * | obj,
|  | Elm_Flip_Mode | mode
| ) |  |

Runs the flip animation.

Parameters

  obj | The flip object
  mode | The mode type

Flips the front and back contents using the `mode` animation. This effectively hides the currently visible content and shows the hidden one.

There a number of possible animations to use for the flipping:

- ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content around a horizontal axis in the middle of its height, the other content is shown as the other side of the flip.
- ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content around a vertical axis in the middle of its width, the other content is shown as the other side of the flip.
- ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content around a diagonal axis in the middle of its width, the other content is shown as the other side of the flip.
- ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content around a diagonal axis in the middle of its height, the other content is shown as the other side of the flip.
- ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left as if the flip was a cube, the other content is show as the right face of the cube.
- ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the right as if the flip was a cube, the other content is show as the left face of the cube.
- ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the flip was a cube, the other content is show as the bottom face of the cube.
- ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if the flip was a cube, the other content is show as the upper face of the cube.
- ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as if the flip was a book, the other content is shown as the page below that.
- ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right as if the flip was a book, the other content is shown as the page below that.
- ELM_FLIP_PAGE_UP - Move the currently visible content up as if the flip was a book, the other content is shown as the page below that.
- ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the flip was a book, the other content is shown as the page below that.

See Also
  elm_flip_go_to()

References elm_obj_flip_go.

void elm_flip_go_to | ( | Evas_Object * | obj,
|  | Eina_Bool | front,
|  | Elm_Flip_Mode | mode
| ) |  |

Runs the flip animation to front or back.

Parameters

  obj | The flip object
  front | if `EINA_TRUE`, makes front visible, otherwise makes back.
  mode | The mode type

Flips the front and back contents using the `mode` animation. This effectively hides the currently visible content and shows the hidden one.

There a number of possible animations to use for the flipping:

- ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotate the currently visible content around a horizontal axis in the middle of its height, the other content is shown as the other side of the flip.
- ELM_FLIP_ROTATE_Y_CENTER_AXIS - Rotate the currently visible content around a vertical axis in the middle of its width, the other content is shown as the other side of the flip.
- ELM_FLIP_ROTATE_XZ_CENTER_AXIS - Rotate the currently visible content around a diagonal axis in the middle of its width, the other content is shown as the other side of the flip.
- ELM_FLIP_ROTATE_YZ_CENTER_AXIS - Rotate the currently visible content around a diagonal axis in the middle of its height, the other content is shown as the other side of the flip.
- ELM_FLIP_CUBE_LEFT - Rotate the currently visible content to the left as if the flip was a cube, the other content is show as the right face of the cube.
- ELM_FLIP_CUBE_RIGHT - Rotate the currently visible content to the right as if the flip was a cube, the other content is show as the left face of the cube.
- ELM_FLIP_CUBE_UP - Rotate the currently visible content up as if the flip was a cube, the other content is show as the bottom face of the cube.
- ELM_FLIP_CUBE_DOWN - Rotate the currently visible content down as if the flip was a cube, the other content is show as the upper face of the cube.
- ELM_FLIP_PAGE_LEFT - Move the currently visible content to the left as if the flip was a book, the other content is shown as the page below that.
- ELM_FLIP_PAGE_RIGHT - Move the currently visible content to the right as if the flip was a book, the other content is shown as the page below that.
- ELM_FLIP_PAGE_UP - Move the currently visible content up as if the flip was a book, the other content is shown as the page below that.
- ELM_FLIP_PAGE_DOWN - Move the currently visible content down as if the flip was a book, the other content is shown as the page below that.

Since
  1.7

References elm_obj_flip_go_to.

Eina_Bool elm_flip_interaction_direction_enabled_get | ( | Evas_Object * | obj,
|  | Elm_Flip_Direction | dir
| ) |  |

Get the enabled state of that flip direction.

Parameters

  obj | The flip object
  dir | The direction to check

Returns
  If that direction is enabled or not

Get the enabled state set by elm_flip_interaction_direction_enabled_set()

See Also
  elm_flip_interaction_set()

References elm_obj_flip_interaction_direction_enabled_get.

void elm_flip_interaction_direction_enabled_set | ( | Evas_Object * | obj,
|  | Elm_Flip_Direction | dir,
|  | Eina_Bool | enabled
| ) |  |

Set which directions of the flip respond to interactive flip.

Parameters

  obj | The flip object
  dir | The direction to change
  enabled | If that direction is enabled or not

By default all directions are disabled, so you may want to enable the desired directions for flipping if you need interactive flipping. You must call this function once for each direction that should be enabled.

See Also
  elm_flip_interaction_set()

References elm_obj_flip_interaction_direction_enabled_set.

double elm_flip_interaction_direction_hitsize_get | ( | Evas_Object * | obj,
|  | Elm_Flip_Direction | dir
| ) |  |

Get the amount of the flip that is sensitive to interactive flip.

Parameters

  obj | The flip object
  dir | The direction to check

Returns
  The size set for that direction

Returns the amount of sensitive area set by elm_flip_interaction_direction_hitsize_set().

References elm_obj_flip_interaction_direction_hitsize_get.

void elm_flip_interaction_direction_hitsize_set | ( | Evas_Object * | obj,
|  | Elm_Flip_Direction | dir,
|  | double | hitsize
| ) |  |

Set the amount of the flip that is sensitive to interactive flip.

Parameters

  obj | The flip object
  dir | The direction to modify
  hitsize | The amount of that dimension (0.0 to 1.0) to use

Set the amount of the flip that is sensitive to interactive flip, with 0 representing no area in the flip and 1 representing the entire flip. There is however a consideration to be made in that the area will never be smaller than the finger size set(as set in your Elementary configuration).

See Also
  elm_flip_interaction_set()

References elm_obj_flip_interaction_direction_hitsize_set.

Elm_Flip_Interaction elm_flip_interaction_get | ( | const Evas_Object * | obj | ) |

Get the interactive flip mode.

Parameters

  obj | The flip object

Returns
  The interactive flip mode

Returns the interactive flip mode set by elm_flip_interaction_set()

References elm_obj_flip_interaction_get.

void elm_flip_interaction_set | ( | Evas_Object * | obj,
|  | Elm_Flip_Interaction | mode
| ) |  |

Set the interactive flip mode.

Parameters

  obj | The flip object
  mode | The interactive flip mode to use

This sets if the flip should be interactive (allow user to click and drag a side of the flip to reveal the back page and cause it to flip). By default a flip is not interactive. You may also need to set which sides of the flip are "active" for flipping and how much space they use (a minimum of a finger size) with elm_flip_interaction_direction_enabled_set() and elm_flip_interaction_direction_hitsize_set()

The four available mode of interaction are:

- ELM_FLIP_INTERACTION_NONE - No interaction is allowed
- ELM_FLIP_INTERACTION_ROTATE - Interaction will cause rotate animation
- ELM_FLIP_INTERACTION_CUBE - Interaction will cause cube animation
- ELM_FLIP_INTERACTION_PAGE - Interaction will cause page animation

Note
  ELM_FLIP_INTERACTION_ROTATE won't cause ELM_FLIP_ROTATE_XZ_CENTER_AXIS or ELM_FLIP_ROTATE_YZ_CENTER_AXIS to happen, those can only be achieved with elm_flip_go();

References elm_obj_flip_interaction_set.

void elm_flip_perspective_set | ( | Evas_Object * | obj,
|  | Evas_Coord | foc,
|  | Evas_Coord | x,
|  | Evas_Coord | y
| ) |  |

Set flip perspective.

Parameters

  obj | The flip object
  foc | The coordinate to set the focus on
  x | The X coordinate
  y | The Y coordinate

Warning
  This function currently does nothing.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:13