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 |
An IBusComponent is an executable program. It provides services such as user interface, configuration, and input method engine (IME).
It is recommended that IME developers provide
a component XML file and
load the XML file by componentNewFromFile
.
The format of a component XML file is described at <ulink url="https://github.com/ibus/ibus/wiki/DevXML">https://github.com/ibus/ibus/wiki/DevXML</ulink>
Synopsis
- newtype Component = Component (ManagedPtr Component)
- class (GObject o, IsDescendantOf Component o) => IsComponent o
- toComponent :: (MonadIO m, IsComponent o) => o -> m Component
- componentAddEngine :: (HasCallStack, MonadIO m, IsComponent a, IsEngineDesc b) => a -> b -> m ()
- componentAddObservedPath :: (HasCallStack, MonadIO m, IsComponent a) => a -> Text -> Bool -> m ()
- componentCheckModification :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Bool
- componentGetAuthor :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentGetDescription :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentGetEngines :: (HasCallStack, MonadIO m, IsComponent a) => a -> m [EngineDesc]
- componentGetExec :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentGetHomepage :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentGetLicense :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentGetName :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentGetObservedPaths :: (HasCallStack, MonadIO m, IsComponent a) => a -> m [ObservedPath]
- componentGetTextdomain :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentGetVersion :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Text
- componentNew :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> Text -> Text -> Text -> Text -> Text -> m Component
- componentNewFromFile :: (HasCallStack, MonadIO m) => Text -> m Component
- componentNewFromXmlNode :: (HasCallStack, MonadIO m) => XML -> m Component
- componentOutput :: (HasCallStack, MonadIO m, IsComponent a) => a -> String -> Int32 -> m ()
- componentOutputEngines :: (HasCallStack, MonadIO m, IsComponent a) => a -> String -> Int32 -> m ()
- constructComponentAuthor :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentAuthor :: (MonadIO m, IsComponent o) => o -> m Text
- constructComponentCommandLine :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentCommandLine :: (MonadIO m, IsComponent o) => o -> m (Maybe Text)
- constructComponentDescription :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentDescription :: (MonadIO m, IsComponent o) => o -> m Text
- constructComponentHomepage :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentHomepage :: (MonadIO m, IsComponent o) => o -> m Text
- constructComponentLicense :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentLicense :: (MonadIO m, IsComponent o) => o -> m Text
- constructComponentName :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentName :: (MonadIO m, IsComponent o) => o -> m Text
- constructComponentTextdomain :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentTextdomain :: (MonadIO m, IsComponent o) => o -> m Text
- constructComponentVersion :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o)
- getComponentVersion :: (MonadIO m, IsComponent o) => o -> m Text
Exported types
Memory-managed wrapper type.
Instances
Eq Component Source # | |
IsGValue Component Source # | Convert |
GObject Component Source # | |
Defined in GI.IBus.Objects.Component gobjectType :: IO GType # | |
HasParentTypes Component Source # | |
Defined in GI.IBus.Objects.Component | |
type ParentTypes Component Source # | |
Defined in GI.IBus.Objects.Component |
class (GObject o, IsDescendantOf Component o) => IsComponent o Source #
Type class for types which can be safely cast to Component
, for instance with toComponent
.
Instances
(GObject o, IsDescendantOf Component o) => IsComponent o Source # | |
Defined in GI.IBus.Objects.Component |
toComponent :: (MonadIO m, IsComponent o) => o -> m Component Source #
Methods
Overloaded methods
addEngine
:: (HasCallStack, MonadIO m, IsComponent a, IsEngineDesc b) | |
=> a |
|
-> b |
|
-> m () |
Add an engine to Component
according to the description in engine
.
addObservedPath
componentAddObservedPath Source #
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m () |
Add an observed path to Component
.
checkModification
componentCheckModification Source #
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Bool | Returns: |
Check whether the observed paths of component is modified.
getAuthor
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: author property in |
Gets the author property in Component
. It should not be freed.
getDescription
componentGetDescription Source #
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: description property in |
Gets the description property in Component
. It should not be freed.
getEngines
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m [EngineDesc] | Returns: A newly allocated GList that contains engines. |
Gets the engines of this component.
getExec
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: exec property in |
Gets the exec property in Component
. It should not be freed.
getHomepage
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: homepage property in |
Gets the homepage property in Component
. It should not be freed.
getLicense
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: license property in |
Gets the license property in Component
. It should not be freed.
getName
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: name property in |
Gets the name property in Component
. It should not be freed.
getObservedPaths
componentGetObservedPaths Source #
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m [ObservedPath] | Returns: A newly allocated GList that contains observed paths. |
Gets the observed paths of this component.
getTextdomain
componentGetTextdomain Source #
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: textdomain property in |
Gets the textdomain property in Component
. It should not be freed.
getVersion
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> m Text | Returns: version property in |
Gets the version property in Component
. It should not be freed.
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> m Component | Returns: A newly allocated |
Creates a new Component
.
newFromFile
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Component | Returns: A newly allocated |
Creates a new Component
from an XML file.
Note that a component file usually contains engine descriptions,
if it does, engineDescNewFromXmlNode
will be called
to load the engine descriptions.
newFromXmlNode
componentNewFromXmlNode Source #
:: (HasCallStack, MonadIO m) | |
=> XML |
|
-> m Component | Returns: A newly allocated |
Creates a new Component
from an XML tree.
output
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> String |
|
-> Int32 |
|
-> m () |
Output Component
as an XML-formatted string.
The output string can be then shown on the screen or written to file.
outputEngines
componentOutputEngines Source #
:: (HasCallStack, MonadIO m, IsComponent a) | |
=> a |
|
-> String |
|
-> Int32 |
|
-> m () |
Output engine description as an XML-formatted string. The output string can be then shown on the screen or written to file.
Properties
author
The author of component
constructComponentAuthor :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “author
” property. This is rarely needed directly, but it is used by new
.
getComponentAuthor :: (MonadIO m, IsComponent o) => o -> m Text Source #
Get the value of the “author
” property.
When overloading is enabled, this is equivalent to
get
component #author
commandLine
The exec path of component
constructComponentCommandLine :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “command-line
” property. This is rarely needed directly, but it is used by new
.
getComponentCommandLine :: (MonadIO m, IsComponent o) => o -> m (Maybe Text) Source #
Get the value of the “command-line
” property.
When overloading is enabled, this is equivalent to
get
component #commandLine
description
The description of component
constructComponentDescription :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “description
” property. This is rarely needed directly, but it is used by new
.
getComponentDescription :: (MonadIO m, IsComponent o) => o -> m Text Source #
Get the value of the “description
” property.
When overloading is enabled, this is equivalent to
get
component #description
homepage
The homepage of component
constructComponentHomepage :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “homepage
” property. This is rarely needed directly, but it is used by new
.
getComponentHomepage :: (MonadIO m, IsComponent o) => o -> m Text Source #
Get the value of the “homepage
” property.
When overloading is enabled, this is equivalent to
get
component #homepage
license
The license of component
constructComponentLicense :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “license
” property. This is rarely needed directly, but it is used by new
.
getComponentLicense :: (MonadIO m, IsComponent o) => o -> m Text Source #
Get the value of the “license
” property.
When overloading is enabled, this is equivalent to
get
component #license
name
The name of component
constructComponentName :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “name
” property. This is rarely needed directly, but it is used by new
.
getComponentName :: (MonadIO m, IsComponent o) => o -> m Text Source #
Get the value of the “name
” property.
When overloading is enabled, this is equivalent to
get
component #name
textdomain
The textdomain of component
constructComponentTextdomain :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “textdomain
” property. This is rarely needed directly, but it is used by new
.
getComponentTextdomain :: (MonadIO m, IsComponent o) => o -> m Text Source #
Get the value of the “textdomain
” property.
When overloading is enabled, this is equivalent to
get
component #textdomain
version
The version of component
constructComponentVersion :: (IsComponent o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “version
” property. This is rarely needed directly, but it is used by new
.
getComponentVersion :: (MonadIO m, IsComponent o) => o -> m Text Source #
Get the value of the “version
” property.
When overloading is enabled, this is equivalent to
get
component #version