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

GI.IBus.Objects.Registry

Description

An Registry loads IBus component files and generates the cache files.

see_also: Component

Synopsis

Exported types

newtype Registry Source #

Memory-managed wrapper type.

Constructors

Registry (ManagedPtr Registry) 

Instances

Instances details
Eq Registry Source # 
Instance details

Defined in GI.IBus.Objects.Registry

GObject Registry Source # 
Instance details

Defined in GI.IBus.Objects.Registry

ManagedPtrNewtype Registry Source # 
Instance details

Defined in GI.IBus.Objects.Registry

Methods

toManagedPtr :: Registry -> ManagedPtr Registry

TypedObject Registry Source # 
Instance details

Defined in GI.IBus.Objects.Registry

Methods

glibType :: IO GType

HasParentTypes Registry Source # 
Instance details

Defined in GI.IBus.Objects.Registry

IsGValue (Maybe Registry) Source #

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

Instance details

Defined in GI.IBus.Objects.Registry

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Registry Source # 
Instance details

Defined in GI.IBus.Objects.Registry

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

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

Instances details
(GObject o, IsDescendantOf Registry o) => IsRegistry o Source # 
Instance details

Defined in GI.IBus.Objects.Registry

toRegistry :: (MonadIO m, IsRegistry o) => o -> m Registry Source #

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

Methods

checkModification

registryCheckModification Source #

Arguments

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

registry: An Registry.

-> m Bool

Returns: True if mtime is changed; False otherwise.

Check if the registry is updated.

getComponents

registryGetComponents Source #

Arguments

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

registry: An Registry.

-> m [Component]

Returns: a list of Component objects. The caller has to call g_list_free() for the returned list.

List components.

getObservedPaths

registryGetObservedPaths Source #

Arguments

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

registry: An Registry.

-> m [ObservedPath]

Returns: a list of ObservedPath objects. The caller has to call g_list_free() for the returned list.

List observed paths.

load

registryLoad Source #

Arguments

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

registry: An Registry.

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

registryLoadCache Source #

Arguments

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

registry: An Registry.

-> Bool

isUser: True if the registry cache is loaded in the user directory.

-> m Bool

Returns: True if the cache exists and is loaded successfully, False otherwise.

Load the user or system registry cache.

loadCacheFile

registryLoadCacheFile Source #

Arguments

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

registry: An Registry.

-> Text

filename: The file path of the registry cache

-> m Bool

Returns: True if the cache exists and is loaded successfully, False otherwise.

Load the registry cache filename.

loadInDir

registryLoadInDir Source #

Arguments

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

registry: An Registry.

-> Text

dirname: IBus component directory which includes XML files.

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

registryNew Source #

Arguments

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

Returns: A newly allocated Registry.

Creates a new Registry

output

registryOutput Source #

Arguments

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

registry: An Registry.

-> String

output: GString that holds the result.

-> Int32

indent: level of indent.

-> m () 

Output Registry as an XML-formatted string. The output string can be then shown on the screen or written to file.

saveCache

registrySaveCache Source #

Arguments

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

registry: An Registry.

-> Bool

isUser: True if the registry cache is saved in the user directory.

-> m Bool

Returns: True if the cache is saved successfully, False otherwise.

Save the registry in a user directory or system directory.

saveCacheFile

registrySaveCacheFile Source #

Arguments

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

registry: An Registry.

-> Text

filename: The file path of the registry cache

-> m Bool

Returns: True if the cache is saved successfully, False otherwise.

Save the registry cache filename.

startMonitorChanges

registryStartMonitorChanges Source #

Arguments

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

registry: An Registry.

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

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