efl/src/lib/efl/interfaces/efl_text_cursor.eo

255 lines
7.8 KiB
Plaintext

import eina_types;
import efl_text_types;
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]]
}
interface Efl.Text.Cursor {
[[Cursor API
@since 1.20
]]
methods {
// Cursor
@property cursor {
[[The object's main cursor.
@since 1.18
]]
get {
legacy: null;
return: ptr(Efl.Text.Cursor.Cursor); [[Text cursor object]]
}
keys {
get_type: Efl.Text.Cursor.Cursor_Get_Type; [[Cursor type]]
}
}
@property cursor_position {
[[Cursor position]]
set { legacy: null; }
get { legacy: null; }
values {
position: int; [[Cursor position]]
}
keys {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
@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 {
cur: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor object]]
}
}
@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 {
cur: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor object]]
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 {
[[Create new cursor]]
legacy: null;
return: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
cursor_free {
[[Free existing cursor]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_equal {
[[Check if two cursors are equal]]
legacy: null;
params {
cur1: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 1 object]]
cur2: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 2 object]]
}
return: bool; [[$true if cursors are equal, $false otherwise]]
}
cursor_compare {
[[Compare two cursors]]
legacy: null;
params {
cur1: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 1 object]]
cur2: ptr(const(Efl.Text.Cursor.Cursor)); [[Cursor 2 object]]
}
return: int; [[Difference between cursors]]
}
cursor_copy {
[[Copy existing cursor]]
legacy: null;
params {
dst: ptr(Efl.Text.Cursor.Cursor); [[Destination cursor]]
src: ptr(const(Efl.Text.Cursor.Cursor)); [[Source cursor]]
}
}
cursor_char_next {
[[Advances to the next character]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_char_prev {
[[Advances to the previous character]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_paragraph_char_first {
[[Advances to the first character in this paragraph]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_paragraph_char_last {
[[Advances to the last character in this paragraph]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_word_start {
[[Advance to current word start]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_word_end {
[[Advance to current word end]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_line_char_first {
[[Advance to current line first character]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_line_char_last {
[[Advance to current line last character]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_paragraph_first {
[[Advance to current paragraph first character]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_paragraph_last {
[[Advance to current paragraph last character]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_paragraph_next {
[[Advances to the start of the next text node]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_paragraph_prev {
[[Advances to the end of the previous text node]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
cursor_line_jump_by {
[[Jump the cursor by the given number of lines]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
by: int; [[Number of lines]]
}
}
cursor_coord_set {
[[Set cursor coordinates]]
legacy: null;
params {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
@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 {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
@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 {
cur: ptr(Efl.Text.Cursor.Cursor); [[Cursor object]]
}
}
}
}