a824ac0055550a82a946e8078a226abfc99ff4bb
[framework/uifw/elementary.git] / src / lib / elm_mapbuf.h
1 /**
2  * @defgroup Mapbuf Mapbuf
3  * @ingroup Elementary
4  *
5  * @image html img/widget/mapbuf/preview-00.png
6  * @image latex img/widget/mapbuf/preview-00.eps width=\textwidth
7  *
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 <<<<<<< HEAD
12  * when you have a complex interafce, with a lot of elements, and will
13  * need to resize or move it frequently (the content object and its
14  * children).
15  *
16  * Default contents parts of the mapbuf widget that you can use for are:
17 =======
18  * when you have a complex interface, with a lot of elements, and will
19  * need to resize or move it frequently (the content object and its
20  * children).
21  *
22  * Default content parts of the mapbuf widget that you can use for are:
23 >>>>>>> remotes/origin/upstream
24  * @li "default" - A content of the mapbuf
25  *
26  * Supported elm_object common APIs.
27  * @li elm_object_part_content_set
28  * @li elm_object_part_content_get
29  * @li elm_object_part_content_unset
30  *
31  * To enable map, elm_mapbuf_enabled_set() should be used.
32  *
33  * See how to use this widget in this example:
34  * @ref mapbuf_example
35  */
36
37 /**
38  * @addtogroup Mapbuf
39  * @{
40  */
41
42 /**
43  * Add a new mapbuf widget to the given parent Elementary
44  * (container) object.
45  *
46  * @param parent The parent object.
47  * @return A new mapbuf widget handle or @c NULL, on errors.
48  *
49  * This function inserts a new mapbuf widget on the canvas.
50  *
51  * @ingroup Mapbuf
52  */
53 EAPI Evas_Object                 *elm_mapbuf_add(Evas_Object *parent);
54
55 /**
56  * Enable or disable the map.
57  *
58  * @param obj The mapbuf object.
59  * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it.
60  *
61  * This enables the map that is set or disables it. On enable, the object
62  * geometry will be saved, and the new geometry will change (position and
63  * size) to reflect the map geometry set.
64  *
65  * Also, when enabled, alpha and smooth states will be used, so if the
66  * content isn't solid, alpha should be enabled, for example, otherwise
67 <<<<<<< HEAD
68  * a black retangle will fill the content.
69 =======
70  * a black rectangle will fill the content.
71 >>>>>>> remotes/origin/upstream
72  *
73  * When disabled, the stored map will be freed and geometry prior to
74  * enabling the map will be restored.
75  *
76  * It's disabled by default.
77  *
78  * @see elm_mapbuf_alpha_set()
79  * @see elm_mapbuf_smooth_set()
80  *
81  * @ingroup Mapbuf
82  */
83 EAPI void                         elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled);
84
85 /**
86  * Get a value whether map is enabled or not.
87  *
88  * @param obj The mapbuf object.
89  * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates
90  * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
91  *
92  * @see elm_mapbuf_enabled_set() for details.
93  *
94  * @ingroup Mapbuf
95  */
96 EAPI Eina_Bool                    elm_mapbuf_enabled_get(const Evas_Object *obj);
97
98 /**
99  * Enable or disable smooth map rendering.
100  *
101  * @param obj The mapbuf object.
102  * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE
103  * to disable it.
104  *
105  * This sets smoothing for map rendering. If the object is a type that has
106  * its own smoothing settings, then both the smooth settings for this object
107  * and the map must be turned off.
108  *
109  * By default smooth maps are enabled.
110  *
111  * @ingroup Mapbuf
112  */
113 EAPI void                         elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth);
114
115 /**
116  * Get a value whether smooth map rendering is enabled or not.
117  *
118  * @param obj The mapbuf object.
119  * @return @c EINA_TRUE means smooth map rendering is enabled. @c EINA_FALSE
120  * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
121  *
122  * @see elm_mapbuf_smooth_set() for details.
123  *
124  * @ingroup Mapbuf
125  */
126 EAPI Eina_Bool                    elm_mapbuf_smooth_get(const Evas_Object *obj);
127
128 /**
129  * Set or unset alpha flag for map rendering.
130  *
131  * @param obj The mapbuf object.
132  * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE
133  * to disable it.
134  *
135  * This sets alpha flag for map rendering. If the object is a type that has
136  * its own alpha settings, then this will take precedence. Only image objects
137  * have this currently. It stops alpha blending of the map area, and is
138  * useful if you know the object and/or all sub-objects is 100% solid.
139  *
140  * Alpha is enabled by default.
141  *
142  * @ingroup Mapbuf
143  */
144 EAPI void                         elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha);
145
146 /**
147  * Get a value whether alpha blending is enabled or not.
148  *
149  * @param obj The mapbuf object.
150  * @return @c EINA_TRUE means alpha blending is enabled. @c EINA_FALSE
151  * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
152  *
153  * @see elm_mapbuf_alpha_set() for details.
154  *
155  * @ingroup Mapbuf
156  */
157 EAPI Eina_Bool                    elm_mapbuf_alpha_get(const Evas_Object *obj);
158
159 /**
160  * @}
161  */