| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Atk.Interfaces.Text
Contents
- Exported types
- Methods
- addSelection
- freeRanges
- getBoundedRanges
- getCaretOffset
- getCharacterAtOffset
- getCharacterCount
- getCharacterExtents
- getDefaultAttributes
- getNSelections
- getOffsetAtPoint
- getRangeExtents
- getRunAttributes
- getSelection
- getStringAtOffset
- getText
- getTextAfterOffset
- getTextAtOffset
- getTextBeforeOffset
- removeSelection
- scrollSubstringTo
- scrollSubstringToPoint
- setCaretOffset
- setSelection
- Signals
Description
The ATK interface implemented by components with text content.
Text should be implemented by AtkObjects on behalf of widgets
that have text content which is either attributed or otherwise
non-trivial. AtkObjects whose text content is simple,
unattributed, and very brief may expose that content via
atk_object_get_name instead; however if the text is editable,
multi-line, typically longer than three or four words, attributed,
selectable, or if the object already uses the 'name' ATK property
for other information, the Text interface should be used to
expose the text content. In the case of editable text content,
EditableText (a subtype of the Text interface) should be
implemented instead.
Text provides not only traversal facilities and change
notification for text content, but also caret tracking and glyph
bounding box calculations. Note that the text strings are exposed
as UTF-8, and are therefore potentially multi-byte, and
caret-to-byte offset mapping makes no assumptions about the
character length; also bounding box glyph-to-offset mapping may be
complex for languages which use ligatures.
Synopsis
- newtype Text = Text (ManagedPtr Text)
- class (GObject o, IsDescendantOf Text o) => IsText o
- toText :: (MonadIO m, IsText o) => o -> m Text
- type family ResolveTextMethod (t :: Symbol) o where ...
- data TextAddSelectionMethodInfo
- textAddSelection :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> Int32 -> m Bool
- textFreeRanges :: (HasCallStack, MonadIO m) => [TextRange] -> m ()
- data TextGetBoundedRangesMethodInfo
- textGetBoundedRanges :: (HasCallStack, MonadIO m, IsText a) => a -> TextRectangle -> CoordType -> TextClipType -> TextClipType -> m [TextRange]
- data TextGetCaretOffsetMethodInfo
- textGetCaretOffset :: (HasCallStack, MonadIO m, IsText a) => a -> m Int32
- data TextGetCharacterAtOffsetMethodInfo
- textGetCharacterAtOffset :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> m Char
- data TextGetCharacterCountMethodInfo
- textGetCharacterCount :: (HasCallStack, MonadIO m, IsText a) => a -> m Int32
- data TextGetCharacterExtentsMethodInfo
- textGetCharacterExtents :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> CoordType -> m (Int32, Int32, Int32, Int32)
- data TextGetDefaultAttributesMethodInfo
- textGetDefaultAttributes :: (HasCallStack, MonadIO m, IsText a) => a -> m [Ptr ()]
- data TextGetNSelectionsMethodInfo
- textGetNSelections :: (HasCallStack, MonadIO m, IsText a) => a -> m Int32
- data TextGetOffsetAtPointMethodInfo
- textGetOffsetAtPoint :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> Int32 -> CoordType -> m Int32
- data TextGetRangeExtentsMethodInfo
- textGetRangeExtents :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> Int32 -> CoordType -> m TextRectangle
- data TextGetRunAttributesMethodInfo
- textGetRunAttributes :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> m ([Ptr ()], Int32, Int32)
- data TextGetSelectionMethodInfo
- textGetSelection :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> m (Text, Int32, Int32)
- data TextGetStringAtOffsetMethodInfo
- textGetStringAtOffset :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> TextGranularity -> m (Maybe Text, Int32, Int32)
- data TextGetTextMethodInfo
- textGetText :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> Int32 -> m Text
- data TextGetTextAfterOffsetMethodInfo
- textGetTextAfterOffset :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> TextBoundary -> m (Text, Int32, Int32)
- data TextGetTextAtOffsetMethodInfo
- textGetTextAtOffset :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> TextBoundary -> m (Text, Int32, Int32)
- data TextGetTextBeforeOffsetMethodInfo
- textGetTextBeforeOffset :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> TextBoundary -> m (Text, Int32, Int32)
- data TextRemoveSelectionMethodInfo
- textRemoveSelection :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> m Bool
- data TextScrollSubstringToMethodInfo
- textScrollSubstringTo :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> Int32 -> ScrollType -> m Bool
- data TextScrollSubstringToPointMethodInfo
- textScrollSubstringToPoint :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> Int32 -> CoordType -> Int32 -> Int32 -> m Bool
- data TextSetCaretOffsetMethodInfo
- textSetCaretOffset :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> m Bool
- data TextSetSelectionMethodInfo
- textSetSelection :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> Int32 -> Int32 -> m Bool
- type TextTextAttributesChangedCallback = IO ()
- data TextTextAttributesChangedSignalInfo
- afterTextTextAttributesChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextAttributesChangedCallback) -> m SignalHandlerId
- onTextTextAttributesChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextAttributesChangedCallback) -> m SignalHandlerId
- type TextTextCaretMovedCallback = Int32 -> IO ()
- data TextTextCaretMovedSignalInfo
- afterTextTextCaretMoved :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextCaretMovedCallback) -> m SignalHandlerId
- onTextTextCaretMoved :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextCaretMovedCallback) -> m SignalHandlerId
- type TextTextChangedCallback = Int32 -> Int32 -> IO ()
- data TextTextChangedSignalInfo
- afterTextTextChanged :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextChangedCallback) -> m SignalHandlerId
- onTextTextChanged :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextChangedCallback) -> m SignalHandlerId
- type TextTextInsertCallback = Int32 -> Int32 -> Text -> IO ()
- data TextTextInsertSignalInfo
- afterTextTextInsert :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextInsertCallback) -> m SignalHandlerId
- onTextTextInsert :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextInsertCallback) -> m SignalHandlerId
- type TextTextRemoveCallback = Int32 -> Int32 -> Text -> IO ()
- data TextTextRemoveSignalInfo
- afterTextTextRemove :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextRemoveCallback) -> m SignalHandlerId
- onTextTextRemove :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextRemoveCallback) -> m SignalHandlerId
- type TextTextSelectionChangedCallback = IO ()
- data TextTextSelectionChangedSignalInfo
- afterTextTextSelectionChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextSelectionChangedCallback) -> m SignalHandlerId
- onTextTextSelectionChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextSelectionChangedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Constructors
| Text (ManagedPtr Text) |
Instances
class (GObject o, IsDescendantOf Text o) => IsText o Source #
Instances
| (GObject o, IsDescendantOf Text o) => IsText o Source # | |
Defined in GI.Atk.Interfaces.Text | |
Methods
Click to display all available methods, including inherited ones
Methods
addSelection, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, removeSelection, runDispose, scrollSubstringTo, scrollSubstringToPoint, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBoundedRanges, getCaretOffset, getCharacterAtOffset, getCharacterCount, getCharacterExtents, getData, getDefaultAttributes, getNSelections, getOffsetAtPoint, getProperty, getQdata, getRangeExtents, getRunAttributes, getSelection, getStringAtOffset, getText, getTextAfterOffset, getTextAtOffset, getTextBeforeOffset.
Setters
setCaretOffset, setData, setDataFull, setProperty, setSelection.
type family ResolveTextMethod (t :: Symbol) o where ... Source #
Equations
addSelection
data TextAddSelectionMethodInfo Source #
Instances
| (signature ~ (Int32 -> Int32 -> m Bool), MonadIO m, IsText a) => OverloadedMethod TextAddSelectionMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextAddSelectionMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> m Bool |
Adds a selection bounded by the specified offsets.
freeRanges
Arguments
| :: (HasCallStack, MonadIO m) | |
| => [TextRange] |
|
| -> m () |
Frees the memory associated with an array of AtkTextRange. It is assumed that the array was returned by the function atk_text_get_bounded_ranges and is NULL terminated.
Since: 1.3
getBoundedRanges
data TextGetBoundedRangesMethodInfo Source #
Instances
| (signature ~ (TextRectangle -> CoordType -> TextClipType -> TextClipType -> m [TextRange]), MonadIO m, IsText a) => OverloadedMethod TextGetBoundedRangesMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetBoundedRangesMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> TextRectangle |
|
| -> CoordType |
|
| -> TextClipType |
|
| -> TextClipType |
|
| -> m [TextRange] | Returns: Array of AtkTextRange. The last element of the array returned by this function will be NULL. |
Get the ranges of text in the specified bounding box.
Since: 1.3
getCaretOffset
data TextGetCaretOffsetMethodInfo Source #
Instances
| (signature ~ m Int32, MonadIO m, IsText a) => OverloadedMethod TextGetCaretOffsetMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetCaretOffsetMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Int32 | Returns: the character offset of the position of the caret or -1 if the caret is not located inside the element or in the case of any other failure. |
Gets the offset of the position of the caret (cursor).
getCharacterAtOffset
data TextGetCharacterAtOffsetMethodInfo Source #
Instances
| (signature ~ (Int32 -> m Char), MonadIO m, IsText a) => OverloadedMethod TextGetCharacterAtOffsetMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetCharacterAtOffsetMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textGetCharacterAtOffset Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> m Char | Returns: the character at |
Gets the specified text.
getCharacterCount
data TextGetCharacterCountMethodInfo Source #
Instances
| (signature ~ m Int32, MonadIO m, IsText a) => OverloadedMethod TextGetCharacterCountMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetCharacterCountMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textGetCharacterCount Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Int32 | Returns: the number of characters or -1 in case of failure. |
Gets the character count.
getCharacterExtents
data TextGetCharacterExtentsMethodInfo Source #
Instances
| (signature ~ (Int32 -> CoordType -> m (Int32, Int32, Int32, Int32)), MonadIO m, IsText a) => OverloadedMethod TextGetCharacterExtentsMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetCharacterExtentsMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textGetCharacterExtents Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> CoordType |
|
| -> m (Int32, Int32, Int32, Int32) |
If the extent can not be obtained (e.g. missing support), all of x, y, width, height are set to -1.
Get the bounding box containing the glyph representing the character at a particular text offset.
getDefaultAttributes
data TextGetDefaultAttributesMethodInfo Source #
Instances
| (signature ~ m [Ptr ()], MonadIO m, IsText a) => OverloadedMethod TextGetDefaultAttributesMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetDefaultAttributesMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textGetDefaultAttributes Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m [Ptr ()] | Returns: an |
Creates an AtkAttributeSet which consists of the default values of
attributes for the text. See the enum AtkTextAttribute for types of text
attributes that can be returned. Note that other attributes may also be
returned.
getNSelections
data TextGetNSelectionsMethodInfo Source #
Instances
| (signature ~ m Int32, MonadIO m, IsText a) => OverloadedMethod TextGetNSelectionsMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetNSelectionsMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Int32 | Returns: The number of selected regions, or -1 in the case of failure. |
Gets the number of selected regions.
getOffsetAtPoint
data TextGetOffsetAtPointMethodInfo Source #
Instances
| (signature ~ (Int32 -> Int32 -> CoordType -> m Int32), MonadIO m, IsText a) => OverloadedMethod TextGetOffsetAtPointMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetOffsetAtPointMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> CoordType |
|
| -> m Int32 | Returns: the offset to the character which is located at the specified
|
Gets the offset of the character located at coordinates x and y. x and y
are interpreted as being relative to the screen or this widget's window
depending on coords.
getRangeExtents
data TextGetRangeExtentsMethodInfo Source #
Instances
| (signature ~ (Int32 -> Int32 -> CoordType -> m TextRectangle), MonadIO m, IsText a) => OverloadedMethod TextGetRangeExtentsMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetRangeExtentsMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> CoordType |
|
| -> m TextRectangle |
Get the bounding box for text within the specified range.
If the extents can not be obtained (e.g. or missing support), the rectangle fields are set to -1.
Since: 1.3
getRunAttributes
data TextGetRunAttributesMethodInfo Source #
Instances
| (signature ~ (Int32 -> m ([Ptr ()], Int32, Int32)), MonadIO m, IsText a) => OverloadedMethod TextGetRunAttributesMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetRunAttributesMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> m ([Ptr ()], Int32, Int32) | Returns: an |
Creates an AtkAttributeSet which consists of the attributes explicitly
set at the position offset in the text. startOffset and endOffset are
set to the start and end of the range around offset where the attributes are
invariant. Note that endOffset is the offset of the first character
after the range. See the enum AtkTextAttribute for types of text
attributes that can be returned. Note that other attributes may also be
returned.
getSelection
data TextGetSelectionMethodInfo Source #
Instances
| (signature ~ (Int32 -> m (Text, Int32, Int32)), MonadIO m, IsText a) => OverloadedMethod TextGetSelectionMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetSelectionMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> m (Text, Int32, Int32) | Returns: a newly allocated string containing the selected text. Use |
Gets the text from the specified selection.
getStringAtOffset
data TextGetStringAtOffsetMethodInfo Source #
Instances
| (signature ~ (Int32 -> TextGranularity -> m (Maybe Text, Int32, Int32)), MonadIO m, IsText a) => OverloadedMethod TextGetStringAtOffsetMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetStringAtOffsetMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textGetStringAtOffset Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> TextGranularity |
|
| -> m (Maybe Text, Int32, Int32) | Returns: a newly allocated string containing the text at
the |
Gets a portion of the text exposed through an Text according to a given offset
and a specific granularity, along with the start and end offsets defining the
boundaries of such a portion of text.
If granularity is ATK_TEXT_GRANULARITY_CHAR the character at the
offset is returned.
If granularity is ATK_TEXT_GRANULARITY_WORD the returned string
is from the word start at or before the offset to the word start after
the offset.
The returned string will contain the word at the offset if the offset is inside a word and will contain the word before the offset if the offset is not inside a word.
If granularity is ATK_TEXT_GRANULARITY_SENTENCE the returned string
is from the sentence start at or before the offset to the sentence
start after the offset.
The returned string will contain the sentence at the offset if the offset is inside a sentence and will contain the sentence before the offset if the offset is not inside a sentence.
If granularity is ATK_TEXT_GRANULARITY_LINE the returned string
is from the line start at or before the offset to the line
start after the offset.
If granularity is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string
is from the start of the paragraph at or before the offset to the start
of the following paragraph after the offset.
Since: 2.10
getText
data TextGetTextMethodInfo Source #
Instances
| (signature ~ (Int32 -> Int32 -> m Text), MonadIO m, IsText a) => OverloadedMethod TextGetTextMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetTextMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> m Text | Returns: a newly allocated string containing the text from |
Gets the specified text.
getTextAfterOffset
data TextGetTextAfterOffsetMethodInfo Source #
Instances
| (signature ~ (Int32 -> TextBoundary -> m (Text, Int32, Int32)), MonadIO m, IsText a) => OverloadedMethod TextGetTextAfterOffsetMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetTextAfterOffsetMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textGetTextAfterOffset Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> TextBoundary |
|
| -> m (Text, Int32, Int32) | Returns: a newly allocated string containing the text after |
Deprecated: (Since version 2.9.3)Please use textGetStringAtOffset instead.
Gets the specified text.
getTextAtOffset
data TextGetTextAtOffsetMethodInfo Source #
Instances
| (signature ~ (Int32 -> TextBoundary -> m (Text, Int32, Int32)), MonadIO m, IsText a) => OverloadedMethod TextGetTextAtOffsetMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetTextAtOffsetMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> TextBoundary |
|
| -> m (Text, Int32, Int32) | Returns: a newly allocated string containing the text at |
Deprecated: This method is deprecated since ATK version2.9.4. Please use textGetStringAtOffset instead.
Gets the specified text.
If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the offset is returned.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string is from the word start at or before the offset to the word start after the offset.
The returned string will contain the word at the offset if the offset is inside a word and will contain the word before the offset if the offset is not inside a word.
If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned string is from the sentence start at or before the offset to the sentence start after the offset.
The returned string will contain the sentence at the offset if the offset is inside a sentence and will contain the sentence before the offset if the offset is not inside a sentence.
If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned string is from the line start at or before the offset to the line start after the offset.
getTextBeforeOffset
data TextGetTextBeforeOffsetMethodInfo Source #
Instances
| (signature ~ (Int32 -> TextBoundary -> m (Text, Int32, Int32)), MonadIO m, IsText a) => OverloadedMethod TextGetTextBeforeOffsetMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextGetTextBeforeOffsetMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textGetTextBeforeOffset Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> TextBoundary |
|
| -> m (Text, Int32, Int32) | Returns: a newly allocated string containing the text before |
Deprecated: (Since version 2.9.3)Please use textGetStringAtOffset instead.
Gets the specified text.
removeSelection
data TextRemoveSelectionMethodInfo Source #
Instances
| (signature ~ (Int32 -> m Bool), MonadIO m, IsText a) => OverloadedMethod TextRemoveSelectionMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextRemoveSelectionMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> m Bool |
Removes the specified selection.
scrollSubstringTo
data TextScrollSubstringToMethodInfo Source #
Instances
| (signature ~ (Int32 -> Int32 -> ScrollType -> m Bool), MonadIO m, IsText a) => OverloadedMethod TextScrollSubstringToMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextScrollSubstringToMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textScrollSubstringTo Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> ScrollType |
|
| -> m Bool | Returns: whether scrolling was successful. |
Makes a substring of text visible on the screen by scrolling all necessary parents.
Since: 2.32
scrollSubstringToPoint
data TextScrollSubstringToPointMethodInfo Source #
Instances
| (signature ~ (Int32 -> Int32 -> CoordType -> Int32 -> Int32 -> m Bool), MonadIO m, IsText a) => OverloadedMethod TextScrollSubstringToPointMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextScrollSubstringToPointMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
textScrollSubstringToPoint Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> CoordType |
|
| -> Int32 |
|
| -> Int32 |
|
| -> m Bool | Returns: whether scrolling was successful. |
Move the top-left of a substring of text to a given position of the screen
by scrolling all necessary parents.
Since: 2.32
setCaretOffset
data TextSetCaretOffsetMethodInfo Source #
Instances
| (signature ~ (Int32 -> m Bool), MonadIO m, IsText a) => OverloadedMethod TextSetCaretOffsetMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextSetCaretOffsetMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> m Bool |
Sets the caret (cursor) position to the specified offset.
In the case of rich-text content, this method should either grab focus or move the sequential focus navigation starting point (if the application supports this concept) as if the user had clicked on the new caret position. Typically, this means that the target of this operation is the node containing the new caret position or one of its ancestors. In other words, after this method is called, if the user advances focus, it should move to the first focusable node following the new caret position.
Calling this method should also scroll the application viewport in a way that matches the behavior of the application's typical caret motion or tab navigation as closely as possible. This also means that if the application's caret motion or focus navigation does not trigger a scroll operation, this method should not trigger one either. If the application does not have a caret motion or focus navigation operation, this method should try to scroll the new caret position into view while minimizing unnecessary scroll motion.
setSelection
data TextSetSelectionMethodInfo Source #
Instances
| (signature ~ (Int32 -> Int32 -> Int32 -> m Bool), MonadIO m, IsText a) => OverloadedMethod TextSetSelectionMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Text Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo TextSetSelectionMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Text Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> Int32 |
|
| -> m Bool |
Changes the start and end offset of the specified selection.
Signals
textAttributesChanged
type TextTextAttributesChangedCallback = IO () Source #
The "text-attributes-changed" signal is emitted when the text attributes of the text of an object which implements AtkText changes.
data TextTextAttributesChangedSignalInfo Source #
Instances
| SignalInfo TextTextAttributesChangedSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Text Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType TextTextAttributesChangedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType TextTextAttributesChangedSignalInfo Source # | |||||
afterTextTextAttributesChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextAttributesChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textAttributesChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #textAttributesChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onTextTextAttributesChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextAttributesChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textAttributesChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #textAttributesChanged callback
textCaretMoved
type TextTextCaretMovedCallback Source #
The "text-caret-moved" signal is emitted when the caret position of the text of an object which implements AtkText changes.
data TextTextCaretMovedSignalInfo Source #
Instances
| SignalInfo TextTextCaretMovedSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Text Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType TextTextCaretMovedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType TextTextCaretMovedSignalInfo Source # | |||||
afterTextTextCaretMoved :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextCaretMovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textCaretMoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #textCaretMoved callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onTextTextCaretMoved :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextCaretMovedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textCaretMoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #textCaretMoved callback
textChanged
type TextTextChangedCallback Source #
Arguments
| = Int32 |
|
| -> Int32 |
|
| -> IO () |
The "text-changed" signal is emitted when the text of the object which implements the AtkText interface changes, This signal will have a detail which is either "insert" or "delete" which identifies whether the text change was an insertion or a deletion.
data TextTextChangedSignalInfo Source #
Instances
| SignalInfo TextTextChangedSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Text Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType TextTextChangedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType TextTextChangedSignalInfo Source # | |||||
afterTextTextChanged :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #textChanged callback
This signal admits a optional parameter detail.
If it's not Nothing, we will connect to “text-changed::detail” instead.
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onTextTextChanged :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #textChanged callback
This signal admits a optional parameter detail.
If it's not Nothing, we will connect to “text-changed::detail” instead.
textInsert
type TextTextInsertCallback Source #
Arguments
| = Int32 |
|
| -> Int32 |
|
| -> Text |
|
| -> IO () |
The "text-insert" signal is emitted when a new text is inserted. If the signal was not triggered by the user (e.g. typing or pasting text), the "system" detail should be included.
data TextTextInsertSignalInfo Source #
Instances
| SignalInfo TextTextInsertSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Text Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType TextTextInsertSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType TextTextInsertSignalInfo Source # | |||||
afterTextTextInsert :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextInsertCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textInsert signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #textInsert callback
This signal admits a optional parameter detail.
If it's not Nothing, we will connect to “text-insert::detail” instead.
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onTextTextInsert :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextInsertCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textInsert signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #textInsert callback
This signal admits a optional parameter detail.
If it's not Nothing, we will connect to “text-insert::detail” instead.
textRemove
type TextTextRemoveCallback Source #
Arguments
| = Int32 |
|
| -> Int32 |
|
| -> Text |
|
| -> IO () |
The "text-remove" signal is emitted when a new text is removed. If the signal was not triggered by the user (e.g. typing or pasting text), the "system" detail should be included.
data TextTextRemoveSignalInfo Source #
Instances
| SignalInfo TextTextRemoveSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Text Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType TextTextRemoveSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType TextTextRemoveSignalInfo Source # | |||||
afterTextTextRemove :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextRemoveCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textRemove signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #textRemove callback
This signal admits a optional parameter detail.
If it's not Nothing, we will connect to “text-remove::detail” instead.
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onTextTextRemove :: (IsText a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => TextTextRemoveCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textRemove signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #textRemove callback
This signal admits a optional parameter detail.
If it's not Nothing, we will connect to “text-remove::detail” instead.
textSelectionChanged
type TextTextSelectionChangedCallback = IO () Source #
The "text-selection-changed" signal is emitted when the selected text of an object which implements AtkText changes.
data TextTextSelectionChangedSignalInfo Source #
Instances
| SignalInfo TextTextSelectionChangedSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Text Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType TextTextSelectionChangedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType TextTextSelectionChangedSignalInfo Source # | |||||
afterTextTextSelectionChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextSelectionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textSelectionChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #textSelectionChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onTextTextSelectionChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextSelectionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the textSelectionChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #textSelectionChanged callback