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 |
Synopsis
- newtype Registry = Registry (ManagedPtr Registry)
- class (GObject o, IsDescendantOf Registry o) => IsRegistry o
- toRegistry :: (MonadIO m, IsRegistry o) => o -> m Registry
- registryCheckModification :: (HasCallStack, MonadIO m, IsRegistry a) => a -> m Bool
- registryGetComponents :: (HasCallStack, MonadIO m, IsRegistry a) => a -> m [Component]
- registryGetObservedPaths :: (HasCallStack, MonadIO m, IsRegistry a) => a -> m [ObservedPath]
- registryLoad :: (HasCallStack, MonadIO m, IsRegistry a) => a -> m ()
- registryLoadCache :: (HasCallStack, MonadIO m, IsRegistry a) => a -> Bool -> m Bool
- registryLoadCacheFile :: (HasCallStack, MonadIO m, IsRegistry a) => a -> Text -> m Bool
- registryLoadInDir :: (HasCallStack, MonadIO m, IsRegistry a) => a -> Text -> m ()
- registryNew :: (HasCallStack, MonadIO m) => m Registry
- registryOutput :: (HasCallStack, MonadIO m, IsRegistry a) => a -> String -> Int32 -> m ()
- registrySaveCache :: (HasCallStack, MonadIO m, IsRegistry a) => a -> Bool -> m Bool
- registrySaveCacheFile :: (HasCallStack, MonadIO m, IsRegistry a) => a -> Text -> m Bool
- registryStartMonitorChanges :: (HasCallStack, MonadIO m, IsRegistry a) => a -> m ()
- type RegistryChangedCallback = IO ()
- afterRegistryChanged :: (IsRegistry a, MonadIO m) => a -> ((?self :: a) => RegistryChangedCallback) -> m SignalHandlerId
- onRegistryChanged :: (IsRegistry a, MonadIO m) => a -> ((?self :: a) => RegistryChangedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Registry Source # | |
GObject Registry Source # | |
Defined in GI.IBus.Objects.Registry | |
ManagedPtrNewtype Registry Source # | |
Defined in GI.IBus.Objects.Registry toManagedPtr :: Registry -> ManagedPtr Registry | |
TypedObject Registry Source # | |
Defined in GI.IBus.Objects.Registry | |
HasParentTypes Registry Source # | |
Defined in GI.IBus.Objects.Registry | |
IsGValue (Maybe Registry) Source # | Convert |
Defined in GI.IBus.Objects.Registry gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Registry -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Registry) | |
type ParentTypes Registry Source # | |
Defined in GI.IBus.Objects.Registry |
class (GObject o, IsDescendantOf Registry o) => IsRegistry o Source #
Type class for types which can be safely cast to Registry
, for instance with toRegistry
.
Instances
(GObject o, IsDescendantOf Registry o) => IsRegistry o Source # | |
Defined in GI.IBus.Objects.Registry |
toRegistry :: (MonadIO m, IsRegistry o) => o -> m Registry Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, checkModification, copy, destroy, forceFloating, freezeNotify, getv, isFloating, load, loadCache, loadCacheFile, loadInDir, notify, notifyByPspec, output, ref, refSink, removeQattachment, runDispose, saveCache, saveCacheFile, serializeObject, startMonitorChanges, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getComponents, getData, getObservedPaths, getProperty, getQattachment, getQdata.
Setters
checkModification
registryCheckModification Source #
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> m Bool |
Check if the registry is updated.
getComponents
registryGetComponents Source #
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> m [Component] | Returns:
a list of |
List components.
getObservedPaths
registryGetObservedPaths Source #
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> m [ObservedPath] | Returns:
a list of |
List observed paths.
load
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> m () |
Read all XML files in a IBus component directory (typically /usr/share/ibus/component/ *.xml) and update the registry object. IBUS_COMPONENT_PATH environment valuable is also available for the custom component directories, whose delimiter is ':'.
loadCache
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> Bool |
|
-> m Bool | Returns: |
Load the user or system registry cache.
loadCacheFile
registryLoadCacheFile Source #
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Load the registry cache filename
.
loadInDir
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> Text |
|
-> m () |
Read all XML files in dirname
, create a Component
object for each file,
and add the component objects to the registry.
If dirname
is "/usr/share/ibus/component", this API and
registryLoad
are same.
new
:: (HasCallStack, MonadIO m) | |
=> m Registry | Returns: A newly allocated |
Creates a new Registry
output
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> String |
|
-> Int32 |
|
-> m () |
Output Registry
as an XML-formatted string.
The output string can be then shown on the screen or written to file.
saveCache
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> Bool |
|
-> m Bool | Returns: |
Save the registry in a user directory or system directory.
saveCacheFile
registrySaveCacheFile Source #
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Save the registry cache filename
.
startMonitorChanges
registryStartMonitorChanges Source #
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> m () |
Start to monitor observed paths.
Signals
changed
type RegistryChangedCallback = IO () Source #
Emitted when any observed paths are changed. A method is not associated in this class. the "changed" signal would be handled in other classes.
See also: registryStartMonitorChanges
.
afterRegistryChanged :: (IsRegistry a, MonadIO m) => a -> ((?self :: a) => RegistryChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
registry #changed 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.
onRegistryChanged :: (IsRegistry a, MonadIO m) => a -> ((?self :: a) => RegistryChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
registry #changed callback