summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_text_eo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_text_eo.c')
-rw-r--r--src/lib/evas/canvas/evas_text_eo.c296
1 files changed, 296 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_text_eo.c b/src/lib/evas/canvas/evas_text_eo.c
new file mode 100644
index 0000000..2632a10
--- /dev/null
+++ b/src/lib/evas/canvas/evas_text_eo.c
@@ -0,0 +1,296 @@
1
2void _evas_text_shadow_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
3
4EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_shadow_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
5
6void _evas_text_shadow_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
7
8EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_shadow_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
9
10void _evas_text_ellipsis_set(Eo *obj, Evas_Text_Data *pd, double ellipsis);
11
12
13static Eina_Error
14__eolian_evas_text_ellipsis_set_reflect(Eo *obj, Eina_Value val)
15{
16 Eina_Error r = 0; double cval;
17 if (!eina_value_double_convert(&val, &cval))
18 {
19 r = EINA_ERROR_VALUE_FAILED;
20 goto end;
21 }
22 evas_obj_text_ellipsis_set(obj, cval);
23 end:
24 eina_value_flush(&val);
25 return r;
26}
27
28EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_ellipsis_set, EFL_FUNC_CALL(ellipsis), double ellipsis);
29
30double _evas_text_ellipsis_get(const Eo *obj, Evas_Text_Data *pd);
31
32
33static Eina_Value
34__eolian_evas_text_ellipsis_get_reflect(Eo *obj)
35{
36 double val = evas_obj_text_ellipsis_get(obj);
37 return eina_value_double_init(val);
38}
39
40EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_ellipsis_get, double, -1.000000 /* +1.000000 */);
41
42void _evas_text_bidi_delimiters_set(Eo *obj, Evas_Text_Data *pd, const char *delim);
43
44
45static Eina_Error
46__eolian_evas_text_bidi_delimiters_set_reflect(Eo *obj, Eina_Value val)
47{
48 Eina_Error r = 0; const char *cval;
49 if (!eina_value_string_convert(&val, &cval))
50 {
51 r = EINA_ERROR_VALUE_FAILED;
52 goto end;
53 }
54 evas_obj_text_bidi_delimiters_set(obj, cval);
55 end:
56 eina_value_flush(&val);
57 return r;
58}
59
60EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_bidi_delimiters_set, EFL_FUNC_CALL(delim), const char *delim);
61
62const char *_evas_text_bidi_delimiters_get(const Eo *obj, Evas_Text_Data *pd);
63
64
65static Eina_Value
66__eolian_evas_text_bidi_delimiters_get_reflect(Eo *obj)
67{
68 const char *val = evas_obj_text_bidi_delimiters_get(obj);
69 return eina_value_string_init(val);
70}
71
72EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_bidi_delimiters_get, const char *, NULL);
73
74void _evas_text_outline_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
75
76EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_outline_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
77
78void _evas_text_outline_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
79
80EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_outline_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
81
82void _evas_text_glow2_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
83
84EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_glow2_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
85
86void _evas_text_glow2_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
87
88EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_glow2_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
89
90void _evas_text_style_set(Eo *obj, Evas_Text_Data *pd, Evas_Text_Style_Type style);
91
92EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_style_set, EFL_FUNC_CALL(style), Evas_Text_Style_Type style);
93
94Evas_Text_Style_Type _evas_text_style_get(const Eo *obj, Evas_Text_Data *pd);
95
96EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_style_get, Evas_Text_Style_Type, 0);
97
98void _evas_text_glow_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
99
100EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_glow_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
101
102void _evas_text_glow_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
103
104EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_glow_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
105
106int _evas_text_max_descent_get(const Eo *obj, Evas_Text_Data *pd);
107
108EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_max_descent_get, int, 0);
109
110void _evas_text_style_pad_get(const Eo *obj, Evas_Text_Data *pd, int *l, int *r, int *t, int *b);
111
112EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_style_pad_get, EFL_FUNC_CALL(l, r, t, b), int *l, int *r, int *t, int *b);
113
114Efl_Text_Bidirectional_Type _evas_text_direction_get(const Eo *obj, Evas_Text_Data *pd);
115
116EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_direction_get, Efl_Text_Bidirectional_Type, 0);
117
118int _evas_text_ascent_get(const Eo *obj, Evas_Text_Data *pd);
119
120EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_ascent_get, int, 0);
121
122int _evas_text_horiz_advance_get(const Eo *obj, Evas_Text_Data *pd);
123
124EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_horiz_advance_get, int, 0);
125
126int _evas_text_inset_get(const Eo *obj, Evas_Text_Data *pd);
127
128EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_inset_get, int, 0);
129
130int _evas_text_max_ascent_get(const Eo *obj, Evas_Text_Data *pd);
131
132EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_max_ascent_get, int, 0);
133
134int _evas_text_vert_advance_get(const Eo *obj, Evas_Text_Data *pd);
135
136EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_vert_advance_get, int, 0);
137
138int _evas_text_descent_get(const Eo *obj, Evas_Text_Data *pd);
139
140EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_descent_get, int, 0);
141
142int _evas_text_last_up_to_pos(const Eo *obj, Evas_Text_Data *pd, int x, int y);
143
144EOAPI EFL_FUNC_BODYV_CONST(evas_obj_text_last_up_to_pos, int, -1 /* +1 */, EFL_FUNC_CALL(x, y), int x, int y);
145
146int _evas_text_char_coords_get(const Eo *obj, Evas_Text_Data *pd, int x, int y, int *cx, int *cy, int *cw, int *ch);
147
148EOAPI EFL_FUNC_BODYV_CONST(evas_obj_text_char_coords_get, int, 0, EFL_FUNC_CALL(x, y, cx, cy, cw, ch), int x, int y, int *cx, int *cy, int *cw, int *ch);
149
150Eina_Bool _evas_text_char_pos_get(const Eo *obj, Evas_Text_Data *pd, int pos, int *cx, int *cy, int *cw, int *ch);
151
152EOAPI EFL_FUNC_BODYV_CONST(evas_obj_text_char_pos_get, Eina_Bool, 0, EFL_FUNC_CALL(pos, cx, cy, cw, ch), int pos, int *cx, int *cy, int *cw, int *ch);
153
154Efl_Object *_evas_text_efl_object_constructor(Eo *obj, Evas_Text_Data *pd);
155
156
157void _evas_text_efl_object_destructor(Eo *obj, Evas_Text_Data *pd);
158
159
160void _evas_text_efl_gfx_entity_size_set(Eo *obj, Evas_Text_Data *pd, Eina_Size2D size);
161
162
163void _evas_text_efl_gfx_entity_scale_set(Eo *obj, Evas_Text_Data *pd, double scale);
164
165
166void _evas_text_efl_text_text_set(Eo *obj, Evas_Text_Data *pd, const char *text);
167
168
169const char *_evas_text_efl_text_text_get(const Eo *obj, Evas_Text_Data *pd);
170
171
172void _evas_text_efl_text_font_font_set(Eo *obj, Evas_Text_Data *pd, const char *font, Efl_Font_Size size);
173
174
175void _evas_text_efl_text_font_font_get(const Eo *obj, Evas_Text_Data *pd, const char **font, Efl_Font_Size *size);
176
177
178void _evas_text_efl_text_font_font_source_set(Eo *obj, Evas_Text_Data *pd, const char *font_source);
179
180
181const char *_evas_text_efl_text_font_font_source_get(const Eo *obj, Evas_Text_Data *pd);
182
183
184void _evas_text_efl_text_font_font_bitmap_scalable_set(Eo *obj, Evas_Text_Data *pd, Efl_Text_Font_Bitmap_Scalable scalable);
185
186
187Efl_Text_Font_Bitmap_Scalable _evas_text_efl_text_font_font_bitmap_scalable_get(const Eo *obj, Evas_Text_Data *pd);
188
189
190void _evas_text_efl_gfx_filter_filter_program_set(Eo *obj, Evas_Text_Data *pd, const char *code, const char *name);
191
192
193void _evas_text_efl_canvas_filter_internal_filter_dirty(Eo *obj, Evas_Text_Data *pd);
194
195
196Eina_Bool _evas_text_efl_canvas_filter_internal_filter_input_alpha(Eo *obj, Evas_Text_Data *pd);
197
198
199Eina_Bool _evas_text_efl_canvas_filter_internal_filter_input_render(Eo *obj, Evas_Text_Data *pd, void *filter, void *engine, void *output, void *drawctx, void *data, int l, int r, int t, int b, int x, int y, Eina_Bool do_async);
200
201
202void _evas_text_efl_canvas_filter_internal_filter_state_prepare(Eo *obj, Evas_Text_Data *pd, Efl_Canvas_Filter_State *state, void *data);
203
204
205void _evas_text_efl_canvas_object_paragraph_direction_set(Eo *obj, Evas_Text_Data *pd, Efl_Text_Bidirectional_Type dir);
206
207
208Efl_Text_Bidirectional_Type _evas_text_efl_canvas_object_paragraph_direction_get(const Eo *obj, Evas_Text_Data *pd);
209
210
211static Eina_Bool
212_evas_text_class_initializer(Efl_Class *klass)
213{
214 const Efl_Object_Ops *opsp = NULL;
215
216 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
217
218#ifndef EVAS_TEXT_EXTRA_OPS
219#define EVAS_TEXT_EXTRA_OPS
220#endif
221
222 EFL_OPS_DEFINE(ops,
223 EFL_OBJECT_OP_FUNC(evas_obj_text_shadow_color_set, _evas_text_shadow_color_set),
224 EFL_OBJECT_OP_FUNC(evas_obj_text_shadow_color_get, _evas_text_shadow_color_get),
225 EFL_OBJECT_OP_FUNC(evas_obj_text_ellipsis_set, _evas_text_ellipsis_set),
226 EFL_OBJECT_OP_FUNC(evas_obj_text_ellipsis_get, _evas_text_ellipsis_get),
227 EFL_OBJECT_OP_FUNC(evas_obj_text_bidi_delimiters_set, _evas_text_bidi_delimiters_set),
228 EFL_OBJECT_OP_FUNC(evas_obj_text_bidi_delimiters_get, _evas_text_bidi_delimiters_get),
229 EFL_OBJECT_OP_FUNC(evas_obj_text_outline_color_set, _evas_text_outline_color_set),
230 EFL_OBJECT_OP_FUNC(evas_obj_text_outline_color_get, _evas_text_outline_color_get),
231 EFL_OBJECT_OP_FUNC(evas_obj_text_glow2_color_set, _evas_text_glow2_color_set),
232 EFL_OBJECT_OP_FUNC(evas_obj_text_glow2_color_get, _evas_text_glow2_color_get),
233 EFL_OBJECT_OP_FUNC(evas_obj_text_style_set, _evas_text_style_set),
234 EFL_OBJECT_OP_FUNC(evas_obj_text_style_get, _evas_text_style_get),
235 EFL_OBJECT_OP_FUNC(evas_obj_text_glow_color_set, _evas_text_glow_color_set),
236 EFL_OBJECT_OP_FUNC(evas_obj_text_glow_color_get, _evas_text_glow_color_get),
237 EFL_OBJECT_OP_FUNC(evas_obj_text_max_descent_get, _evas_text_max_descent_get),
238 EFL_OBJECT_OP_FUNC(evas_obj_text_style_pad_get, _evas_text_style_pad_get),
239 EFL_OBJECT_OP_FUNC(evas_obj_text_direction_get, _evas_text_direction_get),
240 EFL_OBJECT_OP_FUNC(evas_obj_text_ascent_get, _evas_text_ascent_get),
241 EFL_OBJECT_OP_FUNC(evas_obj_text_horiz_advance_get, _evas_text_horiz_advance_get),
242 EFL_OBJECT_OP_FUNC(evas_obj_text_inset_get, _evas_text_inset_get),
243 EFL_OBJECT_OP_FUNC(evas_obj_text_max_ascent_get, _evas_text_max_ascent_get),
244 EFL_OBJECT_OP_FUNC(evas_obj_text_vert_advance_get, _evas_text_vert_advance_get),
245 EFL_OBJECT_OP_FUNC(evas_obj_text_descent_get, _evas_text_descent_get),
246 EFL_OBJECT_OP_FUNC(evas_obj_text_last_up_to_pos, _evas_text_last_up_to_pos),
247 EFL_OBJECT_OP_FUNC(evas_obj_text_char_coords_get, _evas_text_char_coords_get),
248 EFL_OBJECT_OP_FUNC(evas_obj_text_char_pos_get, _evas_text_char_pos_get),
249 EFL_OBJECT_OP_FUNC(efl_constructor, _evas_text_efl_object_constructor),
250 EFL_OBJECT_OP_FUNC(efl_destructor, _evas_text_efl_object_destructor),
251 EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _evas_text_efl_gfx_entity_size_set),
252 EFL_OBJECT_OP_FUNC(efl_gfx_entity_scale_set, _evas_text_efl_gfx_entity_scale_set),
253 EFL_OBJECT_OP_FUNC(efl_text_set, _evas_text_efl_text_text_set),
254 EFL_OBJECT_OP_FUNC(efl_text_get, _evas_text_efl_text_text_get),
255 EFL_OBJECT_OP_FUNC(efl_text_font_set, _evas_text_efl_text_font_font_set),
256 EFL_OBJECT_OP_FUNC(efl_text_font_get, _evas_text_efl_text_font_font_get),
257 EFL_OBJECT_OP_FUNC(efl_text_font_source_set, _evas_text_efl_text_font_font_source_set),
258 EFL_OBJECT_OP_FUNC(efl_text_font_source_get, _evas_text_efl_text_font_font_source_get),
259 EFL_OBJECT_OP_FUNC(efl_text_font_bitmap_scalable_set, _evas_text_efl_text_font_font_bitmap_scalable_set),
260 EFL_OBJECT_OP_FUNC(efl_text_font_bitmap_scalable_get, _evas_text_efl_text_font_font_bitmap_scalable_get),
261 EFL_OBJECT_OP_FUNC(efl_gfx_filter_program_set, _evas_text_efl_gfx_filter_filter_program_set),
262 EFL_OBJECT_OP_FUNC(evas_filter_dirty, _evas_text_efl_canvas_filter_internal_filter_dirty),
263 EFL_OBJECT_OP_FUNC(evas_filter_input_alpha, _evas_text_efl_canvas_filter_internal_filter_input_alpha),
264 EFL_OBJECT_OP_FUNC(evas_filter_input_render, _evas_text_efl_canvas_filter_internal_filter_input_render),
265 EFL_OBJECT_OP_FUNC(evas_filter_state_prepare, _evas_text_efl_canvas_filter_internal_filter_state_prepare),
266 EFL_OBJECT_OP_FUNC(efl_canvas_object_paragraph_direction_set, _evas_text_efl_canvas_object_paragraph_direction_set),
267 EFL_OBJECT_OP_FUNC(efl_canvas_object_paragraph_direction_get, _evas_text_efl_canvas_object_paragraph_direction_get),
268 EVAS_TEXT_EXTRA_OPS
269 );
270 opsp = &ops;
271
272 static const Efl_Object_Property_Reflection refl_table[] = {
273 {"ellipsis", __eolian_evas_text_ellipsis_set_reflect, __eolian_evas_text_ellipsis_get_reflect},
274 {"bidi_delimiters", __eolian_evas_text_bidi_delimiters_set_reflect, __eolian_evas_text_bidi_delimiters_get_reflect},
275 };
276 static const Efl_Object_Property_Reflection_Ops rops = {
277 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
278 };
279 ropsp = &rops;
280
281 return efl_class_functions_set(klass, opsp, ropsp);
282}
283
284static const Efl_Class_Description _evas_text_class_desc = {
285 EO_VERSION,
286 "Evas.Text",
287 EFL_CLASS_TYPE_REGULAR,
288 sizeof(Evas_Text_Data),
289 _evas_text_class_initializer,
290 NULL,
291 NULL
292};
293
294EFL_DEFINE_CLASS(evas_text_class_get, &_evas_text_class_desc, EFL_CANVAS_OBJECT_CLASS, EFL_TEXT_INTERFACE, EFL_TEXT_FONT_INTERFACE, EFL_CANVAS_FILTER_INTERNAL_MIXIN, NULL);
295
296#include "evas_text_eo.legacy.c"