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