gi-ibus-1.5.2: IBus bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.IBus.Functions

Description

 
Synopsis

Methods

acceleratorName

acceleratorName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

acceleratorKey: accelerator keyval

-> [ModifierType]

acceleratorMods: accelerator modifier mask

-> m Text

Returns: a newly-allocated accelerator name

Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse(). For example, if you pass in KEY_q and IBUS_CONTROL_MASK, this function returns “<Control>q”.

If you need to display accelerators in the user interface, see gtk_accelerator_get_label().

acceleratorParse

acceleratorParse Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

accelerator: string representing an accelerator

-> m (Word32, [ModifierType]) 

Parses a string representing an accelerator. The format looks like “<Control>a” or “<Shift><Alt>F1” or “<Release>z” (the last one is for key release).

The parser is fairly liberal and allows lower or upper case, and also abbreviations such as “<Ctl>” and “<Ctrl>”. Key names are parsed using gdk_keyval_from_name(). For character keys the name is not the symbol, but the lowercase name, e.g. one would use “<Ctrl>minus” instead of “<Ctrl>-”.

If the parse fails, acceleratorKey and acceleratorMods will be set to 0 (zero).

Since: 1.5.18

acceleratorValid

acceleratorValid Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

keyval: a GDK keyval

-> [ModifierType]

modifiers: modifier mask

-> m Bool

Returns: True if the accelerator is valid

Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator. For example, the KEY_a keyval plus IBUS_CONTROL_MASK is valid - this is a “Ctrl+a” accelerator. But, you can't, for instance, use the KEY_Control_L keyval as an accelerator.

attrBackgroundNew

attrBackgroundNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

color: Color in RGB.

-> Word32

startIndex: Where attribute starts.

-> Word32

endIndex: Where attribute ends.

-> m Attribute

Returns: A newly allocated Attribute.

Creates a new background Attribute.

attrForegroundNew

attrForegroundNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

color: Color in RGB.

-> Word32

startIndex: Where attribute starts.

-> Word32

endIndex: Where attribute ends.

-> m Attribute

Returns: A newly allocated Attribute.

Creates a new foreground Attribute.

emojiDictLoad

emojiDictLoad Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

path: A path of the saved dictionary file.

-> m (Map Text (Ptr ()))

Returns: An Emoji dictionary file loaded from the saved cache file.

A hash table of { emoji character, EmojiData object } is loaded from the saved cache file. Recommend to use emojiDataLoad instead becase GSList in GHashTable does not work with Gir and Vala. Calls emojiDataLoad internally.

No description available in the introspection data.

emojiDictSave

emojiDictSave Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

path: A path of the saved dictionary file.

-> Map Text (Ptr ())

dict: An Emoji dictionary

-> m () 

Saves the Emoji dictionary to the cache file. Recommend to use emojiDataSave instead becase GSList in GHashTable does not work with Gir and Vala. Calls emojiDataSave internally. The format of the hash table changed and now is { emoji character, EmojiData object }.

freeStrv

freeStrv Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

strv: List of strings.

-> m () 

Deprecated: This function has been deprecated and shouldnot be used in newly written code.

Free a list of strings.

getAddress

getAddress Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: D-Bus address of IBus. Nothing for not found.

See also: writeAddress.

Return the D-Bus address of IBus. It will find the address from following source: <orderedlist> <listitem><para>Environment variable IBUS_ADDRESS</para></listitem> <listitem><para>Socket file under ~/.config/ibus/bus/</para></listitem> </orderedlist>

getDaemonUid

getDaemonUid Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m CLong

Returns: UID of ibus-daemon; or 0 if UID is not available.

Deprecated: This function has been deprecated and shouldnot be used in newly written code.

Get UID of ibus-daemon.

getLanguageName

getLanguageName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

locale_: A const locale name.

-> m Text

Returns: translated language name

No description available in the introspection data.

getLocalMachineId

getLocalMachineId Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: A newly allocated string that shows the UUID of the machine.

Obtains the machine UUID of the machine this process is running on.

getSocketPath

getSocketPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: A newly allocated string that stores the path of socket file.

Get the path of socket file.

getTimeout

getTimeout Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Int32

Returns: A GDBus timeout in milliseconds. -1 when default timeout for GDBus should be used.

Get the GDBus timeout in milliseconds. The timeout is for clients (e.g. im-ibus.so), not for ibus-daemon. Note that the timeout for ibus-daemon could be set by --timeout command line option of the daemon.

getUntranslatedLanguageName

getUntranslatedLanguageName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

locale_: A const locale name.

-> m Text

Returns: untranslated language name

No description available in the introspection data.

getUserName

getUserName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: A newly allocated string that stores current user name.

Get the current user name. It is determined by: <orderedlist> <listitem><para>getlogin()</para></listitem> <listitem><para>Environment variable SUDO_USER</para></listitem> <listitem><para>Environment variable USERHELPER_UID</para></listitem> <listitem><para>Environment variable USERNAME</para></listitem> <listitem><para>Environment variable LOGNAME</para></listitem> <listitem><para>Environment variable USER</para></listitem> <listitem><para>Environment variable LNAME</para></listitem> </orderedlist>

init

init :: (HasCallStack, MonadIO m) => m () Source #

Initialize the ibus types.

keyEventFromString

keyEventFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

string: Key event string.

-> Word32

keyval: Variable that hold key symbol result.

-> Word32

modifiers: Variable that hold modifiers result.

-> m Bool

Returns: True for succeed; False if failed.

Parse key event string and return key symbol and modifiers.

keyEventToString

keyEventToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

keyval: Key symbol.

-> Word32

modifiers: Modifiers such as Ctrl or Shift.

-> m Text

Returns: The name of a key symbol and modifier.

Return the name of a key symbol and modifiers.

For example, if press ctrl, shift, and enter, then this function returns: Shift+Control+enter.

keyvalConvertCase

keyvalConvertCase Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

symbol: a keyval

-> m (Word32, Word32) 

Obtains the upper- and lower-case versions of the keyval symbol. Examples of keyvals are KEY_a, KEY_Return, KEY_F1, etc.

keyvalFromName

keyvalFromName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

keyvalName: Key name in gdk_keys_by_name.

-> m Word32

Returns: Corresponding key symbol.

Return the key symbol that associate with the key name.

keyvalName

keyvalName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

keyval: Key symbol.

-> m Text

Returns: Corresponding key name. Nothing if no such key symbol.

Return the name of a key symbol.

Note that the returned string is used internally, so don't free it.

keyvalToLower

keyvalToLower Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

keyval: a key value.

-> m Word32

Returns: the lower case form of keyval, or keyval itself if it is already in lower case or it is not subject to case conversion.

Converts a key value to lower case, if applicable.

keyvalToUnicode

keyvalToUnicode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

keyval: an IBus key symbol

-> m Char

Returns: the corresponding unicode character, or 0 if there is no corresponding character.

Convert from an IBus key symbol to the corresponding ISO10646 (Unicode) character.

keyvalToUpper

keyvalToUpper Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

keyval: a key value.

-> m Word32

Returns: the upper case form of keyval, or keyval itself if it is already in upper case or it is not subject to case conversion.

Converts a key value to upper case, if applicable.

main

main :: (HasCallStack, MonadIO m) => m () Source #

Runs an IBus main loop until quit is called in the loop.

See also: quit.

quit

quit :: (HasCallStack, MonadIO m) => m () Source #

Stops an IBus from running.

Any calls to quit for the loop will return. See also: main.

setDisplay

setDisplay Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

display: Display address, as in DISPLAY environment for X.

-> m () 

Set the display address.

setLogHandler

setLogHandler Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Bool

verbose: TRUE for verbose logging.

-> m () 

Sets GLIB's log handler to ours. Our log handler adds time info including hour, minute, second, and microsecond, like:

(ibus-daemon:7088): IBUS-DEBUG: 18:06:45.822819: ibus-daemon started

If verbose is True, all levels of messages will be logged. Otherwise, DEBUG and WARNING messages will be ignored. The function is used in ibus-daemon, but can be useful for IBus client programs as well for debugging. It's totally fine for not calling this function. If you don't set a custom GLIB log handler, the default GLIB log handler will be used.

unicodeToKeyval

unicodeToKeyval Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Char

wc: a ISO10646 encoded character

-> m Word32

Returns: the corresponding IBus key symbol, if one exists. or, if there is no corresponding symbol, wc | 0x01000000

Convert from a ISO10646 character to a key symbol.

unsetLogHandler

unsetLogHandler :: (HasCallStack, MonadIO m) => m () Source #

Remove the log handler which is set by ibus_set_log_handler.

writeAddress

writeAddress Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

address: D-Bus address of IBus.

-> m () 

Write D-Bus address to socket file.

See also: getAddress.