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

247 lines
8.1 KiB
Plaintext

import eina_types;
import efl_text_types;
enum @beta Efl.Text_Cursor_Get_Type {
[[All available cursor states]]
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 state]]
user, [[User cursor state]]
user_extra [[User extra cursor state]]
}
enum @beta Efl.Text_Cursor_Type
{
[[Text cursor types]]
before, [[Cursor type before]]
under [[Cursor type under]]
}
interface @beta Efl.Text_Cursor {
[[Cursor API
]]
methods {
// Cursor
@property text_cursor {
[[The object's main cursor.
]]
get {
return: ptr(Efl.Text_Cursor_Cursor); [[Text cursor object]]
}
keys {
get_type: Efl.Text_Cursor_Get_Type; [[Cursor type]]
}
}
@property cursor_position {
[[Cursor position]]
set { }
get { }
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 {
}
values {
content: Eina.Unicode; [[The unicode codepoint of the character]]
}
keys {
@cref cur: 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 {
return: bool; [[ $true if split cursor, $false otherwise.]]
}
keys {
@cref cur: Efl.Text_Cursor_Cursor; [[Cursor object]]
ctype: Efl.Text_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]]
return: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
cursor_free {
[[Free existing cursor]]
params {
cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_equal {
[[Check if two cursors are equal]]
params {
@cref cur1: Efl.Text_Cursor_Cursor; [[Cursor 1 object]]
@cref cur2: Efl.Text_Cursor_Cursor; [[Cursor 2 object]]
}
return: bool; [[$true if cursors are equal, $false otherwise]]
}
cursor_compare {
[[Compare two cursors]]
params {
@cref cur1: Efl.Text_Cursor_Cursor; [[Cursor 1 object]]
@cref cur2: Efl.Text_Cursor_Cursor; [[Cursor 2 object]]
}
return: int; [[Difference between cursors]]
}
cursor_copy {
[[Copy existing cursor]]
params {
/* @out */ dst: ptr(Efl.Text_Cursor_Cursor); [[Destination cursor]]
@cref src: Efl.Text_Cursor_Cursor; [[Source cursor]]
}
}
cursor_char_next {
[[Advances to the next character]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_char_prev {
[[Advances to the previous character]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_cluster_next {
[[Advances to the next grapheme cluster]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_cluster_prev {
[[Advances to the previous grapheme cluster]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_paragraph_char_first {
[[Advances to the first character in this paragraph]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_paragraph_char_last {
[[Advances to the last character in this paragraph]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_word_start {
[[Advance to current word start]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_word_end {
[[Advance to current word end]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_line_char_first {
[[Advance to current line first character]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_line_char_last {
[[Advance to current line last character]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_paragraph_first {
[[Advance to current paragraph first character]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_paragraph_last {
[[Advance to current paragraph last character]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_paragraph_next {
[[Advances to the start of the next text node]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_paragraph_prev {
[[Advances to the end of the previous text node]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
cursor_line_jump_by {
[[Jump the cursor by the given number of lines]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
by: int; [[Number of lines]]
}
}
cursor_coord_set {
[[Set cursor coordinates]]
params {
/* @inout */ 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_cluster_coord_set {
[[Set cursor coordinates according to grapheme clusters.
It does not allow to put a cursor to the middle of a grapheme cluster.
]]
params {
/* @inout */ 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.
]]
params {
/* @inout */ 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.]]
params {
/* @inout */ cur: ptr(Efl.Text_Cursor_Cursor); [[Cursor object]]
}
}
}
}