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.Config
Description
An IBusConfig provides engine configuration methods such as get and set the configure settings to configuration file.
Currently, IBusConfig supports gconf.
Synopsis
- newtype Config = Config (ManagedPtr Config)
- class (GObject o, IsDescendantOf Config o) => IsConfig o
- toConfig :: (MonadIO m, IsConfig o) => o -> m Config
- configGetValue :: (HasCallStack, MonadIO m, IsConfig a) => a -> Text -> Text -> m GVariant
- configGetValueAsync :: (HasCallStack, MonadIO m, IsConfig a, IsCancellable b) => a -> Text -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- configGetValueAsyncFinish :: (HasCallStack, MonadIO m, IsConfig a, IsAsyncResult b) => a -> b -> m GVariant
- configGetValues :: (HasCallStack, MonadIO m, IsConfig a) => a -> Text -> m GVariant
- configGetValuesAsync :: (HasCallStack, MonadIO m, IsConfig a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- configGetValuesAsyncFinish :: (HasCallStack, MonadIO m, IsConfig a, IsAsyncResult b) => a -> b -> m GVariant
- configNew :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> m Config
- configNewAsync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- configNewAsyncFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m Config
- configSetValue :: (HasCallStack, MonadIO m, IsConfig a) => a -> Text -> Text -> GVariant -> m Bool
- configSetValueAsync :: (HasCallStack, MonadIO m, IsConfig a, IsCancellable b) => a -> Text -> Text -> GVariant -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- configSetValueAsyncFinish :: (HasCallStack, MonadIO m, IsConfig a, IsAsyncResult b) => a -> b -> m ()
- configUnset :: (HasCallStack, MonadIO m, IsConfig a) => a -> Text -> Text -> m Bool
- configUnwatch :: (HasCallStack, MonadIO m, IsConfig a) => a -> Maybe Text -> Maybe Text -> m Bool
- configWatch :: (HasCallStack, MonadIO m, IsConfig a) => a -> Maybe Text -> Maybe Text -> m Bool
- type ConfigValueChangedCallback = Text -> Text -> GVariant -> IO ()
- afterConfigValueChanged :: (IsConfig a, MonadIO m) => a -> ((?self :: a) => ConfigValueChangedCallback) -> m SignalHandlerId
- onConfigValueChanged :: (IsConfig a, MonadIO m) => a -> ((?self :: a) => ConfigValueChangedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Config Source # | |
GObject Config Source # | |
Defined in GI.IBus.Objects.Config | |
ManagedPtrNewtype Config Source # | |
Defined in GI.IBus.Objects.Config Methods toManagedPtr :: Config -> ManagedPtr Config | |
TypedObject Config Source # | |
Defined in GI.IBus.Objects.Config | |
HasParentTypes Config Source # | |
Defined in GI.IBus.Objects.Config | |
IsGValue (Maybe Config) Source # | Convert |
Defined in GI.IBus.Objects.Config Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Config -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Config) | |
type ParentTypes Config Source # | |
Defined in GI.IBus.Objects.Config |
class (GObject o, IsDescendantOf Config o) => IsConfig o Source #
Instances
(GObject o, IsDescendantOf Config o) => IsConfig o Source # | |
Defined in GI.IBus.Objects.Config |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, call, callFinish, callSync, callWithUnixFdList, callWithUnixFdListFinish, callWithUnixFdListSync, destroy, forceFloating, freezeNotify, getv, init, initAsync, initFinish, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, unset, unwatch, watch, watchClosure.
Getters
getCachedProperty, getCachedPropertyNames, getConnection, getData, getDefaultTimeout, getFlags, getInfo, getInterfaceInfo, getInterfaceName, getName, getNameOwner, getObject, getObjectPath, getProperty, getQdata, getValue, getValueAsync, getValueAsyncFinish, getValues, getValuesAsync, getValuesAsyncFinish.
Setters
setCachedProperty, setData, setDataFull, setDefaultTimeout, setInterfaceInfo, setObject, setProperty, setValue, setValueAsync, setValueAsyncFinish.
getValue
Arguments
:: (HasCallStack, MonadIO m, IsConfig a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m GVariant | Returns: A |
Get the value of a configuration option synchronously.
GConf stores configure options in a tree-like structure,
and the IBus related setting is at /desktop/ibus,
thus, section
here is a path from there,
while name
is the key of that configuration option.
ibus-chewing, for example, stores its setting in /desktop/ibus/engine/Chewing,
so the section name for it is "engine/Chewing".
See also: configSetValue
.
getValueAsync
Arguments
:: (HasCallStack, MonadIO m, IsConfig a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Get the value of a configuration option asynchronously.
See also: configGetValue
.
getValueAsyncFinish
configGetValueAsyncFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsConfig a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m GVariant | Returns: A See also: |
Finish get value of a configuration option.
getValues
Arguments
:: (HasCallStack, MonadIO m, IsConfig a) | |
=> a |
|
-> Text |
|
-> m GVariant | Returns: A See also: |
Get all values in a section synchronously.
getValuesAsync
Arguments
:: (HasCallStack, MonadIO m, IsConfig a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Get all values in a section asynchronously.
See also: configGetValues
.
getValuesAsyncFinish
configGetValuesAsyncFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsConfig a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m GVariant | Returns: A See also: |
Finish get values in a section.
new
Arguments
:: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m Config | Returns: A newly allocated |
Create a new Config
from existing DBusConnection
.
newAsync
Arguments
:: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
New an Config
asynchronously.
newAsyncFinish
Arguments
:: (HasCallStack, MonadIO m, IsAsyncResult a) | |
=> a |
|
-> m Config |
Finishes an operation started with configNewAsync
.
setValue
Arguments
:: (HasCallStack, MonadIO m, IsConfig a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> GVariant |
|
-> m Bool | Returns: See also: |
Set the value of a configuration option synchronously.
setValueAsync
Arguments
:: (HasCallStack, MonadIO m, IsConfig a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> GVariant |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Set the value of a configuration option asynchronously.
See also: configSetValue
.
setValueAsyncFinish
configSetValueAsyncFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsConfig a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finish set value of a configuration option.
unset
Arguments
:: (HasCallStack, MonadIO m, IsConfig a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m Bool | Returns: See also: |
Remove an entry of a configuration option.
unwatch
Arguments
:: (HasCallStack, MonadIO m, IsConfig a) | |
=> a |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m Bool | Returns: See also: ibus_config_watch. |
Unsubscribe from the configuration option change notification.
watch
Arguments
:: (HasCallStack, MonadIO m, IsConfig a) | |
=> a |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m Bool | Returns: See also: |
Subscribe to the configuration option change notification.
Until this function is called, every change will be notified to the
client through Config::valueChanged signal. Clients should
call configWatch
with the sections they are interested in,
to reduce the number of D-Bus messages.
Signals
valueChanged
type ConfigValueChangedCallback Source #
Arguments
= Text |
|
-> Text |
|
-> GVariant |
|
-> IO () |
Emitted when configuration value is changed.
<note><para>Argument userData
is ignored in this function.</para></note>
afterConfigValueChanged :: (IsConfig a, MonadIO m) => a -> ((?self :: a) => ConfigValueChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the valueChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
config #valueChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onConfigValueChanged :: (IsConfig a, MonadIO m) => a -> ((?self :: a) => ConfigValueChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the valueChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
config #valueChanged callback