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

Functions
Mapbuf

## Functions
Evas_Object * | elm_mapbuf_add (Evas_Object *parent)
| Add a new mapbuf widget to the given parent Elementary (container) object. More...
void | elm_mapbuf_enabled_set (Evas_Object *obj, Eina_Bool enabled)
| Enable or disable the map. More...
Eina_Bool | elm_mapbuf_enabled_get (const Evas_Object *obj)
| Get a value whether map is enabled or not. More...
void | elm_mapbuf_smooth_set (Evas_Object *obj, Eina_Bool smooth)
| Enable or disable smooth map rendering. More...
Eina_Bool | elm_mapbuf_smooth_get (const Evas_Object *obj)
| Get a value whether smooth map rendering is enabled or not. More...
void | elm_mapbuf_alpha_set (Evas_Object *obj, Eina_Bool alpha)
| Set or unset alpha flag for map rendering. More...
Eina_Bool | elm_mapbuf_alpha_get (const Evas_Object *obj)
| Get a value whether alpha blending is enabled or not. More...
void | elm_mapbuf_auto_set (Evas_Object *obj, Eina_Bool on)
| Set or unset auto flag for map rendering. More...
Eina_Bool | elm_mapbuf_auto_get (const Evas_Object *obj)
| Get a value whether auto mode is enabled or not. More...
#define | elm_obj_mapbuf_enabled_set(enabled) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled)
#define | elm_obj_mapbuf_enabled_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_mapbuf_smooth_set(smooth) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_SET), EO_TYPECHECK(Eina_Bool, smooth)
#define | elm_obj_mapbuf_smooth_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_mapbuf_alpha_set(alpha) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_SET), EO_TYPECHECK(Eina_Bool, alpha)
#define | elm_obj_mapbuf_alpha_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_mapbuf_auto_set(on) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_SET), EO_TYPECHECK(Eina_Bool, on)
#define | elm_obj_mapbuf_auto_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_GET), EO_TYPECHECK(Eina_Bool *, ret)

## Detailed Description

This holds one content object and uses an Evas Map of transformation points to be later used with this content. So the content will be moved, resized, etc as a single image. So it will improve performance when you have a complex interface, with a lot of elements, and will need to resize or move it frequently (the content object and its children).

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

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

- "default" - The main content of the mapbuf

To enable map, elm_mapbuf_enabled_set() should be used.

See how to use this widget in this example: Mapbuf Widget Example

## Macro Definition Documentation

#define elm_obj_mapbuf_alpha_get | ( |  | ret | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get a value whether alpha blending is enabled or not.

Parameters

  [out] | ret |

See Also
  elm_mapbuf_alpha_get

Referenced by elm_mapbuf_alpha_get().

#define elm_obj_mapbuf_alpha_set | ( |  | alpha | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_SET), EO_TYPECHECK(Eina_Bool, alpha)

Since
  1.8

Set or unset alpha flag for map rendering.

Parameters

  [in] | alpha |

See Also
  elm_mapbuf_alpha_set

Referenced by elm_mapbuf_alpha_set().

#define elm_obj_mapbuf_auto_get | ( |  | ret | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get a value automatic map mode is enabled ore not.

Parameters

  [out] | ret |

See Also
  elm_mapbuf_auto_get

Referenced by elm_mapbuf_auto_get().

#define elm_obj_mapbuf_auto_set | ( |  | on | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_SET), EO_TYPECHECK(Eina_Bool, on)

Since
  1.8

Set or unset automatic flag for map rendering.

Parameters

  [in] | on |

See Also
  elm_mapbuf_auto_set

Referenced by elm_mapbuf_auto_set().

#define elm_obj_mapbuf_enabled_get | ( |  | ret | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get a value whether map is enabled or not.

Parameters

  [out] | ret |

See Also
  elm_mapbuf_enabled_get

Referenced by elm_mapbuf_enabled_get().

#define elm_obj_mapbuf_enabled_set | ( |  | enabled | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled)

Since
  1.8

Enable or disable the map.

Parameters

  [in] | enabled |

See Also
  elm_mapbuf_enabled_set

Referenced by elm_mapbuf_enabled_set().

#define elm_obj_mapbuf_smooth_get | ( |  | ret | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get a value whether smooth map rendering is enabled or not.

Parameters

  [out] | ret |

See Also
  elm_mapbuf_smooth_get

Referenced by elm_mapbuf_smooth_get().

#define elm_obj_mapbuf_smooth_set | ( |  | smooth | ) | ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_SET), EO_TYPECHECK(Eina_Bool, smooth)

Since
  1.8

Enable or disable smooth map rendering.

Parameters

  [in] | smooth |

See Also
  elm_mapbuf_smooth_set

Referenced by elm_mapbuf_smooth_set().

## Function Documentation

Evas_Object* elm_mapbuf_add | ( | Evas_Object * | parent | ) |

Add a new mapbuf widget to the given parent Elementary (container) object.

Parameters

  parent | The parent object.

Returns
  A new mapbuf widget handle or `NULL`, on errors.

This function inserts a new mapbuf widget on the canvas.

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

Get a value whether alpha blending is enabled or not.

Parameters

  obj | The mapbuf object.

Returns
  `EINA_TRUE` means alpha blending is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_mapbuf_alpha_set() for details.

References elm_obj_mapbuf_alpha_get.

void elm_mapbuf_alpha_set | ( | Evas_Object * | obj,
|  | Eina_Bool | alpha
| ) |  |

Set or unset alpha flag for map rendering.

Parameters

  obj | The mapbuf object.
  alpha | `EINA_TRUE` to enable alpha blending or `EINA_FALSE` to disable it.

This sets alpha flag for map rendering. If the object is a type that has its own alpha settings, then this will take precedence. Only image objects have this currently. It stops alpha blending of the map area, and is useful if you know the object and/or all sub-objects is 100% solid.

Alpha is enabled by default.

References elm_obj_mapbuf_alpha_set.

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

Get a value whether auto mode is enabled or not.

Parameters

  obj | The mapbuf object.

Returns
  `EINA_TRUE` means autso mode is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_mapbuf_auto_set() for details.

References elm_obj_mapbuf_auto_get.

void elm_mapbuf_auto_set | ( | Evas_Object * | obj,
|  | Eina_Bool | on
| ) |  |

Set or unset auto flag for map rendering.

Parameters

  obj | The mapbuf object.
  on | `EINA_TRUE` to enable auto mode or `EINA_FALSE` to disable it.

When a ampbuf object has "auto mode" enabled, then it will enable and disable map mode based on current visibility. Mapbuf will track if you show or hide it AND if the object is inside the canvas viewport or not when it is moved or resized. Note that if you turn automode off, then map mode will be in a disabled state at this point. When you turn it on for the first time, the current state will be evaluated base on current properties of the mapbuf object.

Auto mode is disabled by default.

References elm_obj_mapbuf_auto_set.

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

Get a value whether map is enabled or not.

Parameters

  obj | The mapbuf object.

Returns
  `EINA_TRUE` means map is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_mapbuf_enabled_set() for details.

References elm_obj_mapbuf_enabled_get.

void elm_mapbuf_enabled_set | ( | Evas_Object * | obj,
|  | Eina_Bool | enabled
| ) |  |

Enable or disable the map.

Parameters

  obj | The mapbuf object.
  enabled | `EINA_TRUE` to enable map or `EINA_FALSE` to disable it.

This enables the map that is set or disables it. On enable, the object geometry will be saved, and the new geometry will change (position and size) to reflect the map geometry set.

Also, when enabled, alpha and smooth states will be used, so if the content isn't solid, alpha should be enabled, for example, otherwise a black rectangle will fill the content.

When disabled, the stored map will be freed and geometry prior to enabling the map will be restored.

It's disabled by default.

See Also
  elm_mapbuf_alpha_set()
  elm_mapbuf_smooth_set()

References elm_obj_mapbuf_enabled_set.

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

Get a value whether smooth map rendering is enabled or not.

Parameters

  obj | The mapbuf object.

Returns
  `EINA_TRUE` means smooth map rendering is enabled. `EINA_FALSE` indicates it's disabled. If `obj` is `NULL`, `EINA_FALSE` is returned.

See Also
  elm_mapbuf_smooth_set() for details.

References elm_obj_mapbuf_smooth_get.

void elm_mapbuf_smooth_set | ( | Evas_Object * | obj,
|  | Eina_Bool | smooth
| ) |  |

Enable or disable smooth map rendering.

Parameters

  obj | The mapbuf object.
  smooth | `EINA_TRUE` to enable smooth map rendering or `EINA_FALSE` to disable it.

This sets smoothing for map rendering. If the object is a type that has its own smoothing settings, then both the smooth settings for this object and the map must be turned off.

By default smooth maps are enabled.

References elm_obj_mapbuf_smooth_set.

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