summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_textgrid.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_textgrid.eo')
-rw-r--r--src/lib/evas/canvas/evas_textgrid.eo208
1 files changed, 0 insertions, 208 deletions
diff --git a/src/lib/evas/canvas/evas_textgrid.eo b/src/lib/evas/canvas/evas_textgrid.eo
deleted file mode 100644
index 5d4ea33..0000000
--- a/src/lib/evas/canvas/evas_textgrid.eo
+++ /dev/null
@@ -1,208 +0,0 @@
1enum Evas.Textgrid.Palette {
2 [[The palette to use for the foreground and background colors.
3
4 @since 1.7]]
5 none, [[No palette is used]]
6 standard, [[Standard palette (around 16 colors)]]
7 extended, [[Extended palette (at max 256 colors)]]
8 last [[Sentinel value to indicate last enum field during iteration]]
9}
10
11enum Evas.Textgrid.Font_Style {
12 [[The style to give to each character of the grid.
13
14 @since 1.7]]
15 normal = (1 << 0), [[Normal style]]
16 bold = (1 << 1), [[Bold style]]
17 italic = (1 << 2) [[Oblique style]]
18}
19
20/* XXX: Actual definition is in C. */
21struct Evas.Textgrid.Cell; [[Evas textgrid cell data structure]]
22
23class Evas.Textgrid extends Efl.Canvas.Object implements Efl.Text_Font
24{
25 [[Evas textgrid class]]
26 legacy_prefix: evas_object_textgrid;
27 eo_prefix: evas_obj_textgrid;
28 methods {
29 @property supported_font_styles {
30 set {
31 [[This function is not implemented yet, do not use.]]
32 }
33 get {
34 [[This function is not implemented yet, do not use.]]
35 }
36 values {
37 styles: Evas.Textgrid.Font_Style; [[EVAS_TEXTGRID_FONT_STYLE_NORMAL]]
38 }
39 }
40 @property grid_size {
41 set {
42 [[Set the size of the textgrid object.
43
44 This function sets the number of lines $h and the number
45 of columns $w for the textgrid object $obj. If
46 $w or $h are less than or equal to 0, this
47 function does nothing.
48
49 @since 1.7]]
50 legacy: evas_object_textgrid_size_set;
51 }
52 get {
53 [[Get the size of the textgrid object.
54
55 This function retrieves the number of lines in the buffer
56 $h and the number of columns in the buffer $w of
57 the textgrid object $obj. $w or $h can be
58 $null. On error, they are set to 0.
59
60 @since 1.7]]
61 legacy: evas_object_textgrid_size_get;
62 }
63 values {
64 w: int; [[The number of columns (width in cells) of the grid.]]
65 h: int; [[The number of rows (height in cells) of the grid.]]
66 }
67 }
68 @property cell_size {
69 get {
70 [[Retrieve the size of a cell of the given textgrid object in pixels.
71
72 This functions retrieves the width and height, in pixels, of a cell
73 of the textgrid object $obj and stores them respectively in the
74 buffers $width and $height. Their values depend on the
75 monospace font and style used for the textgrid object.
76 $width and $height can be $null. On error, they are
77 set to 0.
78
79 See also @Efl.Text_Font.font.set and @.supported_font_styles.set
80
81 @since 1.7]]
82 }
83 values {
84 width: int; [[A pointer to the location to store the cell's width in pixels.]]
85 height: int; [[A pointer to the location to store the cell's height in pixels.]]
86 }
87 }
88 update_add {
89 [[Indicate for evas that part of a textgrid region (cells) has been updated.
90
91 This function declares to evas that a region of cells was updated by
92 code and needs refreshing.
93
94 See also @.cellrow_set, @.cellrow_get and @.grid_size.set.
95
96 @since 1.7]]
97 /* FIXME-doc
98 * An application should modify cells like this
99 * as an example:
100 * @code
101 * Evas_Textgrid_Cell *cells;
102 * int i;
103 * cells = evas_object_textgrid_cellrow_get(obj, row);
104 * for (i = 0; i < width; i++) cells[i].codepoint = 'E';
105 * evas_object_textgrid_cellrow_set(obj, row, cells);
106 * evas_object_textgrid_update_add(obj, 0, row, width, 1);
107 * @endcode
108 */
109
110 params {
111 @in x: int; [[The rect region of cells top-left x (column).]]
112 @in y: int; [[The rect region of cells top-left y (row).]]
113 @in w: int; [[The rect region size in number of cells (columns).]]
114 @in h: int; [[The rect region size in number of cells (rows).]]
115 }
116 }
117 cellrow_set {
118 [[Set the string at the given row of the given textgrid object.
119
120 This function returns cells to the textgrid taken by
121 evas_object_textgrid_cellrow_get. The row pointer $row should be the
122 same row pointer returned by evas_object_textgrid_cellrow_get for the
123 same row $y.
124
125 See also @.cellrow_get, @.grid_size.set and @.update_add.
126
127 @since 1.7]]
128
129 params {
130 @in y: int; [[The row index of the grid.]]
131 @cref row: Evas.Textgrid.Cell; [[The string as a sequence of #Evas_Textgrid_Cell.]]
132 }
133 }
134 cellrow_get @const {
135 [[Get the string at the given row of the given textgrid object.
136
137 This function returns a pointer to the first cell of the line $y
138 of the textgrid object $obj. If $y is not between 0 and the
139 number of lines of the grid - 1, or on error, this function return $null.
140
141 See also @.cellrow_set, @.grid_size.set and @.update_add.
142
143 @since 1.7]]
144 return: ptr(Evas.Textgrid.Cell); [[A pointer to the first cell of the given row.]]
145 params {
146 @in y: int; [[The row index of the grid.]]
147 }
148 }
149 palette_set {
150 [[The set color to the given palette at the given index of the given textgrid object.
151
152 This function sets the color for the palette of type $pal at the
153 index $idx of the textgrid object $obj. The ARGB components are
154 given by $r, $g, $b and $a. This color can be used when
155 setting the #Evas_Textgrid_Cell structure. The components must set
156 a pre-multiplied color. If pal is #EVAS_TEXTGRID_PALETTE_NONE or
157 #EVAS_TEXTGRID_PALETTE_LAST, or if $idx is not between 0 and 255,
158 or on error, this function does nothing. The color components are
159 clamped between 0 and 255. If $idx is greater than the latest set
160 color, the colors between this last index and $idx - 1 are set to
161 black (0, 0, 0, 0).
162
163 See also @.palette_get.
164
165 @since 1.7]]
166
167 params {
168 @in pal: Evas.Textgrid.Palette; [[The type of the palette to set the color.]]
169 @in idx: int; [[The index of the palette to which the color is stored.]]
170 @in r: int; [[The red component of the color.]]
171 @in g: int; [[The green component of the color.]]
172 @in b: int; [[The blue component of the color.]]
173 @in a: int; [[The alpha component of the color.]]
174 }
175 }
176 palette_get @const {
177 [[The retrieve color to the given palette at the given index of the given textgrid object.
178
179 This function retrieves the color for the palette of type $pal at the
180 index $idx of the textgrid object $obj. The ARGB components are
181 stored in the buffers $r, $g, $b and $a. If $idx is not
182 between 0 and the index of the latest set color, or if $pal is
183 #EVAS_TEXTGRID_PALETTE_NONE or #EVAS_TEXTGRID_PALETTE_LAST, the
184 values of the components are 0. $r, $g, $b and $a can be
185 $null.
186
187 See also @.palette_set.
188
189 @since 1.7]]
190 params {
191 @in pal: Evas.Textgrid.Palette; [[The type of the palette to set the color.]]
192 @in idx: int; [[The index of the palette to which the color is stored.]]
193 @out r: int; [[A pointer to the red component of the color.]]
194 @out g: int; [[A pointer to the green component of the color.]]
195 @out b: int; [[A pointer to the blue component of the color.]]
196 @out a: int; [[A pointer to the alpha component of the color.]]
197 }
198 }
199 }
200 implements {
201 Efl.Object.constructor;
202 Efl.Object.destructor;
203 Efl.Text_Font.font { get; set; }
204 Efl.Text_Font.font_source { get; set; }
205 Efl.Text_Font.font_bitmap_scalable { get; set; }
206 Efl.Gfx.Entity.scale { set; }
207 }
208}