2 * @defgroup Mapbuf Mapbuf
5 * @image html img/widget/mapbuf/preview-00.png
6 * @image latex img/widget/mapbuf/preview-00.eps width=\textwidth
8 * This holds one content object and uses an Evas Map of transformation
9 * points to be later used with this content. So the content will be
10 * moved, resized, etc as a single image. So it will improve performance
11 * when you have a complex interafce, with a lot of elements, and will
12 * need to resize or move it frequently (the content object and its
15 * Default contents parts of the mapbuf widget that you can use for are:
16 * @li "default" - A content of the mapbuf
18 * To enable map, elm_mapbuf_enabled_set() should be used.
20 * See how to use this widget in this example:
30 * Add a new mapbuf widget to the given parent Elementary
33 * @param parent The parent object.
34 * @return A new mapbuf widget handle or @c NULL, on errors.
36 * This function inserts a new mapbuf widget on the canvas.
40 EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent);
43 * Enable or disable the map.
45 * @param obj The mapbuf object.
46 * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it.
48 * This enables the map that is set or disables it. On enable, the object
49 * geometry will be saved, and the new geometry will change (position and
50 * size) to reflect the map geometry set.
52 * Also, when enabled, alpha and smooth states will be used, so if the
53 * content isn't solid, alpha should be enabled, for example, otherwise
54 * a black retangle will fill the content.
56 * When disabled, the stored map will be freed and geometry prior to
57 * enabling the map will be restored.
59 * It's disabled by default.
61 * @see elm_mapbuf_alpha_set()
62 * @see elm_mapbuf_smooth_set()
66 EAPI void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled);
69 * Get a value whether map is enabled or not.
71 * @param obj The mapbuf object.
72 * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates
73 * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
75 * @see elm_mapbuf_enabled_set() for details.
79 EAPI Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj);
82 * Enable or disable smooth map rendering.
84 * @param obj The mapbuf object.
85 * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE
88 * This sets smoothing for map rendering. If the object is a type that has
89 * its own smoothing settings, then both the smooth settings for this object
90 * and the map must be turned off.
92 * By default smooth maps are enabled.
96 EAPI void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth);
99 * Get a value whether smooth map rendering is enabled or not.
101 * @param obj The mapbuf object.
102 * @return @c EINA_TRUE means smooth map rendering is enabled. @c EINA_FALSE
103 * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
105 * @see elm_mapbuf_smooth_set() for details.
109 EAPI Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj);
112 * Set or unset alpha flag for map rendering.
114 * @param obj The mapbuf object.
115 * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE
118 * This sets alpha flag for map rendering. If the object is a type that has
119 * its own alpha settings, then this will take precedence. Only image objects
120 * have this currently. It stops alpha blending of the map area, and is
121 * useful if you know the object and/or all sub-objects is 100% solid.
123 * Alpha is enabled by default.
127 EAPI void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha);
130 * Get a value whether alpha blending is enabled or not.
132 * @param obj The mapbuf object.
133 * @return @c EINA_TRUE means alpha blending is enabled. @c EINA_FALSE
134 * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
136 * @see elm_mapbuf_alpha_set() for details.
140 EAPI Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj);