gi-ibus-1.5.5: IBus bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Exported types

newtype Text Source #

Memory-managed wrapper type.

Constructors

Text (ManagedPtr Text) 

Instances

Instances details
Eq Text Source # 
Instance details

Defined in GI.IBus.Objects.Text

Methods

(==) :: Text -> Text -> Bool #

(/=) :: Text -> Text -> Bool #

GObject Text Source # 
Instance details

Defined in GI.IBus.Objects.Text

ManagedPtrNewtype Text Source # 
Instance details

Defined in GI.IBus.Objects.Text

Methods

toManagedPtr :: Text -> ManagedPtr Text

TypedObject Text Source # 
Instance details

Defined in GI.IBus.Objects.Text

Methods

glibType :: IO GType

HasParentTypes Text Source # 
Instance details

Defined in GI.IBus.Objects.Text

IsGValue (Maybe Text) Source #

Convert Text to and from GValue. See toGValue and fromGValue.

Instance details

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 # 
Instance details

Defined in GI.IBus.Objects.Text

type ParentTypes Text = '[Serializable, Object, Object]

class (GObject o, IsDescendantOf Text o) => IsText o Source #

Type class for types which can be safely cast to Text, for instance with toText.

Instances

Instances details
(GObject o, IsDescendantOf Text o) => IsText o Source # 
Instance details

Defined in GI.IBus.Objects.Text

toText :: (MonadIO m, IsText o) => o -> m Text Source #

Cast to Text, for types for which this is known to be safe. For general casts, use castTo.

Methods

appendAttribute

textAppendAttribute Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

text: an IBusText

-> Word32

type: IBusAttributeType for text.

-> Word32

value: Value for the type.

-> Word32

startIndex: The starting index, inclusive.

-> Int32

endIndex: The ending index, exclusive.

-> m () 

Append an IBusAttribute for IBusText.

getAttributes

textGetAttributes Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

text: An Text.

-> m AttrList

Returns: the attrs in text.

Return the attributes in an Text. Should not be freed.

getLength

textGetLength Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

text: An Text.

-> m Word32

Returns: Number of character in text, not counted by bytes.

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

textGetText Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

text: An Text.

-> m Text

Returns: the text in text.

Return the text in an Text. Should not be freed.

newFromString

textNewFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

str: An text string to be set.

-> m Text

Returns: A newly allocated Text.

Creates a new Text from a string. str will be duplicated in Text, so feel free to free str after this function.

newFromUcs4

textNewFromUcs4 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Char

str: An text string to be set.

-> m Text

Returns: A newly allocated Text.

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

textNewFromUnichar Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Char

c: A single UCS4-encoded character.

-> m Text

Returns: A newly allocated Text.

Creates a new Text from a single UCS4-encoded character.

setAttributes

textSetAttributes Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a, IsAttrList b) 
=> a

text: An IBusText.

-> b

attrs: An IBusAttrList

-> m () 

No description available in the introspection data.