83#ifndef ULTRALIGHT_CAPI_EDITOR_H
84#define ULTRALIGHT_CAPI_EDITOR_H
An RGBA color value in a certain color space (with CSS parsing helpers).
bool ulEditorCancelComposition(ULEditor editor)
Cancel the active composition and remove its text.
bool ulEditorSetComposition(ULEditor editor, ULString text, const ULCompositionSegment *segments, size_t num_segments, ULCompositionRange selection)
Set or update the in-progress text of an input method's composition.
ULString ulEditorGetTextInRange(ULEditor editor, unsigned int start, unsigned int end)
Get part of the focused element's text (see ulEditorGetSelectionOffsets() for the offsets).
bool ulEditorCommitComposition(ULEditor editor, ULString text)
Replace the active composition with the input method's final text.
bool ulEditorExecute(ULEditor editor, ULEditorCommand command)
Run an editing command.
bool ulEditorGetSelectionOffsets(ULEditor editor, unsigned int *start, unsigned int *end)
Get the selection's offsets within the focused element's text.
bool ulEditorGetCompositionOffsets(ULEditor editor, unsigned int *start, unsigned int *end)
Get the active composition's offsets within the focused element's text (see ulEditorGetSelectionOffse...
bool ulEditorReplaceTextInRange(ULEditor editor, unsigned int start, unsigned int end, ULString text)
Replace part of the focused element's text (see ulEditorGetSelectionOffsets() for the offsets).
bool ulEditorHasComposition(ULEditor editor)
Whether or not a composition is active.
unsigned int ulEditorGetCompositionCharacterCount(ULEditor editor)
Get the length of the active composition's text, in UTF-16 code units.
ULRect ulEditorGetCompositionBounds(ULEditor editor)
Get the bounds of the active composition's text, in viewport CSS pixels.
ULEditor ulViewGetEditor(ULView view)
Get the editor for a View.
ULEditableType
The kind of element that holds keyboard focus (see ULEditableState).
Definition CAPI_Editor.h:471
@ kEditableType_Text
A single-line text field.
Definition CAPI_Editor.h:473
@ kEditableType_Other
A focused element that is not a text-editing target.
Definition CAPI_Editor.h:477
@ kEditableType_Password
A password field.
Definition CAPI_Editor.h:474
@ kEditableType_TextArea
A multi-line text area.
Definition CAPI_Editor.h:475
@ kEditableType_None
No element holds keyboard focus.
Definition CAPI_Editor.h:472
@ kEditableType_ContentEditable
An editable (contenteditable) region.
Definition CAPI_Editor.h:476
ULInputMode
The focused element's inputmode hint (what kind of virtual keyboard the page asks for).
Definition CAPI_Editor.h:483
@ kInputMode_Text
Definition CAPI_Editor.h:486
@ kInputMode_Decimal
Definition CAPI_Editor.h:491
@ kInputMode_Email
Definition CAPI_Editor.h:489
@ kInputMode_Url
Definition CAPI_Editor.h:488
@ kInputMode_Unspecified
Definition CAPI_Editor.h:484
@ kInputMode_Numeric
Definition CAPI_Editor.h:490
@ kInputMode_Search
Definition CAPI_Editor.h:492
@ kInputMode_Telephone
Definition CAPI_Editor.h:487
@ kInputMode_None
Definition CAPI_Editor.h:485
ULRect ulEditorGetCompositionCharacterBounds(ULEditor editor, unsigned int index)
Get the bounds of one character of the active composition's text, in viewport CSS pixels.
ULEditorCommand
The editing commands you can run with ulEditorExecute().
Definition CAPI_Editor.h:108
@ kEditorCommand_MoveToBeginningOfParagraph
Move the caret to the start of the paragraph.
Definition CAPI_Editor.h:127
@ kEditorCommand_MoveToEndOfParagraph
Move the caret to the end of the paragraph.
Definition CAPI_Editor.h:128
@ kEditorCommand_DeleteBackward
Delete the selection or the previous character.
Definition CAPI_Editor.h:157
@ kEditorCommand_DeleteWordBackward
Delete the word before the caret.
Definition CAPI_Editor.h:159
@ kEditorCommand_MoveToBeginningOfDocument
Move the caret to the start of the text.
Definition CAPI_Editor.h:129
@ kEditorCommand_MoveToEndOfLine
Move the caret to the end of the line.
Definition CAPI_Editor.h:126
@ kEditorCommand_MoveRight
Move the caret one character right.
Definition CAPI_Editor.h:120
@ kEditorCommand_SelectParagraph
Select the paragraph at the caret.
Definition CAPI_Editor.h:153
@ kEditorCommand_DeleteForward
Delete the selection or the next character.
Definition CAPI_Editor.h:158
@ kEditorCommand_MoveRightAndModifySelection
Select one character right.
Definition CAPI_Editor.h:136
@ kEditorCommand_DeleteToEndOfLine
Delete to the end of the line.
Definition CAPI_Editor.h:162
@ kEditorCommand_MoveToBeginningOfParagraphAndModifySelection
Select to paragraph start.
Definition CAPI_Editor.h:143
@ kEditorCommand_MoveToBeginningOfLineAndModifySelection
Select to line start.
Definition CAPI_Editor.h:141
@ kEditorCommand_Cut
Cut the selection to the clipboard.
Definition CAPI_Editor.h:110
@ kEditorCommand_SelectWord
Select the word at the caret.
Definition CAPI_Editor.h:151
@ kEditorCommand_MoveDown
Move the caret one line down.
Definition CAPI_Editor.h:122
@ kEditorCommand_MoveToEndOfLineAndModifySelection
Select to line end.
Definition CAPI_Editor.h:142
@ kEditorCommand_MoveToEndOfDocumentAndModifySelection
Select to text end.
Definition CAPI_Editor.h:146
@ kEditorCommand_MoveLeftAndModifySelection
Select one character left.
Definition CAPI_Editor.h:135
@ kEditorCommand_DeleteToBeginningOfLine
Delete to the start of the line.
Definition CAPI_Editor.h:161
@ kEditorCommand_InsertTab
Insert a tab.
Definition CAPI_Editor.h:167
@ kEditorCommand_MovePageDown
Move the caret one page down.
Definition CAPI_Editor.h:132
@ kEditorCommand_MovePageUp
Move the caret one page up.
Definition CAPI_Editor.h:131
@ kEditorCommand_MoveToEndOfParagraphAndModifySelection
Select to paragraph end.
Definition CAPI_Editor.h:144
@ kEditorCommand_InsertLineBreak
Insert a line break in the paragraph (Shift+Enter).
Definition CAPI_Editor.h:166
@ kEditorCommand_Unselect
Clear the selection (no caret remains).
Definition CAPI_Editor.h:154
@ kEditorCommand_Copy
Copy the selection to the clipboard.
Definition CAPI_Editor.h:111
@ kEditorCommand_InsertNewline
Insert a new paragraph (the Enter key).
Definition CAPI_Editor.h:165
@ kEditorCommand_MoveUpAndModifySelection
Select one line up.
Definition CAPI_Editor.h:137
@ kEditorCommand_SelectAll
Select all the text (or the whole page).
Definition CAPI_Editor.h:114
@ kEditorCommand_MoveToBeginningOfLine
Move the caret to the start of the line.
Definition CAPI_Editor.h:125
@ kEditorCommand_MoveUp
Move the caret one line up.
Definition CAPI_Editor.h:121
@ kEditorCommand_MoveWordLeft
Move the caret one word left.
Definition CAPI_Editor.h:123
@ kEditorCommand_MoveWordRight
Move the caret one word right.
Definition CAPI_Editor.h:124
@ kEditorCommand_SelectLine
Select the line at the caret.
Definition CAPI_Editor.h:152
@ kEditorCommand_InsertBacktab
Insert a backtab (Shift+Tab).
Definition CAPI_Editor.h:168
@ kEditorCommand_MoveToBeginningOfDocumentAndModifySelection
Select to text start.
Definition CAPI_Editor.h:145
@ kEditorCommand_DeleteWordForward
Delete the word after the caret.
Definition CAPI_Editor.h:160
@ kEditorCommand_Paste
Paste the clipboard's contents.
Definition CAPI_Editor.h:112
@ kEditorCommand_MoveWordRightAndModifySelection
Select one word right.
Definition CAPI_Editor.h:140
@ kEditorCommand_MoveDownAndModifySelection
Select one line down.
Definition CAPI_Editor.h:138
@ kEditorCommand_MoveToEndOfDocument
Move the caret to the end of the text.
Definition CAPI_Editor.h:130
@ kEditorCommand_MovePageUpAndModifySelection
Select one page up.
Definition CAPI_Editor.h:147
@ kEditorCommand_MovePageDownAndModifySelection
Select one page down.
Definition CAPI_Editor.h:148
@ kEditorCommand_MoveWordLeftAndModifySelection
Select one word left.
Definition CAPI_Editor.h:139
@ kEditorCommand_Undo
Undo the last edit.
Definition CAPI_Editor.h:115
@ kEditorCommand_MoveLeft
Move the caret one character left.
Definition CAPI_Editor.h:119
@ kEditorCommand_PasteAsPlainText
Paste the clipboard's text without its formatting.
Definition CAPI_Editor.h:113
@ kEditorCommand_Redo
Redo the last undone edit.
Definition CAPI_Editor.h:116
bool ulEditorInsertText(ULEditor editor, ULString text)
Insert text at the caret, replacing the selection (the same as typing it).
bool ulEditorCanExecute(ULEditor editor, ULEditorCommand command)
Whether or not a command would do anything right now.
ULRect ulEditorGetCaretBounds(ULEditor editor)
Get the bounds of the caret.
bool ulEditorFinishComposition(ULEditor editor)
Keep the active composition's in-progress text as final text.
ULEnterKeyHint
The focused element's enterkeyhint (what label or icon the Enter key should present).
Definition CAPI_Editor.h:498
@ kEnterKeyHint_Enter
Definition CAPI_Editor.h:500
@ kEnterKeyHint_Done
Definition CAPI_Editor.h:501
@ kEnterKeyHint_Send
Definition CAPI_Editor.h:506
@ kEnterKeyHint_Go
Definition CAPI_Editor.h:502
@ kEnterKeyHint_Search
Definition CAPI_Editor.h:505
@ kEnterKeyHint_Unspecified
Definition CAPI_Editor.h:499
@ kEnterKeyHint_Previous
Definition CAPI_Editor.h:504
@ kEnterKeyHint_Next
Definition CAPI_Editor.h:503
Various defines and utility functions for the C API.
struct C_View * ULView
Opaque handle to a View object.
Definition CAPI_Defines.h:87
struct C_String * ULString
Opaque handle to a String object.
Definition CAPI_Defines.h:96
#define ULExport
Definition CAPI_Defines.h:42
struct C_Editor * ULEditor
Opaque handle to a View's Editor object.
Definition CAPI_Defines.h:90
A color value.
Definition CAPI_ColorTypes.h:45
A range of a composition's text, in UTF-16 code units (see ulEditorSetComposition()).
Definition CAPI_Editor.h:238
unsigned int start
The starting offset of the range, in UTF-16 code units.
Definition CAPI_Editor.h:242
unsigned int end
The ending offset of the range (exclusive), in UTF-16 code units.
Definition CAPI_Editor.h:247
Underline style for part of a composition's text (see ulEditorSetComposition()).
Definition CAPI_Editor.h:258
ULCompositionRange range
The range of composition text this segment styles.
Definition CAPI_Editor.h:262
ULColor underline_color
The underline color (unset draws the underline in the text's own color).
Definition CAPI_Editor.h:267
ULColor background_color
A fill drawn behind the text (unset draws no fill).
Definition CAPI_Editor.h:272
bool thick
Whether the underline is drawn thick (the convention for the active clause).
Definition CAPI_Editor.h:277
The conditions that decide whether an input method should be active.
Definition CAPI_Editor.h:519
ULInputMode input_mode
The focused element's inputmode hint.
Definition CAPI_Editor.h:539
ULRect bounds
The focused element's bounds in viewport CSS pixels (the same space as ulViewFireMouseEvent()).
Definition CAPI_Editor.h:550
bool view_has_focus
Whether or not the View itself has input focus (see ulViewFocus() and ulViewUnfocus()).
Definition CAPI_Editor.h:534
bool is_mutable
Whether or not the focused element accepts typed text (false for a read-only or disabled text control...
Definition CAPI_Editor.h:529
ULEditableType type
The kind of element that holds keyboard focus.
Definition CAPI_Editor.h:523
ULEnterKeyHint enter_key_hint
The focused element's enterkeyhint.
Definition CAPI_Editor.h:544
Float rectangle defined by left, top, right, and bottom coordinates.
Definition CAPI_Defines.h:538