Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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 | |
HasParentTypes Text Source # | |
Defined in GI.IBus.Objects.Text | |
IsGValue (Maybe Text) Source # | Convert |
Defined in GI.IBus.Objects.Text Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Text -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe 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
Click to display all available methods, including inherited ones
Methods
appendAttribute, bindProperty, bindPropertyFull, copy, destroy, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, removeQattachment, runDispose, serializeObject, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAttributes, getData, getLength, getProperty, getQattachment, getQdata, getText.
Setters
setAttributes, setData, setDataFull, setProperty, setQattachment.
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
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Text | Returns: A newly allocated |
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.