summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_text_cursor.eo
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-06-08 13:07:12 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-06-11 23:58:52 +0300
commit30f74a759d3cd40f1114be4cc7141305f2d987f0 (patch)
tree79b4f642471f304f5e7f5fa3e541344e57dd942f /src/lib/efl/interfaces/efl_text_cursor.eo
parent97eda67737856c062018c8deb88961b602fa89ba (diff)
Text cursor: add interface and implement in Canvas.Text
Diffstat (limited to '')
-rw-r--r--src/lib/efl/interfaces/efl_text_cursor.eo212
1 files changed, 212 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_text_cursor.eo b/src/lib/efl/interfaces/efl_text_cursor.eo
new file mode 100644
index 0000000000..c2aeb3b022
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_text_cursor.eo
@@ -0,0 +1,212 @@
1import eina_types;
2import efl_text_types;
3
4interface Efl.Text.Cursor {
5 [[Cursor API
6
7 @since 1.20
8 ]]
9 methods {
10 // Cursor
11 @property cursor {
12 [[The object's main cursor.
13
14 @since 1.18
15 ]]
16 get {
17 legacy: null;
18 return: ptr(Efl.Text.Cursor.Cursor_Data); [[Text cursor object]]
19 }
20 }
21 @property cursor_position {
22 set { legacy: null; }
23 get { legacy: null; }
24 values {
25 position: int;
26 }
27 keys {
28 cur: ptr(Efl.Text.Cursor.Cursor_Data);
29 }
30 }
31 @property cursor_content {
32 [[The content of the cursor (the character under the cursor)]]
33 get {
34 legacy: null;
35 }
36 values {
37 content: Eina.Unicode; [[The unicode codepoint of the character]]
38 }
39 keys {
40 cur: ptr(const(Efl.Text.Cursor.Cursor_Data));
41 }
42 }
43 @property cursor_geometry {
44 [[Returns the geometry of two cursors ("split cursor"), if logical cursor is
45 between LTR/RTL text, also considering paragraph direction.
46 Upper cursor is shown for the text of the same direction as paragraph,
47 lower cursor - for opposite.
48
49 Split cursor geometry is valid only in '|' cursor mode.
50 In this case $true is returned and $cx2, $cy2, $cw2, $ch2 are set.
51 ]]
52 get {
53 legacy: null;
54 return: bool; [[ $true if split cursor, $false otherwise.]]
55 }
56 keys {
57 cur: ptr(const(Efl.Text.Cursor.Cursor_Data));
58 ctype: Efl.Text.Cursor.Cursor_Type; [[The type of the cursor.]]
59 }
60 values {
61 cx: int; [[The x of the cursor (or upper cursor)]]
62 cy: int; [[The y of the cursor (or upper cursor)]]
63 cw: int; [[The width of the cursor (or upper cursor)]]
64 ch: int; [[The height of the cursor (or upper cursor)]]
65 cx2: int; [[The x of the lower cursor]]
66 cy2: int; [[The y of the lower cursor]]
67 cw2: int; [[The width of the lower cursor]]
68 ch2: int; [[The height of the lower cursor]]
69 }
70 }
71 cursor_new {
72 legacy: null;
73 return: ptr(Efl.Text.Cursor.Cursor_Data);
74 }
75 cursor_free {
76 legacy: null;
77 params {
78 cur: ptr(Efl.Text.Cursor.Cursor_Data);
79 }
80 }
81 cursor_equal {
82 legacy: null;
83 params {
84 cur1: ptr(const(Efl.Text.Cursor.Cursor_Data));
85 cur2: ptr(const(Efl.Text.Cursor.Cursor_Data));
86 }
87 return: bool;
88 }
89 cursor_compare {
90 legacy: null;
91 params {
92 cur1: ptr(const(Efl.Text.Cursor.Cursor_Data));
93 cur2: ptr(const(Efl.Text.Cursor.Cursor_Data));
94 }
95 return: int;
96 }
97 cursor_copy {
98 legacy: null;
99 params {
100 dst: ptr(Efl.Text.Cursor.Cursor_Data);
101 src: ptr(const(Efl.Text.Cursor.Cursor_Data));
102 }
103 }
104 cursor_char_next {
105 legacy: null;
106 params {
107 cur: ptr(Efl.Text.Cursor.Cursor_Data);
108 }
109 }
110 cursor_char_prev {
111 legacy: null;
112 params {
113 cur: ptr(Efl.Text.Cursor.Cursor_Data);
114 }
115 }
116 cursor_paragraph_char_first {
117 legacy: null;
118 params {
119 cur: ptr(Efl.Text.Cursor.Cursor_Data);
120 }
121 }
122 cursor_paragraph_char_last {
123 legacy: null;
124 params {
125 cur: ptr(Efl.Text.Cursor.Cursor_Data);
126 }
127 }
128 cursor_word_start {
129 legacy: null;
130 params {
131 cur: ptr(Efl.Text.Cursor.Cursor_Data);
132 }
133 }
134 cursor_word_end {
135 legacy: null;
136 params {
137 cur: ptr(Efl.Text.Cursor.Cursor_Data);
138 }
139 }
140 cursor_line_char_first {
141 legacy: null;
142 params {
143 cur: ptr(Efl.Text.Cursor.Cursor_Data);
144 }
145 }
146 cursor_line_char_last {
147 legacy: null;
148 params {
149 cur: ptr(Efl.Text.Cursor.Cursor_Data);
150 }
151 }
152 cursor_paragraph_first {
153 legacy: null;
154 params {
155 cur: ptr(Efl.Text.Cursor.Cursor_Data);
156 }
157 }
158 cursor_paragraph_last {
159 legacy: null;
160 params {
161 cur: ptr(Efl.Text.Cursor.Cursor_Data);
162 }
163 }
164 cursor_paragraph_next {
165 [[Advances to the start of the next text node]]
166 legacy: null;
167 params {
168 cur: ptr(Efl.Text.Cursor.Cursor_Data);
169 }
170 }
171 cursor_paragraph_prev {
172 [[Advances to the end of the previous text node]]
173 legacy: null;
174 params {
175 cur: ptr(Efl.Text.Cursor.Cursor_Data);
176 }
177 }
178 cursor_line_jump_by {
179 legacy: null;
180 params {
181 cur: ptr(Efl.Text.Cursor.Cursor_Data);
182 by: int;
183 }
184 }
185 cursor_coord_set {
186 legacy: null;
187 params {
188 cur: ptr(Efl.Text.Cursor.Cursor_Data);
189 @in x: int; [[X coord to set by.]]
190 @in y: int; [[Y coord to set by.]]
191 }
192 }
193 cursor_text_insert {
194 [[Adds text to the current cursor position and set the cursor to
195 *after* the start of the text just added.
196 ]]
197 legacy: null;
198 params {
199 cur: ptr(Efl.Text.Cursor.Cursor_Data);
200 @in text: string; [[Text to append (UTF-8 format).]]
201 }
202 return: int; [[Length of the appended text.]]
203 }
204 cursor_char_delete {
205 [[Deletes a single character from position pointed by given cursor.]]
206 legacy: null;
207 params {
208 cur: ptr(Efl.Text.Cursor.Cursor_Data);
209 }
210 }
211 }
212}