2017-06-08 03:07:12 -07:00
|
|
|
import eina_types;
|
|
|
|
import efl_text_types;
|
|
|
|
|
2017-06-15 03:37:17 -07:00
|
|
|
enum Efl.Text.Cursor.Cursor_Get_Type {
|
|
|
|
[[All available cursor states]]
|
|
|
|
legacy: efl_text_cursor_get;
|
|
|
|
default = 0, [[Main cursor state (alias to "main")]]
|
|
|
|
main, [[Main cursor state]]
|
|
|
|
selection_begin, [[Selection begin cursor state]]
|
|
|
|
selection_end, [[Selection end cursor state]]
|
|
|
|
preedit_start, [[Pre-edit start cursor state]]
|
|
|
|
preedit_end, [[Pre-edit end cursor starge]]
|
|
|
|
user, [[User cursor state]]
|
|
|
|
user_extra [[User extra cursor state]]
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Efl.Text.Cursor.Cursor_Type
|
|
|
|
{
|
|
|
|
[[Text cursor types]]
|
|
|
|
legacy: efl_text_cursor_type;
|
|
|
|
before, [[Cursor type before]]
|
|
|
|
under [[Cursor type under]]
|
|
|
|
}
|
|
|
|
|
2017-06-08 03:07:12 -07:00
|
|
|
interface Efl.Text.Cursor {
|
|
|
|
[[Cursor API
|
|
|
|
|
|
|
|
@since 1.20
|
|
|
|
]]
|
|
|
|
methods {
|
|
|
|
// Cursor
|
|
|
|
@property cursor {
|
|
|
|
[[The object's main cursor.
|
|
|
|
|
|
|
|
@since 1.18
|
|
|
|
]]
|
|
|
|
get {
|
|
|
|
legacy: null;
|
2017-07-17 02:45:36 -07:00
|
|
|
return: ptr(Efl.Text.Cursor.Cursor); [[Text cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
2017-06-08 06:46:42 -07:00
|
|
|
keys {
|
2017-08-31 07:15:32 -07:00
|
|
|
get_type: Efl.Text.Cursor.Cursor_Get_Type; [[Cursor type]]
|
2017-06-08 06:46:42 -07:00
|
|
|
}
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
@property cursor_position {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Cursor position]]
|
2017-06-08 03:07:12 -07:00
|
|
|
set { legacy: null; }
|
|
|
|
get { legacy: null; }
|
|
|
|
values {
|
2017-08-31 07:15:32 -07:00
|
|
|
position: int; [[Cursor position]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
keys {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property cursor_content {
|
|
|
|
[[The content of the cursor (the character under the cursor)]]
|
|
|
|
get {
|
|
|
|
legacy: null;
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
content: Eina.Unicode; [[The unicode codepoint of the character]]
|
|
|
|
}
|
|
|
|
keys {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property cursor_geometry {
|
|
|
|
[[Returns the geometry of two cursors ("split cursor"), if logical cursor is
|
|
|
|
between LTR/RTL text, also considering paragraph direction.
|
|
|
|
Upper cursor is shown for the text of the same direction as paragraph,
|
|
|
|
lower cursor - for opposite.
|
|
|
|
|
|
|
|
Split cursor geometry is valid only in '|' cursor mode.
|
|
|
|
In this case $true is returned and $cx2, $cy2, $cw2, $ch2 are set.
|
|
|
|
]]
|
|
|
|
get {
|
|
|
|
legacy: null;
|
|
|
|
return: bool; [[ $true if split cursor, $false otherwise.]]
|
|
|
|
}
|
|
|
|
keys {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
ctype: Efl.Text.Cursor.Cursor_Type; [[The type of the cursor.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
cx: int; [[The x of the cursor (or upper cursor)]]
|
|
|
|
cy: int; [[The y of the cursor (or upper cursor)]]
|
|
|
|
cw: int; [[The width of the cursor (or upper cursor)]]
|
|
|
|
ch: int; [[The height of the cursor (or upper cursor)]]
|
|
|
|
cx2: int; [[The x of the lower cursor]]
|
|
|
|
cy2: int; [[The y of the lower cursor]]
|
|
|
|
cw2: int; [[The width of the lower cursor]]
|
|
|
|
ch2: int; [[The height of the lower cursor]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_new {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Create new cursor]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
2017-08-31 07:15:32 -07:00
|
|
|
return: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
cursor_free {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Free existing cursor]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_equal {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Check if two cursors are equal]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur1: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 1 object]]
|
|
|
|
cur2: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 2 object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
2017-08-31 07:15:32 -07:00
|
|
|
return: bool; [[$true if cursors are equal, $false otherwise]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
cursor_compare {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Compare two cursors]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur1: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 1 object]]
|
|
|
|
cur2: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 2 object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
2017-08-31 07:15:32 -07:00
|
|
|
return: int; [[Difference between cursors]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
cursor_copy {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Copy existing cursor]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
dst: ptr(Efl.Text.Cursor.Cursor); [[Destination cursor]]
|
|
|
|
src: ptr(const(Efl.Text.Cursor.Cursor)); [[Source cursor]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_char_next {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advances to the next character]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_char_prev {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advances to the previous character]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_paragraph_char_first {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advances to the first character in this paragraph]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_paragraph_char_last {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advances to the last character in this paragraph]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_word_start {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advance to current word start]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_word_end {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advance to current word end]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_line_char_first {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advance to current line first character]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_line_char_last {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advance to current line last character]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_paragraph_first {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advance to current paragraph first character]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_paragraph_last {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Advance to current paragraph last character]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_paragraph_next {
|
|
|
|
[[Advances to the start of the next text node]]
|
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_paragraph_prev {
|
|
|
|
[[Advances to the end of the previous text node]]
|
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_line_jump_by {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Jump the cursor by the given number of lines]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
|
|
|
by: int; [[Number of lines]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_coord_set {
|
2017-08-31 07:15:32 -07:00
|
|
|
[[Set cursor coordinates]]
|
2017-06-08 03:07:12 -07:00
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
@in x: int; [[X coord to set by.]]
|
|
|
|
@in y: int; [[Y coord to set by.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cursor_text_insert {
|
|
|
|
[[Adds text to the current cursor position and set the cursor to
|
|
|
|
*after* the start of the text just added.
|
|
|
|
]]
|
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
@in text: string; [[Text to append (UTF-8 format).]]
|
|
|
|
}
|
|
|
|
return: int; [[Length of the appended text.]]
|
|
|
|
}
|
|
|
|
cursor_char_delete {
|
|
|
|
[[Deletes a single character from position pointed by given cursor.]]
|
|
|
|
legacy: null;
|
|
|
|
params {
|
2017-08-31 07:15:32 -07:00
|
|
|
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
|
2017-06-08 03:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|