summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_textgrid_eo.legacy.h')
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.legacy.h252
1 files changed, 252 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.legacy.h b/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
new file mode 100644
index 0000000..9a99ce2
--- /dev/null
+++ b/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
@@ -0,0 +1,252 @@
1#ifndef _EVAS_TEXTGRID_EO_LEGACY_H_
2#define _EVAS_TEXTGRID_EO_LEGACY_H_
3
4#ifndef _EVAS_TEXTGRID_EO_CLASS_TYPE
5#define _EVAS_TEXTGRID_EO_CLASS_TYPE
6
7typedef Eo Evas_Textgrid;
8
9#endif
10
11#ifndef _EVAS_TEXTGRID_EO_TYPES
12#define _EVAS_TEXTGRID_EO_TYPES
13
14/** The palette to use for the foreground and background colors.
15 *
16 * @since 1.7
17 *
18 * @ingroup Evas_Textgrid
19 */
20typedef enum
21{
22 EVAS_TEXTGRID_PALETTE_NONE = 0, /**< No palette is used */
23 EVAS_TEXTGRID_PALETTE_STANDARD, /**< Standard palette (around 16 colors) */
24 EVAS_TEXTGRID_PALETTE_EXTENDED, /**< Extended palette (at max 256 colors) */
25 EVAS_TEXTGRID_PALETTE_LAST /**< Sentinel value to indicate last enum field
26 * during iteration */
27} Evas_Textgrid_Palette;
28
29/** The style to give to each character of the grid.
30 *
31 * @since 1.7
32 *
33 * @ingroup Evas_Textgrid
34 */
35typedef enum
36{
37 EVAS_TEXTGRID_FONT_STYLE_NORMAL = 1 /* 1 >> 0 */, /**< Normal style */
38 EVAS_TEXTGRID_FONT_STYLE_BOLD = 2 /* 1 >> 1 */, /**< Bold style */
39 EVAS_TEXTGRID_FONT_STYLE_ITALIC = 4 /* 1 >> 2 */ /**< Oblique style */
40} Evas_Textgrid_Font_Style;
41
42/** Evas textgrid cell data structure
43 *
44 * @ingroup Evas_Textgrid
45 */
46typedef struct _Evas_Textgrid_Cell Evas_Textgrid_Cell;
47
48
49#endif
50
51/**
52 * @brief This function is not implemented yet, do not use.
53 *
54 * @param[in] obj The object.
55 * @param[in] styles EVAS_TEXTGRID_FONT_STYLE_NORMAL
56 *
57 * @ingroup Evas_Object_Textgrid_Group
58 */
59EAPI void evas_object_textgrid_supported_font_styles_set(Evas_Textgrid *obj, Evas_Textgrid_Font_Style styles);
60
61/**
62 * @brief This function is not implemented yet, do not use.
63 *
64 * @param[in] obj The object.
65 *
66 * @return EVAS_TEXTGRID_FONT_STYLE_NORMAL
67 *
68 * @ingroup Evas_Object_Textgrid_Group
69 */
70EAPI Evas_Textgrid_Font_Style evas_object_textgrid_supported_font_styles_get(const Evas_Textgrid *obj);
71
72/**
73 * @brief Set the size of the textgrid object.
74 *
75 * This function sets the number of lines @c h and the number of columns @c w
76 * for the textgrid object @c obj. If @c w or @c h are less than or equal to 0,
77 * this function does nothing.
78 *
79 * @param[in] obj The object.
80 * @param[in] w The number of columns (width in cells) of the grid.
81 * @param[in] h The number of rows (height in cells) of the grid.
82 *
83 * @since 1.7
84 *
85 * @ingroup Evas_Object_Textgrid_Group
86 */
87EAPI void evas_object_textgrid_size_set(Evas_Textgrid *obj, int w, int h);
88
89/**
90 * @brief Get the size of the textgrid object.
91 *
92 * This function retrieves the number of lines in the buffer @c h and the
93 * number of columns in the buffer @c w of the textgrid object @c obj. @c w or
94 * @c h can be @c null. On error, they are set to 0.
95 *
96 * @param[in] obj The object.
97 * @param[out] w The number of columns (width in cells) of the grid.
98 * @param[out] h The number of rows (height in cells) of the grid.
99 *
100 * @since 1.7
101 *
102 * @ingroup Evas_Object_Textgrid_Group
103 */
104EAPI void evas_object_textgrid_size_get(const Evas_Textgrid *obj, int *w, int *h);
105
106/**
107 * @brief Retrieve the size of a cell of the given textgrid object in pixels.
108 *
109 * This functions retrieves the width and height, in pixels, of a cell of the
110 * textgrid object @c obj and stores them respectively in the buffers @c width
111 * and @c height. Their values depend on the monospace font and style used for
112 * the textgrid object. @c width and @c height can be @c null. On error, they
113 * are set to 0.
114 *
115 * See also @ref Efl.Text_Font.font.set and
116 * @ref evas_object_textgrid_supported_font_styles_set
117 *
118 * @param[in] obj The object.
119 * @param[out] width A pointer to the location to store the cell's width in
120 * pixels.
121 * @param[out] height A pointer to the location to store the cell's height in
122 * pixels.
123 *
124 * @since 1.7
125 *
126 * @ingroup Evas_Object_Textgrid_Group
127 */
128EAPI void evas_object_textgrid_cell_size_get(const Evas_Textgrid *obj, int *width, int *height);
129
130/**
131 * @brief Indicate for evas that part of a textgrid region (cells) has been
132 * updated.
133 *
134 * This function declares to evas that a region of cells was updated by code
135 * and needs refreshing.
136 *
137 * See also @ref evas_object_textgrid_cellrow_set,
138 * @ref evas_object_textgrid_cellrow_get and
139 * @ref evas_object_textgrid_size_set.
140 *
141 * @param[in] obj The object.
142 * @param[in] x The rect region of cells top-left x (column).
143 * @param[in] y The rect region of cells top-left y (row).
144 * @param[in] w The rect region size in number of cells (columns).
145 * @param[in] h The rect region size in number of cells (rows).
146 *
147 * @since 1.7
148 *
149 * @ingroup Evas_Object_Textgrid_Group
150 */
151EAPI void evas_object_textgrid_update_add(Evas_Textgrid *obj, int x, int y, int w, int h);
152
153/**
154 * @brief Set the string at the given row of the given textgrid object.
155 *
156 * This function returns cells to the textgrid taken by
157 * evas_object_textgrid_cellrow_get. The row pointer @c row should be the same
158 * row pointer returned by evas_object_textgrid_cellrow_get for the same row
159 * @c y.
160 *
161 * See also @ref evas_object_textgrid_cellrow_get,
162 * @ref evas_object_textgrid_size_set and @ref evas_object_textgrid_update_add.
163 *
164 * @param[in] obj The object.
165 * @param[in] y The row index of the grid.
166 * @param[in] row The string as a sequence of #Evas_Textgrid_Cell.
167 *
168 * @since 1.7
169 *
170 * @ingroup Evas_Object_Textgrid_Group
171 */
172EAPI void evas_object_textgrid_cellrow_set(Evas_Textgrid *obj, int y, const Evas_Textgrid_Cell *row);
173
174/**
175 * @brief Get the string at the given row of the given textgrid object.
176 *
177 * This function returns a pointer to the first cell of the line @c y of the
178 * textgrid object @c obj. If @c y is not between 0 and the number of lines of
179 * the grid - 1, or on error, this function return @c null.
180 *
181 * See also @ref evas_object_textgrid_cellrow_set,
182 * @ref evas_object_textgrid_size_set and @ref evas_object_textgrid_update_add.
183 *
184 * @param[in] obj The object.
185 * @param[in] y The row index of the grid.
186 *
187 * @return A pointer to the first cell of the given row.
188 *
189 * @since 1.7
190 *
191 * @ingroup Evas_Object_Textgrid_Group
192 */
193EAPI Evas_Textgrid_Cell *evas_object_textgrid_cellrow_get(const Evas_Textgrid *obj, int y);
194
195/**
196 * @brief The set color to the given palette at the given index of the given
197 * textgrid object.
198 *
199 * This function sets the color for the palette of type @c pal at the index
200 * @c idx of the textgrid object @c obj. The ARGB components are given by @c r,
201 * @c g, @c b and @c a. This color can be used when setting the
202 * #Evas_Textgrid_Cell structure. The components must set a pre-multiplied
203 * color. If pal is #EVAS_TEXTGRID_PALETTE_NONE or #EVAS_TEXTGRID_PALETTE_LAST,
204 * or if @c idx is not between 0 and 255, or on error, this function does
205 * nothing. The color components are clamped between 0 and 255. If @c idx is
206 * greater than the latest set color, the colors between this last index and
207 * @c idx - 1 are set to black (0, 0, 0, 0).
208 *
209 * See also @ref evas_object_textgrid_palette_get.
210 *
211 * @param[in] obj The object.
212 * @param[in] pal The type of the palette to set the color.
213 * @param[in] idx The index of the palette to which the color is stored.
214 * @param[in] r The red component of the color.
215 * @param[in] g The green component of the color.
216 * @param[in] b The blue component of the color.
217 * @param[in] a The alpha component of the color.
218 *
219 * @since 1.7
220 *
221 * @ingroup Evas_Object_Textgrid_Group
222 */
223EAPI void evas_object_textgrid_palette_set(Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
224
225/**
226 * @brief The retrieve color to the given palette at the given index of the
227 * given textgrid object.
228 *
229 * This function retrieves the color for the palette of type @c pal at the
230 * index @c idx of the textgrid object @c obj. The ARGB components are stored
231 * in the buffers @c r, @c g, @c b and @c a. If @c idx is not between 0 and the
232 * index of the latest set color, or if @c pal is #EVAS_TEXTGRID_PALETTE_NONE
233 * or #EVAS_TEXTGRID_PALETTE_LAST, the values of the components are 0. @c r,
234 * @c g, @c b and @c a can be @c null.
235 *
236 * See also @ref evas_object_textgrid_palette_set.
237 *
238 * @param[in] obj The object.
239 * @param[in] pal The type of the palette to set the color.
240 * @param[in] idx The index of the palette to which the color is stored.
241 * @param[out] r A pointer to the red component of the color.
242 * @param[out] g A pointer to the green component of the color.
243 * @param[out] b A pointer to the blue component of the color.
244 * @param[out] a A pointer to the alpha component of the color.
245 *
246 * @since 1.7
247 *
248 * @ingroup Evas_Object_Textgrid_Group
249 */
250EAPI void evas_object_textgrid_palette_get(const Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
251
252#endif