summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_mapbuf_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_mapbuf_eo.h')
-rw-r--r--src/lib/elementary/elm_mapbuf_eo.h188
1 files changed, 188 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_mapbuf_eo.h b/src/lib/elementary/elm_mapbuf_eo.h
new file mode 100644
index 0000000..b9ba3f2
--- /dev/null
+++ b/src/lib/elementary/elm_mapbuf_eo.h
@@ -0,0 +1,188 @@
1#ifndef _ELM_MAPBUF_EO_H_
2#define _ELM_MAPBUF_EO_H_
3
4#ifndef _ELM_MAPBUF_EO_CLASS_TYPE
5#define _ELM_MAPBUF_EO_CLASS_TYPE
6
7typedef Eo Elm_Mapbuf;
8
9#endif
10
11#ifndef _ELM_MAPBUF_EO_TYPES
12#define _ELM_MAPBUF_EO_TYPES
13
14
15#endif
16/** Elementary mapbuf class
17 *
18 * @ingroup Elm_Mapbuf
19 */
20#define ELM_MAPBUF_CLASS elm_mapbuf_class_get()
21
22EWAPI const Efl_Class *elm_mapbuf_class_get(void);
23
24/**
25 * @brief Set or unset auto flag for map rendering.
26 *
27 * When a ampbuf object has "auto mode" enabled, then it will enable and
28 * disable map mode based on current visibility. Mapbuf will track if you show
29 * or hide it AND if the object is inside the canvas viewport or not when it is
30 * moved or resized. Note that if you turn automode off, then map mode will be
31 * in a disabled state at this point. When you turn it on for the first time,
32 * the current state will be evaluated base on current properties of the mapbuf
33 * object.
34 *
35 * Auto mode is disabled by default.
36 *
37 * @param[in] obj The object.
38 * @param[in] on The auto mode state.
39 *
40 * @ingroup Elm_Mapbuf
41 */
42EOAPI void elm_private_mapbuf_auto_set(Eo *obj, Eina_Bool on);
43
44/**
45 * @brief Get a value whether auto mode is enabled or not.
46 *
47 * @param[in] obj The object.
48 *
49 * @return The auto mode state.
50 *
51 * @ingroup Elm_Mapbuf
52 */
53EOAPI Eina_Bool elm_private_mapbuf_auto_get(const Eo *obj);
54
55/**
56 * @brief Enable or disable smooth map rendering.
57 *
58 * This sets smoothing for map rendering. If the object is a type that has its
59 * own smoothing settings, then both the smooth settings for this object and
60 * the map must be turned off.
61 *
62 * By default smooth maps are enabled.
63 *
64 * @param[in] obj The object.
65 * @param[in] smooth The smooth mode state.
66 *
67 * @ingroup Elm_Mapbuf
68 */
69EOAPI void elm_private_mapbuf_smooth_set(Eo *obj, Eina_Bool smooth);
70
71/**
72 * @brief Get a value whether smooth map rendering is enabled or not.
73 *
74 * @param[in] obj The object.
75 *
76 * @return The smooth mode state.
77 *
78 * @ingroup Elm_Mapbuf
79 */
80EOAPI Eina_Bool elm_private_mapbuf_smooth_get(const Eo *obj);
81
82/**
83 * @brief Set or unset alpha flag for map rendering.
84 *
85 * This sets alpha flag for map rendering. If the object is a type that has its
86 * own alpha settings, then this will take precedence. Only image objects have
87 * this currently. It stops alpha blending of the map area, and is useful if
88 * you know the object and/or all sub-objects is 100% solid.
89 *
90 * Alpha is enabled by default.
91 *
92 * @param[in] obj The object.
93 * @param[in] alpha The alpha state.
94 *
95 * @ingroup Elm_Mapbuf
96 */
97EOAPI void elm_private_mapbuf_alpha_set(Eo *obj, Eina_Bool alpha);
98
99/**
100 * @brief Get a value whether alpha blending is enabled or not.
101 *
102 * @param[in] obj The object.
103 *
104 * @return The alpha state.
105 *
106 * @ingroup Elm_Mapbuf
107 */
108EOAPI Eina_Bool elm_private_mapbuf_alpha_get(const Eo *obj);
109
110/**
111 * @brief Enable or disable the map.
112 *
113 * This enables the map that is set or disables it. On enable, the object
114 * geometry will be saved, and the new geometry will change (position and size)
115 * to reflect the map geometry set.
116 *
117 * Also, when enabled, alpha and smooth states will be used, so if the content
118 * isn't solid, alpha should be enabled, for example, otherwise a black
119 * rectangle will fill the content.
120 *
121 * When disabled, the stored map will be freed and geometry prior to enabling
122 * the map will be restored.
123 *
124 * It's disabled by default.
125 *
126 * @param[in] obj The object.
127 * @param[in] enabled The enabled state.
128 *
129 * @ingroup Elm_Mapbuf
130 */
131EOAPI void elm_private_mapbuf_enabled_set(Eo *obj, Eina_Bool enabled);
132
133/**
134 * @brief Get a value whether map is enabled or not.
135 *
136 * @param[in] obj The object.
137 *
138 * @return The enabled state.
139 *
140 * @ingroup Elm_Mapbuf
141 */
142EOAPI Eina_Bool elm_private_mapbuf_enabled_get(const Eo *obj);
143
144/**
145 * @brief The color of a point (vertex) in the mapbuf.
146 *
147 * This represents the color of the vertex in the mapbuf. Colors will be
148 * linearly interpolated between vertex points through the mapbuf. Color will
149 * multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
150 * color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
151 * means it will have no effect on modifying the texture pixels.
152 *
153 * @param[in] obj The object.
154 * @param[in] idx Index of point to change, from 0 to 3.
155 * @param[in] r Red (0 - 255)
156 * @param[in] g Green (0 - 255)
157 * @param[in] b Blue (0 - 255)
158 * @param[in] a Alpha (0 - 255)
159 *
160 * @since 1.9
161 *
162 * @ingroup Elm_Mapbuf
163 */
164EOAPI void elm_private_mapbuf_point_color_set(Eo *obj, int idx, int r, int g, int b, int a);
165
166/**
167 * @brief The color of a point (vertex) in the mapbuf.
168 *
169 * This represents the color of the vertex in the mapbuf. Colors will be
170 * linearly interpolated between vertex points through the mapbuf. Color will
171 * multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default
172 * color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which
173 * means it will have no effect on modifying the texture pixels.
174 *
175 * @param[in] obj The object.
176 * @param[in] idx Index of point to change, from 0 to 3.
177 * @param[out] r Red (0 - 255)
178 * @param[out] g Green (0 - 255)
179 * @param[out] b Blue (0 - 255)
180 * @param[out] a Alpha (0 - 255)
181 *
182 * @since 1.9
183 *
184 * @ingroup Elm_Mapbuf
185 */
186EOAPI void elm_private_mapbuf_point_color_get(const Eo *obj, int idx, int *r, int *g, int *b, int *a);
187
188#endif