Tizen Native API
Functions
Flip
Elementary Widgets

Functions

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

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.

flip_inheritance_tree.png

If either the front or back contents are not set, the flip treats that as transparent. So if you were 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 is started "animate,done" - When a flip animation is finished

The default content parts of the flip widget that you can use are:

The functions meant to act on it works for mapbuf objects:


Enumeration Type Documentation

Enumeration of Elm Flip Direction type

Enumerator:
ELM_FLIP_DIRECTION_UP 

Allows interaction with the top of the widget

ELM_FLIP_DIRECTION_DOWN 

Allows interaction with the bottom of the widget

ELM_FLIP_DIRECTION_LEFT 

Allows interaction with the left portion of the widget

ELM_FLIP_DIRECTION_RIGHT 

Allows interaction with the right portion of the widget


Function Documentation

Adds a new flip to the parent.

Since :
2.3
Parameters:
[in]parentThe parent object
Returns:
The new object, otherwise NULL if it cannot be created

Gets the flip front visibility state.

Since :
2.3
Parameters:
[in]objThe flip object
Returns:
EINA_TRUE if the front is showing, otherwise EINA_FALSE if the back is showing
void elm_flip_go ( Evas_Object obj,
Elm_Flip_Mode  mode 
)

Runs the flip animation.

Since :
2.3
Remarks:
Flips the front and back contents using the mode animation. This effectively hides the currently visible content and shows the hidden one.
There are a number of possible animations to use for flipping:
  • ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotates 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 - Rotates 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 - Rotates 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 - Rotates 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 - Rotates the currently visible content to the left as if the flip is a cube, the other content is shown as the right face of the cube.
  • ELM_FLIP_CUBE_RIGHT - Rotates the currently visible content to the right as if the flip is a cube, the other content is shown as the left face of the cube.
  • ELM_FLIP_CUBE_UP - Rotates the currently visible content up as if the flip is a cube, the other content is shown as the bottom face of the cube.
  • ELM_FLIP_CUBE_DOWN - Rotates the currently visible content down as if the flip is a cube, the other content is shown as the upper face of the cube.
  • ELM_FLIP_PAGE_LEFT - Moves the currently visible content to the left as if the flip is a book, the other content is shown as the page below that.
  • ELM_FLIP_PAGE_RIGHT - Moves the currently visible content to the right as if the flip is a book, the other content is shown as the page below that.
  • ELM_FLIP_PAGE_UP - Moves the currently visible content up as if the flip is a book, the other content is shown as the page below that.
  • ELM_FLIP_PAGE_DOWN - Moves the currently visible content down as if the flip is a book, the other content is shown as the page below that.
elm_flip.png
Parameters:
[in]objThe flip object
[in]modeThe mode type
See also:
elm_flip_go_to()
void elm_flip_go_to ( Evas_Object obj,
Eina_Bool  front,
Elm_Flip_Mode  mode 
)

Runs the flip animation to the front or back.

Since (EFL) :
1.7
Since :
2.3
Remarks:
Flips the front and back contents using the mode animation. This effectively hides the currently visible content and shows the hidden one.
There are a number of possible animations to use for flipping:
  • ELM_FLIP_ROTATE_X_CENTER_AXIS - Rotates 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 - Rotates 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 - Rotates 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 - Rotates 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 - Rotates the currently visible content to the left as if the flip is a cube, the other content is shown as the right face of the cube.
  • ELM_FLIP_CUBE_RIGHT - Rotates the currently visible content to the right as if the flip is a cube, the other content is shown as the left face of the cube.
  • ELM_FLIP_CUBE_UP - Rotates the currently visible content up as if the flip is a cube, the other content is shown as the bottom face of the cube.
  • ELM_FLIP_CUBE_DOWN - Rotates the currently visible content down as if the flip is a cube, the other content is shown as the upper face of the cube.
  • ELM_FLIP_PAGE_LEFT - Moves the currently visible content to the left as if the flip is a book, the other content is shown as the page below that.
  • ELM_FLIP_PAGE_RIGHT - Moves the currently visible content to the right as if the flip is a book, the other content is shown as the page below that.
  • ELM_FLIP_PAGE_UP - Moves the currently visible content up as if the flip is a book, the other content is shown as the page below that.
  • ELM_FLIP_PAGE_DOWN - Moves the currently visible content down as if the flip is a book, the other content is shown as the page below that.
elm_flip.png
Parameters:
[in]objThe flip object
[in]frontIf EINA_TRUE it makes the front visible, otherwise EINA_FALSE to make the back visible
[in]modeThe mode type

Gets the enabled state of that flip direction.

This gets the enabled state set by elm_flip_interaction_direction_enabled_set().

Since :
2.3
Parameters:
[in]objThe flip object
[in]dirThe direction to check
Returns:
The boolean value that indicates whether that direction is enabled
See also:
elm_flip_interaction_set()

Sets which directions of the flip respond to the interactive flip.

Since :
2.3
Remarks:
By default, all the 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.
Parameters:
[in]objThe flip object
[in]dirThe direction to change
[in]enabledThe boolean value that indicates whether that direction is enabled
See also:
elm_flip_interaction_set()

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

This returns the amount of sensitive area set by elm_flip_interaction_direction_hitsize_set().

Since :
2.3
Parameters:
[in]objThe flip object
[in]dirThe direction to check
Returns:
The size set for that direction
void elm_flip_interaction_direction_hitsize_set ( Evas_Object obj,
Elm_Flip_Direction  dir,
double  hitsize 
)

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

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

Since :
2.3
Parameters:
[in]objThe flip object
[in]dirThe direction to modify
[in]hitsizeThe amount of that dimension (0.0 to 1.0) to use
See also:
elm_flip_interaction_set()
Elm_Flip_Interaction elm_flip_interaction_get ( const Evas_Object obj)

Gets the interactive flip mode.

Since :
2.3
Remarks:
This returns the interactive flip mode set by elm_flip_interaction_set().
Parameters:
[in]objThe flip object
Returns:
The interactive flip mode
void elm_flip_interaction_set ( Evas_Object obj,
Elm_Flip_Interaction  mode 
)

Sets the interactive flip mode.

Since :
2.3
Remarks:
This sets if the flip should be interactive (allow a 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 modes of interaction are:
  • ELM_FLIP_INTERACTION_NONE - No interaction is allowed.
  • ELM_FLIP_INTERACTION_ROTATE - Interaction causes rotate animation.
  • ELM_FLIP_INTERACTION_CUBE - Interaction causes cube animation.
  • ELM_FLIP_INTERACTION_PAGE - Interaction causes page animation.
ELM_FLIP_INTERACTION_ROTATE won't cause ELM_FLIP_ROTATE_XZ_CENTER_AXIS or ELM_FLIP_ROTATE_YZ_CENTER_AXIS to happen, they can only be achieved with elm_flip_go().
Parameters:
[in]objThe flip object
[in]modeThe interactive flip mode to use

Sets the flip perspective.

Since :
2.3
Remarks:
This function currently does nothing.
Parameters:
[in]objThe flip object
[in]focThe coordinate to set the focus on
[in]xThe X coordinate
[in]yThe Y coordinate

Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause.
For details, see the Content License