2 # include "elementary_config.h"
5 #define ELM_LAYOUT_PROTECTED
7 #include <Elementary.h>
10 #include "elm_widget_layout.h"
11 //#include "efl_ui_textpath_internal_part.eo.h"
12 //#include "elm_part_helper.h"
15 #define MY_CLASS EFL_UI_TEXTPATH_CLASS
17 #define MY_CLASS_NAME "Efl.Ui.Textpath"
18 #define MY_CLASS_NAME_LEGACY "elm_textpath"
20 #define SLICE_DEFAULT_NO 99
22 typedef struct _Efl_Ui_Textpath_Point Efl_Ui_Textpath_Point;
23 typedef struct _Efl_Ui_Textpath_Line Efl_Ui_Textpath_Line;
24 typedef struct _Efl_Ui_Textpath_Segment Efl_Ui_Textpath_Segment;
25 typedef struct _Efl_Ui_Textpath_Data Efl_Ui_Textpath_Data;
27 struct _Efl_Ui_Textpath_Point
33 struct _Efl_Ui_Textpath_Line
35 Efl_Ui_Textpath_Point start;
36 Efl_Ui_Textpath_Point end;
39 struct _Efl_Ui_Textpath_Segment
43 Efl_Gfx_Path_Command type;
47 Efl_Ui_Textpath_Line line;
51 /* If you need to draw slices using Evas Line,
52 * define the following debug flag manually. */
53 //#define EFL_UI_TEXTPATH_LINE_DEBUG
55 struct _Efl_Ui_Textpath_Data
57 Evas_Object *text_obj;
65 Efl_Ui_Textpath_Direction direction;
70 Eina_Inlist *segments;
72 #ifdef EFL_UI_TEXTPATH_LINE_DEBUG
77 #define EFL_UI_TEXTPATH_DATA_GET(o, sd) \
78 Efl_Ui_Textpath_Data *sd = eo_data_scope_get(o, EFL_UI_TEXTPATH_CLASS)
81 _deg_to_rad(double angle)
83 return angle / 180 * M_PI;
87 _segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, double dt, double dist,
88 int w1, int cmp, Evas_Map *map, Eina_Bezier bezier,
89 int *last_x1, int *last_y1, int *last_x2, int *last_y2)
91 int x = 0, y = 0, w = 0, h = 0;
93 double u0, u1, v0, v1;
95 double px, py, px2, py2;
97 Eina_Vector2 vec, nvec, vec0, vec1, vec2, vec3;
99 #ifdef EFL_UI_TEXTPATH_LINE_DEBUG
100 static Eina_Bool yello_color_flag = EINA_FALSE;
101 yello_color_flag = !yello_color_flag;
104 evas_object_geometry_get(pd->text_obj, NULL, NULL, &w, &h);
106 rad = _deg_to_rad(90);
107 eina_matrix2_values_set(&mat, cos(rad), -sin(rad), sin(rad), cos(rad));
109 eina_bezier_values_get(&bezier, NULL, NULL, NULL, NULL, NULL, NULL, &px2, &py2);
111 eina_bezier_point_at(&bezier, t, &px, &py);
112 eina_bezier_point_at(&bezier, t + dt, &px2, &py2);
116 eina_vector2_normalize(&nvec, &vec);
118 eina_vector2_transform(&vec, &mat, &nvec);
119 eina_vector2_normalize(&nvec, &vec);
120 eina_vector2_scale(&vec, &nvec, ((double) h) * 0.5);
122 vec1.x = (vec.x + px);
123 vec1.y = (vec.y + py);
124 vec2.x = (-vec.x + px);
125 vec2.y = (-vec.y + py);
129 *last_x1 = (int) floor(vec1.x + x + 0.5);
130 *last_y1 = (int) floor(vec1.y + y + 0.5);
131 *last_x2 = (int) floor(vec2.x + x + 0.5);
132 *last_y2 = (int) floor(vec2.y + y + 0.5);
136 for (i = 0; i < slice_no; i++)
158 /* If u1 is modified not to exceed its end,
159 * modify next_dt according to changes of dist. */
161 next_dt = dt * (u1 - u0) / dist;
164 t = (double) (i * dt) + next_dt;
165 eina_bezier_point_at(&bezier, t, &px, &py);
166 eina_bezier_point_at(&bezier, t + next_dt, &px2, &py2);
170 eina_vector2_normalize(&nvec, &vec);
171 eina_vector2_transform(&vec, &mat, &nvec);
172 eina_vector2_normalize(&nvec, &vec);
173 eina_vector2_scale(&vec, &nvec, ((double) h) * 0.5);
175 vec1.x = (vec.x + px);
176 vec1.y = (vec.y + py);
177 vec2.x = (-vec.x + px);
178 vec2.y = (-vec.y + py);
180 /* Set mp1, mp2 position according to difference between previous points and next points.
181 * It improves smoothness of curve's slope changing. */
184 mp1_x = *last_x1 + (int) floor(vec1.x - vec0.x + 0.5);
185 mp1_y = *last_y1 + (int) floor(vec1.y - vec0.y + 0.5);
186 mp2_x = *last_x2 + (int) floor(vec2.x - vec3.x + 0.5);
187 mp2_y = *last_y2 + (int) floor(vec2.y - vec3.y + 0.5);
191 evas_map_point_coord_set(map, cmp + i * 4, mp0_x, mp0_y, 0);
192 evas_map_point_coord_set(map, cmp + i * 4 + 1, mp1_x, mp1_y, 0);
193 evas_map_point_coord_set(map, cmp + i * 4 + 2, mp2_x, mp2_y, 0);
194 evas_map_point_coord_set(map, cmp + i * 4 + 3, mp3_x, mp3_y, 0);
196 evas_map_point_image_uv_set(map, cmp + i * 4, u0, v0);
197 evas_map_point_image_uv_set(map, cmp + i * 4 + 1, u1, v0);
198 evas_map_point_image_uv_set(map, cmp + i * 4 + 2, u1, v1);
199 evas_map_point_image_uv_set(map, cmp + i * 4 + 3, u0, v1);
206 #ifdef EFL_UI_TEXTPATH_LINE_DEBUG
207 Evas_Object *line = evas_object_line_add(evas_object_evas_get(pd->text_obj));
208 pd->lines = eina_list_append(pd->lines, line);
209 if (yello_color_flag)
210 evas_object_color_set(line, 255, 255, 0, 255);
212 evas_object_color_set(line, 255, 0, 0, 255);
213 evas_object_line_xy_set(line,
216 evas_object_show(line);
218 line = evas_object_line_add(evas_object_evas_get(pd->text_obj));
219 pd->lines = eina_list_append(pd->lines, line);
220 if (yello_color_flag)
221 evas_object_color_set(line, 255, 255, 0, 255);
223 evas_object_color_set(line, 255, 0, 0, 255);
224 evas_object_line_xy_set(line,
227 evas_object_show(line);
229 line = evas_object_line_add(evas_object_evas_get(pd->text_obj));
230 pd->lines = eina_list_append(pd->lines, line);
231 if (yello_color_flag)
232 evas_object_color_set(line, 255, 255, 0, 255);
234 evas_object_color_set(line, 255, 0, 0, 255);
235 evas_object_line_xy_set(line,
238 evas_object_show(line);
240 line = evas_object_line_add(evas_object_evas_get(pd->text_obj));
241 pd->lines = eina_list_append(pd->lines, line);
242 if (yello_color_flag)
243 evas_object_color_set(line, 255, 255, 0, 255);
245 evas_object_color_set(line, 255, 0, 0, 255);
246 evas_object_line_xy_set(line,
249 evas_object_show(line);
257 _text_on_line_draw(Efl_Ui_Textpath_Data *pd, int w1, int w2, int cmp, Evas_Map *map, Efl_Ui_Textpath_Line line)
259 double x1, x2, y1, y2;
260 Evas_Coord x, y, w, h;
261 double line_len, len, sina, cosa;
268 line_len = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
272 x2 = x1 + len * (x2 - x1) / line_len;
273 y2 = y1 + len * (y2 - y1) / line_len;
276 evas_object_geometry_get(pd->text_obj, &x, &y, &w, &h);
278 len = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
279 sina = (y2 - y1) / len;
280 cosa = (x2 - x1) / len;
283 evas_map_point_coord_set(map, cmp + 3, x1 - h * sina, y1 + h * cosa, 0);
284 evas_map_point_coord_set(map, cmp + 2, x2 - h * sina, y2 + h * cosa, 0);
285 evas_map_point_coord_set(map, cmp + 1, x2 + h * sina, y2 - h * cosa, 0);
286 evas_map_point_coord_set(map, cmp + 0, x1 + h * sina, y1 - h * cosa, 0);
289 evas_map_point_image_uv_set(map, cmp + 0, w1, 0);
290 evas_map_point_image_uv_set(map, cmp + 1, w2, 0);
291 evas_map_point_image_uv_set(map, cmp + 2, w2, h);
292 evas_map_point_image_uv_set(map, cmp + 3, w1, h);
296 _map_point_calc(Efl_Ui_Textpath_Data *pd)
299 Efl_Ui_Textpath_Segment *seg;
301 EINA_INLIST_FOREACH(pd->segments, seg)
303 if (seg->type == EFL_GFX_PATH_COMMAND_TYPE_LINE_TO)
307 else if (seg->type == EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO)
309 int no = (int)ceil(pd->slice_no * seg->length / (double)pd->total_length);
320 _text_draw(Efl_Ui_Textpath_Data *pd)
322 Efl_Ui_Textpath_Segment *seg;
326 int cur_map_point = 0, map_point_no;
327 int last_x1, last_y1, last_x2, last_y2;
329 last_x1 = last_y1 = last_x2 = last_y2 = 0;
331 evas_object_geometry_get(pd->text_obj, NULL, NULL, &w, &h);
335 remained_w = pd->total_length;
337 map_point_no = _map_point_calc(pd);
338 if (map_point_no == 0)
340 evas_object_map_enable_set(pd->text_obj, EINA_FALSE);
343 map = evas_map_new(map_point_no);
344 /* TIZEN_ONLY(20180302): update map when object's position is updated */
345 evas_map_util_object_move_sync_set(map, EINA_TRUE);
348 #ifdef EFL_UI_TEXTPATH_LINE_DEBUG
350 EINA_LIST_FREE(pd->lines, line)
351 evas_object_del(line);
355 EINA_INLIST_FOREACH(pd->segments, seg)
357 int len = seg->length;
359 len = (double)seg->length * w / (double)pd->total_length;
365 if (seg->type == EFL_GFX_PATH_COMMAND_TYPE_LINE_TO)
367 _text_on_line_draw(pd, w1, w2, cur_map_point, map, seg->line);
372 double slice_value, dt, dist;
375 slice_value = pd->slice_no * seg->length / (double)pd->total_length;
376 dt = (double)pd->total_length / (pd->slice_no * seg->length);
379 dist = (double)pd->total_length / (double)pd->slice_no;
381 dist = (double)pd->total_length * (w2 - w1) / ((double)pd->slice_no * seg->length);
383 slice_no = (int)ceil(slice_value);
384 dt = (double)slice_value * dt / (double)slice_no;
385 dist = (double)slice_value * dist / (double)slice_no;
387 _segment_draw(pd, slice_no, dt, dist,
388 w1, cur_map_point, map, seg->bezier,
389 &last_x1, &last_y1, &last_x2, &last_y2);
390 cur_map_point += slice_no * 4;
393 remained_w -= seg->length;
395 evas_object_map_enable_set(pd->text_obj, EINA_TRUE);
396 evas_object_map_set(pd->text_obj, map);
401 _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool set_min)
403 const Efl_Gfx_Path_Command *cmd;
404 const double *points;
405 Efl_Ui_Textpath_Segment *seg;
407 EINA_INLIST_FREE(pd->segments, seg)
409 pd->segments = eina_inlist_remove(pd->segments, EINA_INLIST_GET(seg));
414 evas_object_geometry_get(obj, &x, &y, NULL, NULL);
416 pd->total_length = 0;
417 eo_do(obj, efl_gfx_shape_path_get(&cmd, &points));
421 Eina_Rectangle *rect = eina_rectangle_new(0, 0, 0, 0);
422 double px0 = 0.0, py0 = 0.0, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, px1, py1;
424 while (*cmd != EFL_GFX_PATH_COMMAND_TYPE_END)
427 if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
430 px0 = points[pos] + x;
432 py0 = points[pos] + y;
434 else if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO)
437 double bx, by, bw, bh;
438 Eina_Rectangle *brect;
441 ctrl_x0 = points[pos] + x;
443 ctrl_y0 = points[pos] + y;
445 ctrl_x1 = points[pos] + x;
447 ctrl_y1 = points[pos] + y;
449 px1 = points[pos] + x;
451 py1 = points[pos] + y;
453 eina_bezier_values_set(&bz, px0, py0, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, px1, py1);
454 seg = malloc(sizeof(Efl_Ui_Textpath_Segment));
457 ERR("Failed to allocate segment");
462 seg->length = eina_bezier_length_get(&bz);
464 seg->type = EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO;
465 pd->segments = eina_inlist_append(pd->segments, EINA_INLIST_GET(seg));
466 pd->total_length += seg->length;
472 eina_bezier_bounds_get(&bz, &bx, &by, &bw, &bh);
473 brect = eina_rectangle_new(bx, by, bw, bh);
474 eina_rectangle_union(rect, brect);
475 eina_rectangle_free(brect);
477 else if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_LINE_TO)
479 Eina_Rectangle *lrect;
482 px1 = points[pos] + x;
484 py1 = points[pos] + y;
486 seg = malloc(sizeof(Efl_Ui_Textpath_Segment));
489 ERR("Failed to allocate segment");
493 seg->type = EFL_GFX_PATH_COMMAND_TYPE_LINE_TO;
494 seg->line.start.x = px0;
495 seg->line.start.y = py0;
496 seg->line.end.x = px1;
497 seg->line.end.y = py1;
498 seg->length = sqrt((px1 - px0)*(px1 - px0) + (py1 - py0)*(py1 - py0));
499 pd->segments = eina_inlist_append(pd->segments, EINA_INLIST_GET(seg));
500 pd->total_length += seg->length;
502 lrect = eina_rectangle_new(px0, py0, px1 - px0, py1 - py0);
503 eina_rectangle_union(rect, lrect);
504 eina_rectangle_free(lrect);
510 evas_object_size_hint_min_set(obj, rect->w, rect->h);
512 eina_rectangle_free(rect);
517 _sizing_eval(Efl_Ui_Textpath_Data *pd)
523 _textpath_ellipsis_set(Efl_Ui_Textpath_Data *pd, Eina_Bool enabled)
527 edje_object_part_text_style_user_pop(pd->text_obj, "elm.text");
530 Eina_Strbuf *buf = eina_strbuf_new();
532 eina_strbuf_append_printf(buf, "DEFAULT='ellipsis=1.0'");
533 format = eina_stringshare_add(eina_strbuf_string_get(buf));
534 eina_strbuf_free(buf);
535 edje_object_part_text_style_user_push(pd->text_obj, "elm.text", format);
540 _ellipsis_set(Efl_Ui_Textpath_Data *pd)
542 if (!pd->text_obj) return;
544 Evas_Coord w = 0, h = 0;
545 Eina_Bool is_ellipsis = EINA_FALSE;
546 const Evas_Object *tb;
548 tb = edje_object_part_object_get(pd->text_obj, "elm.text");
549 evas_object_textblock_size_native_get(tb, &w, &h);
550 evas_object_size_hint_min_set(pd->text_obj, w, h);
553 if (w > pd->total_length)
555 is_ellipsis = EINA_TRUE;
556 w = pd->total_length;
559 evas_object_resize(pd->text_obj, w, h);
560 _textpath_ellipsis_set(pd, is_ellipsis);
564 //_path_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
565 _path_changed_cb(void *data,
566 Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
567 void *event_info EINA_UNUSED)
569 EFL_UI_TEXTPATH_DATA_GET(data, sd);
571 _path_data_get(data, sd, EINA_TRUE);
578 _textpath_text_set_internal(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part EINA_UNUSED, const char *text)
580 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
581 Eina_Bool ret = EINA_TRUE;
583 if (!text) text = "";
584 //ret = edje_object_part_text_set(pd->text_obj, part, text);
585 ret = edje_object_part_text_set(pd->text_obj, "elm.text", text);
592 _efl_ui_textpath_efl_canvas_group_group_calculate(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
599 _efl_ui_textpath_elm_layout_sizing_eval(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
605 _efl_ui_textpath_evas_object_smart_calculate(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
611 //_efl_ui_textpath_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Textpath_Data *priv)
612 _efl_ui_textpath_evas_object_smart_add(Eo *obj, Efl_Ui_Textpath_Data *priv)
614 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
616 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
617 elm_widget_sub_object_parent_add(obj);
619 priv->text_obj = edje_object_add(evas_object_evas_get(obj));
620 elm_widget_theme_object_set(obj, priv->text_obj, "textpath", "base",
621 elm_widget_style_get(obj));
622 evas_object_size_hint_weight_set(priv->text_obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
623 evas_object_size_hint_align_set(priv->text_obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
624 evas_object_show(priv->text_obj);
626 evas_object_smart_member_add(priv->text_obj, obj);
627 elm_widget_sub_object_add(obj, priv->text_obj);
629 //efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _path_changed_cb, obj);
630 eo_do(obj, eo_event_callback_add
631 (EFL_GFX_PATH_CHANGED, _path_changed_cb, obj));
635 _efl_ui_textpath_class_constructor(Eo_Class *klass)
637 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
640 //EOLIAN static Efl_Object *
641 //_efl_ui_textpath_efl_object_constructor(Eo *obj, Efl_Ui_Textpath_Data *pd)
643 _efl_ui_textpath_eo_base_constructor(Eo *obj, Efl_Ui_Textpath_Data *pd)
645 //obj = efl_constructor(efl_super(obj, MY_CLASS));
646 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
647 pd->autofit = EINA_TRUE;
648 pd->slice_no = SLICE_DEFAULT_NO;
649 pd->direction = EFL_UI_TEXTPATH_DIRECTION_CW;
655 //_efl_ui_textpath_efl_object_destructor(Eo *obj, Efl_Ui_Textpath_Data *pd)
656 _efl_ui_textpath_eo_base_destructor(Eo *obj, Efl_Ui_Textpath_Data *pd)
658 Efl_Ui_Textpath_Segment *seg;
660 if (pd->text) free(pd->text);
661 if (pd->text_obj) evas_object_del(pd->text_obj);
662 EINA_INLIST_FREE(pd->segments, seg)
664 pd->segments = eina_inlist_remove(pd->segments, EINA_INLIST_GET(seg));
668 #ifdef EFL_UI_TEXTPATH_LINE_DEBUG
670 EINA_LIST_FREE(pd->lines, line)
671 evas_object_del(line);
674 //efl_destructor(efl_super(obj, MY_CLASS));
675 eo_do_super(obj, MY_CLASS, eo_destructor());
678 EOLIAN static Eina_Bool
679 _efl_ui_textpath_elm_layout_text_set(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part, const char *text)
681 return _textpath_text_set_internal(obj, pd, part, text);
684 EOLIAN static const char *
685 _efl_ui_textpath_elm_layout_text_get(const Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, const char *part)
687 return edje_object_part_text_get(pd->text_obj, part);
691 EOLIAN static Eina_Bool
692 _efl_ui_textpath_text_set(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part, const char *text)
694 return _textpath_text_set_internal(obj, pd, part, text);
697 EOLIAN static const char *
698 _efl_ui_textpath_text_get(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, const char *part)
700 return edje_object_part_text_get(pd->text_obj, part);
704 _efl_ui_textpath_efl_text_text_set(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *text)
706 _textpath_text_set_internal(obj, pd, "elm.text", text);
709 EOLIAN static const char *
710 _efl_ui_textpath_efl_text_text_get(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
712 return edje_object_part_text_get(pd->text_obj, "elm.text");
715 //EOLIAN static Efl_Ui_Theme_Apply
716 EOLIAN static Elm_Theme_Apply
717 _efl_ui_textpath_elm_widget_theme_apply(Eo *obj, Efl_Ui_Textpath_Data *pd)
719 Elm_Theme_Apply ret = ELM_THEME_APPLY_FAILED;
721 eo_do_super(obj, MY_CLASS, ret = elm_obj_widget_theme_apply());
722 if (!ret) return ELM_THEME_APPLY_FAILED;
724 elm_widget_theme_object_set(obj, pd->text_obj, "textpath", "base",
725 elm_widget_style_get(obj));
733 //_efl_ui_textpath_evas_object_position_set(Eo *obj, Efl_Ui_Textpath_Data *pd, Evas_Coord x, Evas_Coord y)
734 _efl_ui_textpath_evas_object_smart_move(Eo *obj, Efl_Ui_Textpath_Data *pd, Evas_Coord x, Evas_Coord y)
736 eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y));
738 /* TIZEN_ONLY(20180302): update map when object's position is updated
739 * Do Nothing. The position is not updated to the object in this function.
740 * Test with evas_object_geometry_get().
741 _path_data_get(obj, pd, EINA_FALSE);
749 _efl_ui_textpath_evas_object_resize(Eo *obj, Efl_Ui_Textpath_Data *pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
751 eo_do_super(obj, MY_CLASS, evas_object_resize(w, h));
755 _efl_ui_textpath_circle_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double x, double y, double radius, double start_angle, Efl_Ui_Textpath_Direction direction)
757 if (pd->circle.x == x && pd->circle.y == y &&
758 pd->circle.radius == radius &&
759 pd->circle.start_angle == start_angle &&
760 pd->direction == direction &&
761 _map_point_calc(pd) > 0)
768 pd->circle.radius = radius;
769 pd->circle.start_angle = start_angle;
770 pd->direction = direction;
772 eo_do(obj, efl_gfx_shape_reset());
773 if (direction == EFL_UI_TEXTPATH_DIRECTION_CW)
775 eo_do(obj, efl_gfx_shape_append_arc(x - radius, y - radius, radius * 2,
776 radius * 2, start_angle, -360));
780 eo_do(obj, efl_gfx_shape_append_arc(x - radius, y - radius, radius * 2,
781 radius * 2, start_angle, 360));
787 EOLIAN static Eina_Bool
788 _efl_ui_textpath_autofit_get(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
794 _efl_ui_textpath_autofit_set(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, Eina_Bool autofit)
796 if (pd->autofit == autofit) return;
797 pd->autofit = autofit;
802 _efl_ui_textpath_slice_number_get(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
808 _efl_ui_textpath_slice_number_set(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, int slice_no)
810 if (pd->slice_no == slice_no) return;
811 pd->slice_no = slice_no;
816 _efl_ui_textpath_ellipsis_set(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, Eina_Bool ellipsis)
818 if (pd->ellipsis == ellipsis) return;
819 pd->ellipsis = ellipsis;
825 EOLIAN static Eina_Bool
826 _efl_ui_textpath_ellipsis_get(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
832 //ELM_PART_OVERRIDE(efl_ui_textpath, EFL_UI_TEXTPATH, EFL_UI_LAYOUT, Efl_Ui_Textpath_Data, Elm_Part_Data)
833 //ELM_PART_OVERRIDE_TEXT_SET(efl_ui_textpath, EFL_UI_TEXTPATH, EFL_UI_LAYOUT, Efl_Ui_Textpath_Data, Elm_Part_Data)
834 //ELM_PART_OVERRIDE_TEXT_GET(efl_ui_textpath, EFL_UI_TEXTPATH, EFL_UI_LAYOUT, Efl_Ui_Textpath_Data, Elm_Part_Data)
835 //#include "efl_ui_textpath_internal_part.eo.c"
839 elm_textpath_add(Evas_Object *parent)
841 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
842 Evas_Object *obj = eo_add(MY_CLASS, parent);
847 #define EFL_UI_TEXTPATH_EXTRA_OPS \
848 EFL_CANVAS_GROUP_ADD_OPS(efl_ui_textpath)
850 #include "efl_ui_textpath.eo.c"