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.LookupTable

Description

An IBusLookuptable stores the candidate words or phrases for users to choose from.

Use engineUpdateLookupTable, engineShowLookupTable, and engineHideLookupTable to update, show and hide the lookup table.

see_also: Engine

Synopsis

Exported types

newtype LookupTable Source #

Memory-managed wrapper type.

Constructors

LookupTable (ManagedPtr LookupTable) 

Instances

Instances details
Eq LookupTable Source # 
Instance details

Defined in GI.IBus.Objects.LookupTable

GObject LookupTable Source # 
Instance details

Defined in GI.IBus.Objects.LookupTable

ManagedPtrNewtype LookupTable Source # 
Instance details

Defined in GI.IBus.Objects.LookupTable

Methods

toManagedPtr :: LookupTable -> ManagedPtr LookupTable

TypedObject LookupTable Source # 
Instance details

Defined in GI.IBus.Objects.LookupTable

Methods

glibType :: IO GType

HasParentTypes LookupTable Source # 
Instance details

Defined in GI.IBus.Objects.LookupTable

IsGValue (Maybe LookupTable) Source #

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

Instance details

Defined in GI.IBus.Objects.LookupTable

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe LookupTable -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe LookupTable)

type ParentTypes LookupTable Source # 
Instance details

Defined in GI.IBus.Objects.LookupTable

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

class (GObject o, IsDescendantOf LookupTable o) => IsLookupTable o Source #

Type class for types which can be safely cast to LookupTable, for instance with toLookupTable.

Instances

Instances details
(GObject o, IsDescendantOf LookupTable o) => IsLookupTable o Source # 
Instance details

Defined in GI.IBus.Objects.LookupTable

toLookupTable :: (MonadIO m, IsLookupTable o) => o -> m LookupTable Source #

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

Methods

appendCandidate

lookupTableAppendCandidate Source #

Arguments

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

table: An IBusLookupTable.

-> b

text: candidate word/phrase to be appended (in IBusText format).

-> m () 

Append a candidate word/phrase to IBusLookupTable, and increase reference.

appendLabel

lookupTableAppendLabel Source #

Arguments

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

table: An IBusLookupTable.

-> b

text: A candidate label to be appended (in IBusText format).

-> m () 

Append a candidate word/phrase to IBusLookupTable, and increase reference. This function is needed if the input method select candidate with non-numeric keys such as "asdfghjkl;".

clear

lookupTableClear Source #

Arguments

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

table: An IBusLookupTable.

-> m () 

Clear and remove all candidate from an IBusLookupTable.

cursorDown

lookupTableCursorDown Source #

Arguments

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

table: An IBusLookupTable.

-> m Bool

Returns: True if succeed.

Go to next candidate of an LookupTable.

It returns FALSE if it is already at the last candidate, unless <code>table&gt;-round==TRUE</code>, where it will go to the first candidate.

cursorUp

lookupTableCursorUp Source #

Arguments

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

table: An IBusLookupTable.

-> m Bool

Returns: True if succeed.

Go to previous candidate of an LookupTable.

It returns FALSE if it is already at the first candidate, unless <code>table&gt;-round==TRUE</code>, where it will go to the last candidate.

getCandidate

lookupTableGetCandidate Source #

Arguments

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

table: An IBusLookupTable.

-> Word32

index: Index in the Lookup table.

-> m Text

Returns: IBusText at the given index; NULL if no such Text.

Return Text at the given index. Borrowed reference.

getCursorInPage

lookupTableGetCursorInPage Source #

Arguments

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

table: An IBusLookupTable.

-> m Word32

Returns: The position of cursor in current page.

Gets the cursor position in current page of LookupTable.

getCursorPos

lookupTableGetCursorPos Source #

Arguments

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

table: An IBusLookupTable.

-> m Word32

Returns: The position of cursor.

Gets the cursor position of LookupTable.

getLabel

lookupTableGetLabel Source #

Arguments

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

table: An IBusLookupTable.

-> Word32

index: Index in the Lookup table.

-> m Text

Returns: Text at the given index; Nothing if no such Text.

Return Text at the given index. Borrowed reference.

getNumberOfCandidates

lookupTableGetNumberOfCandidates Source #

Arguments

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

table: An IBusLookupTable.

-> m Word32

Returns: The number of candidates in the table

Return the number of candidate in the table.

getOrientation

lookupTableGetOrientation Source #

Arguments

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

table: An IBusLookupTable.

-> m Int32

Returns: The orientation of the table.

Returns the orientation of the LookupTable.

getPageSize

lookupTableGetPageSize Source #

Arguments

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

table: An IBusLookupTable.

-> m Word32

Returns: Page size, i.e., number of candidate shown per page. dd

Gets the number of candidate shown per page.

isCursorVisible

lookupTableIsCursorVisible Source #

Arguments

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

table: An LookupTable.

-> m Bool

Returns: Whether the cursor of table is visible.

Returns whether the cursor of an LookupTable is visible.

isRound

lookupTableIsRound Source #

Arguments

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

table: An IBusLookupTable.

-> m Bool

Returns: Whether the table is round.

Returns whether the LookupTable is round.

new

lookupTableNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

pageSize: number of candidate shown per page, the max value is 16.

-> Word32

cursorPos: position index of cursor.

-> Bool

cursorVisible: whether the cursor is visible.

-> Bool

round: TRUE for lookup table wrap around.

-> m LookupTable

Returns: A newly allocated LookupTable.

Craetes a new LookupTable.

pageDown

lookupTablePageDown Source #

Arguments

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

table: An IBusLookupTable.

-> m Bool

Returns: True if succeed.

Go to next page of an LookupTable.

It returns FALSE if it is already at the last page, unless <code>table&gt;-round==TRUE</code>, where it will go to the first page.

pageUp

lookupTablePageUp Source #

Arguments

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

table: An IBusLookupTable.

-> m Bool

Returns: True if succeed.

Go to previous page of an LookupTable.

It returns FALSE if it is already at the first page, unless <code>table&gt;-round==TRUE</code>, where it will go to the last page.

setCursorPos

lookupTableSetCursorPos Source #

Arguments

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

table: An IBusLookupTable.

-> Word32

cursorPos: The position of cursor.

-> m () 

Set the cursor position of IBusLookupTable.

setCursorVisible

lookupTableSetCursorVisible Source #

Arguments

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

table: An IBusLookupTable.

-> Bool

visible: Whether to make the cursor of table visible.

-> m () 

Set whether to make the cursor of an IBusLookupTable visible or not.

setLabel

lookupTableSetLabel Source #

Arguments

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

table: An IBusLookupTable.

-> Word32

index: Intex in the Lookup table.

-> b

text: A candidate label to be appended (in IBusText format).

-> m () 

Append a candidate word/phrase to IBusLookupTable, and increase reference. This function is needed if the input method select candidate with non-numeric keys such as "asdfghjkl;".

setOrientation

lookupTableSetOrientation Source #

Arguments

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

table: An IBusLookupTable.

-> Int32

orientation: .

-> m () 

Set the orientation.

setPageSize

lookupTableSetPageSize Source #

Arguments

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

table: An IBusLookupTable.

-> Word32

pageSize: number of candidate shown per page.

-> m () 

Set the number of candidate shown per page.

setRound

lookupTableSetRound Source #

Arguments

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

table: An IBusLookupTable.

-> Bool

round: Whether to make table round.

-> m () 

Set whether to make the IBusLookupTable round or not.