aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_text.eo
blob: 91e952da5aee401bd5f4450a733ffb18ab476b86 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
type @extern Evas.Text_Style_Type : __undefined_type; [[External text style type]]

class Evas.Text (Efl.Canvas.Object, Efl.Text, Efl.Text.Properties,
                 Efl.Text.Font, Efl.Canvas.Filter.Internal, Efl.Ui.Base)
{
   [[Evas text class]]
   legacy_prefix: evas_object_text;
   eo_prefix: evas_obj_text;
   methods {
      @property shadow_color {
         [[Controls the shadow color for the given text object.

           Shadow effects are fading colors decorating the text
           underneath it.  They will be shown if the object is set to
           one of the following styles:

           - $EVAS_TEXT_STYLE_TYPE_SHADOW
           - $EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW
           - $EVAS_TEXT_STYLE_TYPE_FAR_SHADOW
           - $EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW
           - $EVAS_TEXT_STYLE_TYPE_SOFT_SHADOW
           - $EVAS_TEXT_STYLE_TYPE_FAR_SOFT_SHADOW

           One can also change the direction where the shadow grows to, with
           @.style

           See @.shadow_color]]
         set {
         }
         get {
            [[Note: Use $NULL pointers on the color components you're not
            interested in: they'll be ignored by the function.]]
         }
         values {
            r: int; [[The red component of the given color.]]
            g: int; [[The green component of the given color.]]
            b: int; [[The blue component of the given color.]]
            a: int; [[The alpha component of the given color.]]
         }
      }
      @property ellipsis {
         [[Controls the ellipsis that should be used for the text object.

          This is a value between 0.0 and 1.0 indicating the position of the text
          to be shown. 0.0 means the start will be shown and the end trimmed, 1.0
          means the beginning will be trimmed and the end will be shown, and any value
          in between will cause ellipsis to be added in both end of the text and the
          requested part to be shown.
          -1.0 means ellipsis is turned off.

          @since 1.8]]
         set {
         }
         get {
         }
         values {
            ellipsis: double(-1.0); [[The ellipsis. Allowed values: -1.0 or 0.0-1.0]]
         }
      }
      @property bidi_delimiters {
         [[Sets the BiDi delimiters used in the textblock.

           BiDi delimiters are use for in-paragraph separation of bidi segments. This
           is useful for example in recipients fields of e-mail clients where bidi
           oddities can occur when mixing RTL and LTR.

           @since 1.1]]
         set {
         }
         get {
         }
         values {
            delim: string; [[A null terminated string of delimiters, e.g ",|".]]
         }
      }
      @property outline_color {
         [[Controls the outline color for the given text object.

           Outline effects (colored lines around text glyphs) will be
           shown if the object is set to one of the following styles:
           - $EVAS_TEXT_STYLE_TYPE_OUTLINE
           - $EVAS_TEXT_STYLE_TYPE_SOFT_OUTLINE
           - $EVAS_TEXT_STYLE_TYPE_OUTLINE_SHADOW
           - $EVAS_TEXT_STYLE_TYPE_OUTLINE_SOFT_SHADOW
         ]]
         set {
         }
         get {
         }
         values {
            r: int; [[The red component of the given color.]]
            g: int; [[The green component of the given color.]]
            b: int; [[The blue component of the given color.]]
            a: int; [[The alpha component of the given color.]]
         }
      }
      @property glow2_color {
         [[Sets the 'glow 2' color for the given text object.

           'Glow 2' effects are glowing colors decorating the text's
           (immediate) surroundings.  They will be shown if the object
           is set to the $EVAS_TEXT_STYLE_TYPE_GLOW style. See also
           @.glow_color.
         ]]
         set {
         }
         get {
         }
         values {
            r: int; [[The red component of the given color.]]
            g: int; [[The green component of the given color.]]
            b: int; [[The blue component of the given color.]]
            a: int; [[The alpha component of the given color.]]
         }
      }
      @property style {
            [[Controls the style to apply on the given text object.

              Text object styles are one of the values in @Evas.Text_Style_Type
              Some of those values are combinations of more than one style,
              and some account for the direction of the rendering of shadow effects.

              Note: One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and
              #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.]]

            /* FIXME-doc:
            The following figure illustrates the text styles:

            @image html text-styles.png
            @image rtf text-styles.png
            @image latex text-styles.eps

            @see evas_object_text_style_get()
            @see evas_object_text_shadow_color_set()
            @see evas_object_text_outline_color_set()
            @see evas_object_text_glow_color_set()
            @see evas_object_text_glow2_color_set() */
         set {
         }
         get {
         }
         values {
            style: Evas.Text_Style_Type; [[Style type]]
         }
      }
      @property glow_color {
         [[Sets the glow color for the given text object.

           Glow effects are glowing colors decorating the text's
           surroundings.  They will be shown if the object is set to the
           $EVAS_TEXT_STYLE_TYPE_GLOW style.

           Note: Glow effects are placed from a short distance of the text
           itself, but not touching it. For glowing effects right on the
           borders of the glyphs, see 'glow 2' effects.]]
         set {
         }
         get {
         }
         values {
            r: int; [[The red component of the given color.]]
            g: int; [[The green component of the given color.]]
            b: int; [[The blue component of the given color.]]
            a: int; [[The alpha component of the given color.]]
         }
      }
      @property max_descent {
          [[Maximal descent property]]
         get {
            return: int; [[Evas coordinate]]
         }
      }
      @property style_pad {
         get {
            [[Gets the text style pad of a text object.]]
         }
         values {
            l: int; [[The left pad (or $NULL).]]
            r: int; [[The right pad (or $NULL).]]
            t: int; [[The top pad (or $NULL).]]
            b: int; [[The bottom pad (or $NULL).]]
         }
      }
      @property direction {
         get {
            [[Retrieves the direction of the text currently being displayed in the
            text object.]]

            return: Efl.Text.Bidirectional_Type; [[Bidirectional type]]
         }
      }
      @property ascent {
          [[Ascent property]]
         get {
            return: int; [[Evas coordinate]]
         }
      }
      @property horiz_advance {
          [[Horizontal advance property]]
         get {
            return: int; [[Evas coordinate]]
         }
      }
      @property inset {
          [[Inset property]]
         get {
            return: int; [[Evas coordinate]]
         }
      }
      @property max_ascent {
          [[Maximal ascent property]]
         get {
            return: int; [[Evas coordinate]]
         }
      }
      @property vert_advance {
          [[Vertical advance property]]
         get {
            return: int; [[Evas coordinate]]
         }
      }
      @property descent {
          [[descent property]]
         get {
            return: int; [[Evas coordinate]]
         }
      }
      last_up_to_pos @const {
         [[Returns the logical position of the last char in the text up to
           the pos given.

           This is NOT the position of the last char because of the possibility
           of RTL in the text.
         ]]
         return: int(-1); [[Logical position of the last char]]
         params {
            @in x: int; [[X coordinate]]
            @in y: int; [[Y coordinate]]
         }
      }
      char_coords_get @const {
          [[Get character coordinates]]
         return: int; [[Logical position of char]]
         params {
            @in x: int; [[X coordinate]]
            @in y: int; [[Y coordinate]]
            @out cx: int; [[X coordinate]]
            @out cy: int; [[Y coordinate]]
            @out cw: int; [[Width]]
            @out ch: int; [[Height]]
         }
      }
      char_pos_get @const {
         [[Retrieve position and dimension information of a character within a text @Efl.Canvas.Object

         This function is used to obtain the X, Y, width and height of the character
         located at $pos within the @Efl.Canvas.Object $obj. $obj must be a text object
         Any of the $Evas_Coord parameters ($cx, $cy, $cw, $ch) may be $NULL in which case no value will be assigned to that
         parameter.]]

         return: bool; [[$false on success, $true otherwise]]
         params {
            @in pos: int; [[The character position to request co-ordinates for.]]
            @out cx: int; [[A pointer to an int to store the X value in (can be NULL).]]
            @out cy: int; [[A pointer to an int to store the Y value in (can be NULL).]]
            @out cw: int; [[A pointer to an int to store the Width value in (can be NULL).]]
            @out ch: int; [[A pointer to an int to store the Height value in (can be NULL).]]
         }
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
      Efl.Gfx.size { set; }
      Efl.Gfx.scale { set; }
      Efl.Text.text { get; set; }
      Efl.Text.Properties.font { get; set; }
      Efl.Text.Properties.font_source { get; set; }
      Efl.Text.Font.font_bitmap_scalable { get; set; }
      Efl.Gfx.Filter.filter_program { set; }
      Efl.Canvas.Filter.Internal.filter_dirty;
      Efl.Canvas.Filter.Internal.filter_input_alpha;
      Efl.Canvas.Filter.Internal.filter_input_render;
      Efl.Canvas.Filter.Internal.filter_state_prepare;
      Efl.Canvas.Object.paragraph_direction { set; get; }
   }
}