| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.IBus.Objects.Text
Description
An IBusText is the main text object in IBus. The text is decorated according to associated IBusAttribute, e.g. the foreground/background color, underline, and applied scope.
see_also: Attribute
Synopsis
- newtype Text = Text (ManagedPtr Text)
- class (GObject o, IsDescendantOf Text o) => IsText o
- toText :: (MonadIO m, IsText o) => o -> m Text
- textAppendAttribute :: (HasCallStack, MonadIO m, IsText a) => a -> Word32 -> Word32 -> Word32 -> Int32 -> m ()
- textGetAttributes :: (HasCallStack, MonadIO m, IsText a) => a -> m AttrList
- textGetLength :: (HasCallStack, MonadIO m, IsText a) => a -> m Word32
- textGetText :: (HasCallStack, MonadIO m, IsText a) => a -> m Text
- textNewFromString :: (HasCallStack, MonadIO m) => Text -> m Text
- textNewFromUcs4 :: (HasCallStack, MonadIO m) => Char -> m Text
- textNewFromUnichar :: (HasCallStack, MonadIO m) => Char -> m Text
- textSetAttributes :: (HasCallStack, MonadIO m, IsText a, IsAttrList b) => a -> b -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq Text Source # | |
| GObject Text Source # | |
Defined in GI.IBus.Objects.Text | |
| ManagedPtrNewtype Text Source # | |
Defined in GI.IBus.Objects.Text Methods toManagedPtr :: Text -> ManagedPtr Text | |
| TypedObject Text Source # | |
Defined in GI.IBus.Objects.Text Methods glibType :: IO GType | |
| IsGValue Text Source # | Convert |
Defined in GI.IBus.Objects.Text | |
| HasParentTypes Text Source # | |
Defined in GI.IBus.Objects.Text | |
| type ParentTypes Text Source # | |
Defined in GI.IBus.Objects.Text | |
class (GObject o, IsDescendantOf Text o) => IsText o Source #
Instances
| (GObject o, IsDescendantOf Text o) => IsText o Source # | |
Defined in GI.IBus.Objects.Text | |
Methods
Overloaded methods
appendAttribute
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Int32 |
|
| -> m () |
Append an IBusAttribute for IBusText.
getAttributes
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m AttrList | Returns: the attrs in |
Return the attributes in an Text. Should not be freed.
getLength
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Word32 | Returns: Number of character in |
Return number of characters in an Text.
This function is based on utf8Strlen, so unlike strlen(),
it does not count by bytes but characters instead.
getText
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Text | Returns: the text in |
Return the text in an Text. Should not be freed.
newFromString
newFromUcs4
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Char |
|
| -> m Text | Returns: A newly allocated |
Creates a new Text from an UCS-4 encoded string.
str will be duplicated in IBusText, so feel free to free str after this
function.
newFromUnichar
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Char |
|
| -> m Text | Returns: A newly allocated |
Creates a new Text from a single UCS4-encoded character.
setAttributes
Arguments
| :: (HasCallStack, MonadIO m, IsText a, IsAttrList b) | |
| => a |
|
| -> b |
|
| -> m () |
No description available in the introspection data.