summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/efl_canvas_text_eo.legacy.h')
-rw-r--r--src/lib/evas/canvas/efl_canvas_text_eo.legacy.h228
1 files changed, 228 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h
new file mode 100644
index 0000000..900c6da
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_text_eo.legacy.h
@@ -0,0 +1,228 @@
1#ifndef _EFL_CANVAS_TEXT_EO_LEGACY_H_
2#define _EFL_CANVAS_TEXT_EO_LEGACY_H_
3
4#ifndef _EFL_CANVAS_TEXT_EO_CLASS_TYPE
5#define _EFL_CANVAS_TEXT_EO_CLASS_TYPE
6
7typedef Eo Efl_Canvas_Text;
8
9#endif
10
11#ifndef _EFL_CANVAS_TEXT_EO_TYPES
12#define _EFL_CANVAS_TEXT_EO_TYPES
13
14/** EFL text style data structure
15 *
16 * @ingroup Efl_Canvas
17 */
18typedef struct _Efl_Canvas_Text_Style Efl_Canvas_Text_Style;
19
20
21#endif
22
23
24/**
25 * @brief Returns the currently visible range.
26 *
27 * The given @c start and @c end cursor act like out-variables here, as they
28 * are set to the positions of the start and the end of the visible range in
29 * the text, respectively.
30 *
31 * @param[in] obj The object.
32 * @param[in] start Range start position
33 * @param[in] end Range end position
34 *
35 * @return @c true on success, @c false otherwise
36 *
37 * @since 1.18
38 *
39 * @ingroup Evas_Object_Textblock_Group
40 */
41EAPI Eina_Bool evas_object_textblock_visible_range_get(Efl_Canvas_Text *obj, Efl_Text_Cursor_Cursor *start, Efl_Text_Cursor_Cursor *end);
42
43/**
44 * @brief Gets the left, right, top and bottom insets of the text.
45 *
46 * The inset is any applied padding on the text.
47 *
48 * @param[in] obj The object.
49 * @param[out] l Left padding
50 * @param[out] r Right padding
51 * @param[out] t Top padding
52 * @param[out] b Bottom padding
53 *
54 * @since 1.18
55 *
56 * @ingroup Evas_Object_Textblock_Group
57 */
58EAPI void evas_object_textblock_style_insets_get(const Efl_Canvas_Text *obj, int *l, int *r, int *t, int *b);
59
60/**
61 * @brief BiDi delimiters are used for in-paragraph separation of bidi
62 * segments. This is useful, for example, in the recipient fields of e-mail
63 * clients where bidi oddities can occur when mixing RTL and LTR.
64 *
65 * @param[in] obj The object.
66 * @param[in] delim A null terminated string of delimiters, e.g ",|" or @c null
67 * if empty
68 *
69 * @since 1.18
70 *
71 * @ingroup Evas_Object_Textblock_Group
72 */
73EAPI void evas_object_textblock_bidi_delimiters_set(Efl_Canvas_Text *obj, const char *delim);
74
75/**
76 * @brief BiDi delimiters are used for in-paragraph separation of bidi
77 * segments. This is useful, for example, in the recipient fields of e-mail
78 * clients where bidi oddities can occur when mixing RTL and LTR.
79 *
80 * @param[in] obj The object.
81 *
82 * @return A null terminated string of delimiters, e.g ",|" or @c null if empty
83 *
84 * @since 1.18
85 *
86 * @ingroup Evas_Object_Textblock_Group
87 */
88EAPI const char *evas_object_textblock_bidi_delimiters_get(const Efl_Canvas_Text *obj);
89
90/**
91 * @brief When @c true, newline character will behave as a paragraph separator.
92 *
93 * @param[in] obj The object.
94 * @param[in] mode @c true for legacy mode, @c false otherwise
95 *
96 * @since 1.18
97 *
98 * @ingroup Evas_Object_Textblock_Group
99 */
100EAPI void evas_object_textblock_legacy_newline_set(Efl_Canvas_Text *obj, Eina_Bool mode);
101
102/**
103 * @brief When @c true, newline character will behave as a paragraph separator.
104 *
105 * @param[in] obj The object.
106 *
107 * @return @c true for legacy mode, @c false otherwise
108 *
109 * @since 1.18
110 *
111 * @ingroup Evas_Object_Textblock_Group
112 */
113EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Efl_Canvas_Text *obj);
114
115
116
117/**
118 * @brief The formatted width and height.
119 *
120 * This calculates the actual size after restricting the textblock to the
121 * current size of the object.
122 *
123 * The main difference between this and
124 * @ref evas_object_textblock_size_native_get is that the "native" function
125 * does not wrapping into account it just calculates the real width of the
126 * object if it was placed on an infinite canvas, while this function gives the
127 * size after wrapping according to the size restrictions of the object.
128 *
129 * For example for a textblock containing the text: "You shall not pass!" with
130 * no margins or padding and assuming a monospace font and a size of 7x10 char
131 * widths (for simplicity) has a native size of 19x1 and a formatted size of
132 * 5x4.
133 *
134 * @param[in] obj The object.
135 * @param[out] w The width of the object.
136 * @param[out] h The height of the object.
137 *
138 * @since 1.18
139 *
140 * @ingroup Evas_Object_Textblock_Group
141 */
142EAPI void evas_object_textblock_size_formatted_get(const Efl_Canvas_Text *obj, int *w, int *h);
143
144/**
145 * @brief The native width and height.
146 *
147 * This calculates the actual size without taking account the current size of
148 * the object.
149 *
150 * The main difference between this and
151 * @ref evas_object_textblock_size_formatted_get is that the "native" function
152 * does not take wrapping into account it just calculates the real width of the
153 * object if it was placed on an infinite canvas, while the "formatted"
154 * function gives the size after wrapping text according to the size
155 * restrictions of the object.
156 *
157 * For example for a textblock containing the text: "You shall not pass!" with
158 * no margins or padding and assuming a monospace font and a size of 7x10 char
159 * widths (for simplicity) has a native size of 19x1 and a formatted size of
160 * 5x4.
161 *
162 * @param[in] obj The object.
163 * @param[out] w The width returned.
164 * @param[out] h The height returned.
165 *
166 * @since 1.18
167 *
168 * @ingroup Evas_Object_Textblock_Group
169 */
170EAPI void evas_object_textblock_size_native_get(const Efl_Canvas_Text *obj, int *w, int *h);
171
172
173
174
175
176/**
177 * @brief Add obstacle evas object @c eo_obs to be observed during layout of
178 * text.
179 *
180 * The textblock does the layout of the text according to the position of the
181 * obstacle.
182 *
183 * @param[in] obj The object.
184 * @param[in] eo_obs Obstacle object
185 *
186 * @return @c true on success, @c false otherwise.
187 *
188 * @since 1.18
189 *
190 * @ingroup Evas_Object_Textblock_Group
191 */
192EAPI Eina_Bool evas_object_textblock_obstacle_add(Efl_Canvas_Text *obj, Efl_Canvas_Object *eo_obs);
193
194/**
195 * @brief Removes @c eo_obs from observation during text layout.
196 *
197 * @param[in] obj The object.
198 * @param[in] eo_obs Obstacle object
199 *
200 * @return @c true on success, @c false otherwise.
201 *
202 * @since 1.18
203 *
204 * @ingroup Evas_Object_Textblock_Group
205 */
206EAPI Eina_Bool evas_object_textblock_obstacle_del(Efl_Canvas_Text *obj, Efl_Canvas_Object *eo_obs);
207
208/**
209 * @brief Triggers for relayout due to obstacles' state change.
210 *
211 * The obstacles alone don't affect the layout, until this is called. Use this
212 * after doing changes (moving, positioning etc.) in the obstacles that you
213 * would like to be considered in the layout.
214 *
215 * For example: if you have just repositioned the obstacles to differrent
216 * coordinates relative to the textblock, you need to call this so it will
217 * consider this new state and will relayout the text.
218 *
219 * @param[in] obj The object.
220 *
221 * @since 1.18
222 *
223 * @ingroup Evas_Object_Textblock_Group
224 */
225EAPI void evas_object_textblock_obstacles_update(Efl_Canvas_Text *obj);
226
227
228#endif