Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
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 C_RegistryChangedCallback = Ptr () -> Ptr () -> IO ()
- type RegistryChangedCallback = IO ()
- afterRegistryChanged :: (IsRegistry a, MonadIO m) => a -> RegistryChangedCallback -> m SignalHandlerId
- genClosure_RegistryChanged :: MonadIO m => RegistryChangedCallback -> m (GClosure C_RegistryChangedCallback)
- mk_RegistryChangedCallback :: C_RegistryChangedCallback -> IO (FunPtr C_RegistryChangedCallback)
- noRegistryChangedCallback :: Maybe RegistryChangedCallback
- onRegistryChanged :: (IsRegistry a, MonadIO m) => a -> RegistryChangedCallback -> m SignalHandlerId
- wrap_RegistryChangedCallback :: RegistryChangedCallback -> C_RegistryChangedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Registry Source # | |
IsGValue Registry Source # | Convert |
GObject Registry Source # | |
Defined in GI.IBus.Objects.Registry gobjectType :: IO GType # | |
HasParentTypes Registry Source # | |
Defined in GI.IBus.Objects.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
Overloaded methods
checkModification
registryCheckModification Source #
:: (HasCallStack, MonadIO m, IsRegistry a) | |
=> a |
|
-> m Bool | Returns: |
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 C_RegistryChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_RegistryChanged :: MonadIO m => RegistryChangedCallback -> m (GClosure C_RegistryChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_RegistryChangedCallback :: C_RegistryChangedCallback -> IO (FunPtr C_RegistryChangedCallback) Source #
Generate a function pointer callable from C code, from a C_RegistryChangedCallback
.
noRegistryChangedCallback :: Maybe RegistryChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
RegistryChangedCallback
onRegistryChanged :: (IsRegistry a, MonadIO m) => 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