{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.IBus.Objects.Component
(
Component(..) ,
IsComponent ,
toComponent ,
#if defined(ENABLE_OVERLOADING)
ResolveComponentMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ComponentAddEngineMethodInfo ,
#endif
componentAddEngine ,
#if defined(ENABLE_OVERLOADING)
ComponentAddObservedPathMethodInfo ,
#endif
componentAddObservedPath ,
#if defined(ENABLE_OVERLOADING)
ComponentCheckModificationMethodInfo ,
#endif
componentCheckModification ,
#if defined(ENABLE_OVERLOADING)
ComponentGetAuthorMethodInfo ,
#endif
componentGetAuthor ,
#if defined(ENABLE_OVERLOADING)
ComponentGetDescriptionMethodInfo ,
#endif
componentGetDescription ,
#if defined(ENABLE_OVERLOADING)
ComponentGetEnginesMethodInfo ,
#endif
componentGetEngines ,
#if defined(ENABLE_OVERLOADING)
ComponentGetExecMethodInfo ,
#endif
componentGetExec ,
#if defined(ENABLE_OVERLOADING)
ComponentGetHomepageMethodInfo ,
#endif
componentGetHomepage ,
#if defined(ENABLE_OVERLOADING)
ComponentGetLicenseMethodInfo ,
#endif
componentGetLicense ,
#if defined(ENABLE_OVERLOADING)
ComponentGetNameMethodInfo ,
#endif
componentGetName ,
#if defined(ENABLE_OVERLOADING)
ComponentGetObservedPathsMethodInfo ,
#endif
componentGetObservedPaths ,
#if defined(ENABLE_OVERLOADING)
ComponentGetTextdomainMethodInfo ,
#endif
componentGetTextdomain ,
#if defined(ENABLE_OVERLOADING)
ComponentGetVersionMethodInfo ,
#endif
componentGetVersion ,
componentNew ,
componentNewFromFile ,
componentNewFromXmlNode ,
#if defined(ENABLE_OVERLOADING)
ComponentOutputMethodInfo ,
#endif
componentOutput ,
#if defined(ENABLE_OVERLOADING)
ComponentOutputEnginesMethodInfo ,
#endif
componentOutputEngines ,
#if defined(ENABLE_OVERLOADING)
ComponentAuthorPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentAuthor ,
#endif
constructComponentAuthor ,
getComponentAuthor ,
#if defined(ENABLE_OVERLOADING)
ComponentCommandLinePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentCommandLine ,
#endif
constructComponentCommandLine ,
getComponentCommandLine ,
#if defined(ENABLE_OVERLOADING)
ComponentDescriptionPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentDescription ,
#endif
constructComponentDescription ,
getComponentDescription ,
#if defined(ENABLE_OVERLOADING)
ComponentHomepagePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentHomepage ,
#endif
constructComponentHomepage ,
getComponentHomepage ,
#if defined(ENABLE_OVERLOADING)
ComponentLicensePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentLicense ,
#endif
constructComponentLicense ,
getComponentLicense ,
#if defined(ENABLE_OVERLOADING)
ComponentNamePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentName ,
#endif
constructComponentName ,
getComponentName ,
#if defined(ENABLE_OVERLOADING)
ComponentTextdomainPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentTextdomain ,
#endif
constructComponentTextdomain ,
getComponentTextdomain ,
#if defined(ENABLE_OVERLOADING)
ComponentVersionPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
componentVersion ,
#endif
constructComponentVersion ,
getComponentVersion ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.IBus.Objects.EngineDesc as IBus.EngineDesc
import {-# SOURCE #-} qualified GI.IBus.Objects.Object as IBus.Object
import {-# SOURCE #-} qualified GI.IBus.Objects.ObservedPath as IBus.ObservedPath
import {-# SOURCE #-} qualified GI.IBus.Objects.Serializable as IBus.Serializable
import {-# SOURCE #-} qualified GI.IBus.Structs.XML as IBus.XML
newtype Component = Component (SP.ManagedPtr Component)
deriving (Component -> Component -> Bool
(Component -> Component -> Bool)
-> (Component -> Component -> Bool) -> Eq Component
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Component -> Component -> Bool
$c/= :: Component -> Component -> Bool
== :: Component -> Component -> Bool
$c== :: Component -> Component -> Bool
Eq)
instance SP.ManagedPtrNewtype Component where
toManagedPtr :: Component -> ManagedPtr Component
toManagedPtr (Component ManagedPtr Component
p) = ManagedPtr Component
p
foreign import ccall "ibus_component_get_type"
c_ibus_component_get_type :: IO B.Types.GType
instance B.Types.TypedObject Component where
glibType :: IO GType
glibType = IO GType
c_ibus_component_get_type
instance B.Types.GObject Component
instance B.GValue.IsGValue Component where
toGValue :: Component -> IO GValue
toGValue Component
o = do
GType
gtype <- IO GType
c_ibus_component_get_type
Component -> (Ptr Component -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Component
o (GType
-> (GValue -> Ptr Component -> IO ()) -> Ptr Component -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Component -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Component
fromGValue GValue
gv = do
Ptr Component
ptr <- GValue -> IO (Ptr Component)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Component)
(ManagedPtr Component -> Component)
-> Ptr Component -> IO Component
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Component -> Component
Component Ptr Component
ptr
class (SP.GObject o, O.IsDescendantOf Component o) => IsComponent o
instance (SP.GObject o, O.IsDescendantOf Component o) => IsComponent o
instance O.HasParentTypes Component
type instance O.ParentTypes Component = '[IBus.Serializable.Serializable, IBus.Object.Object, GObject.Object.Object]
toComponent :: (MonadIO m, IsComponent o) => o -> m Component
toComponent :: o -> m Component
toComponent = IO Component -> m Component
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Component -> m Component)
-> (o -> IO Component) -> o -> m Component
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Component -> Component) -> o -> IO Component
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Component -> Component
Component
#if defined(ENABLE_OVERLOADING)
type family ResolveComponentMethod (t :: Symbol) (o :: *) :: * where
ResolveComponentMethod "addEngine" o = ComponentAddEngineMethodInfo
ResolveComponentMethod "addObservedPath" o = ComponentAddObservedPathMethodInfo
ResolveComponentMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveComponentMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveComponentMethod "checkModification" o = ComponentCheckModificationMethodInfo
ResolveComponentMethod "copy" o = IBus.Serializable.SerializableCopyMethodInfo
ResolveComponentMethod "destroy" o = IBus.Object.ObjectDestroyMethodInfo
ResolveComponentMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveComponentMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveComponentMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveComponentMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveComponentMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveComponentMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveComponentMethod "output" o = ComponentOutputMethodInfo
ResolveComponentMethod "outputEngines" o = ComponentOutputEnginesMethodInfo
ResolveComponentMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveComponentMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveComponentMethod "removeQattachment" o = IBus.Serializable.SerializableRemoveQattachmentMethodInfo
ResolveComponentMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveComponentMethod "serializeObject" o = IBus.Serializable.SerializableSerializeObjectMethodInfo
ResolveComponentMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveComponentMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveComponentMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveComponentMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveComponentMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveComponentMethod "getAuthor" o = ComponentGetAuthorMethodInfo
ResolveComponentMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveComponentMethod "getDescription" o = ComponentGetDescriptionMethodInfo
ResolveComponentMethod "getEngines" o = ComponentGetEnginesMethodInfo
ResolveComponentMethod "getExec" o = ComponentGetExecMethodInfo
ResolveComponentMethod "getHomepage" o = ComponentGetHomepageMethodInfo
ResolveComponentMethod "getLicense" o = ComponentGetLicenseMethodInfo
ResolveComponentMethod "getName" o = ComponentGetNameMethodInfo
ResolveComponentMethod "getObservedPaths" o = ComponentGetObservedPathsMethodInfo
ResolveComponentMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveComponentMethod "getQattachment" o = IBus.Serializable.SerializableGetQattachmentMethodInfo
ResolveComponentMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveComponentMethod "getTextdomain" o = ComponentGetTextdomainMethodInfo
ResolveComponentMethod "getVersion" o = ComponentGetVersionMethodInfo
ResolveComponentMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveComponentMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveComponentMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveComponentMethod "setQattachment" o = IBus.Serializable.SerializableSetQattachmentMethodInfo
ResolveComponentMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveComponentMethod t Component, O.MethodInfo info Component p) => OL.IsLabel t (Component -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getComponentAuthor :: (MonadIO m, IsComponent o) => o -> m T.Text
getComponentAuthor :: o -> m Text
getComponentAuthor o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getComponentAuthor" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"author"
constructComponentAuthor :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentAuthor :: Text -> m (GValueConstruct o)
constructComponentAuthor Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"author" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentAuthorPropertyInfo
instance AttrInfo ComponentAuthorPropertyInfo where
type AttrAllowedOps ComponentAuthorPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentAuthorPropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentAuthorPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentAuthorPropertyInfo = (~) T.Text
type AttrTransferType ComponentAuthorPropertyInfo = T.Text
type AttrGetType ComponentAuthorPropertyInfo = T.Text
type AttrLabel ComponentAuthorPropertyInfo = "author"
type AttrOrigin ComponentAuthorPropertyInfo = Component
attrGet = getComponentAuthor
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentAuthor
attrClear = undefined
#endif
getComponentCommandLine :: (MonadIO m, IsComponent o) => o -> m (Maybe T.Text)
getComponentCommandLine :: o -> m (Maybe Text)
getComponentCommandLine o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"command-line"
constructComponentCommandLine :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentCommandLine :: Text -> m (GValueConstruct o)
constructComponentCommandLine Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"command-line" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentCommandLinePropertyInfo
instance AttrInfo ComponentCommandLinePropertyInfo where
type AttrAllowedOps ComponentCommandLinePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentCommandLinePropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentCommandLinePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentCommandLinePropertyInfo = (~) T.Text
type AttrTransferType ComponentCommandLinePropertyInfo = T.Text
type AttrGetType ComponentCommandLinePropertyInfo = (Maybe T.Text)
type AttrLabel ComponentCommandLinePropertyInfo = "command-line"
type AttrOrigin ComponentCommandLinePropertyInfo = Component
attrGet = getComponentCommandLine
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentCommandLine
attrClear = undefined
#endif
getComponentDescription :: (MonadIO m, IsComponent o) => o -> m T.Text
getComponentDescription :: o -> m Text
getComponentDescription o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getComponentDescription" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"description"
constructComponentDescription :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentDescription :: Text -> m (GValueConstruct o)
constructComponentDescription Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"description" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentDescriptionPropertyInfo
instance AttrInfo ComponentDescriptionPropertyInfo where
type AttrAllowedOps ComponentDescriptionPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentDescriptionPropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentDescriptionPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentDescriptionPropertyInfo = (~) T.Text
type AttrTransferType ComponentDescriptionPropertyInfo = T.Text
type AttrGetType ComponentDescriptionPropertyInfo = T.Text
type AttrLabel ComponentDescriptionPropertyInfo = "description"
type AttrOrigin ComponentDescriptionPropertyInfo = Component
attrGet = getComponentDescription
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentDescription
attrClear = undefined
#endif
getComponentHomepage :: (MonadIO m, IsComponent o) => o -> m T.Text
getComponentHomepage :: o -> m Text
getComponentHomepage o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getComponentHomepage" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"homepage"
constructComponentHomepage :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentHomepage :: Text -> m (GValueConstruct o)
constructComponentHomepage Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"homepage" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentHomepagePropertyInfo
instance AttrInfo ComponentHomepagePropertyInfo where
type AttrAllowedOps ComponentHomepagePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentHomepagePropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentHomepagePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentHomepagePropertyInfo = (~) T.Text
type AttrTransferType ComponentHomepagePropertyInfo = T.Text
type AttrGetType ComponentHomepagePropertyInfo = T.Text
type AttrLabel ComponentHomepagePropertyInfo = "homepage"
type AttrOrigin ComponentHomepagePropertyInfo = Component
attrGet = getComponentHomepage
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentHomepage
attrClear = undefined
#endif
getComponentLicense :: (MonadIO m, IsComponent o) => o -> m T.Text
getComponentLicense :: o -> m Text
getComponentLicense o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getComponentLicense" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"license"
constructComponentLicense :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentLicense :: Text -> m (GValueConstruct o)
constructComponentLicense Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"license" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentLicensePropertyInfo
instance AttrInfo ComponentLicensePropertyInfo where
type AttrAllowedOps ComponentLicensePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentLicensePropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentLicensePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentLicensePropertyInfo = (~) T.Text
type AttrTransferType ComponentLicensePropertyInfo = T.Text
type AttrGetType ComponentLicensePropertyInfo = T.Text
type AttrLabel ComponentLicensePropertyInfo = "license"
type AttrOrigin ComponentLicensePropertyInfo = Component
attrGet = getComponentLicense
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentLicense
attrClear = undefined
#endif
getComponentName :: (MonadIO m, IsComponent o) => o -> m T.Text
getComponentName :: o -> m Text
getComponentName o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getComponentName" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"name"
constructComponentName :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentName :: Text -> m (GValueConstruct o)
constructComponentName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentNamePropertyInfo
instance AttrInfo ComponentNamePropertyInfo where
type AttrAllowedOps ComponentNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentNamePropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentNamePropertyInfo = (~) T.Text
type AttrTransferType ComponentNamePropertyInfo = T.Text
type AttrGetType ComponentNamePropertyInfo = T.Text
type AttrLabel ComponentNamePropertyInfo = "name"
type AttrOrigin ComponentNamePropertyInfo = Component
attrGet = getComponentName
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentName
attrClear = undefined
#endif
getComponentTextdomain :: (MonadIO m, IsComponent o) => o -> m T.Text
getComponentTextdomain :: o -> m Text
getComponentTextdomain o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getComponentTextdomain" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"textdomain"
constructComponentTextdomain :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentTextdomain :: Text -> m (GValueConstruct o)
constructComponentTextdomain Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"textdomain" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentTextdomainPropertyInfo
instance AttrInfo ComponentTextdomainPropertyInfo where
type AttrAllowedOps ComponentTextdomainPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentTextdomainPropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentTextdomainPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentTextdomainPropertyInfo = (~) T.Text
type AttrTransferType ComponentTextdomainPropertyInfo = T.Text
type AttrGetType ComponentTextdomainPropertyInfo = T.Text
type AttrLabel ComponentTextdomainPropertyInfo = "textdomain"
type AttrOrigin ComponentTextdomainPropertyInfo = Component
attrGet = getComponentTextdomain
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentTextdomain
attrClear = undefined
#endif
getComponentVersion :: (MonadIO m, IsComponent o) => o -> m T.Text
getComponentVersion :: o -> m Text
getComponentVersion o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getComponentVersion" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"version"
constructComponentVersion :: (IsComponent o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructComponentVersion :: Text -> m (GValueConstruct o)
constructComponentVersion Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"version" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ComponentVersionPropertyInfo
instance AttrInfo ComponentVersionPropertyInfo where
type AttrAllowedOps ComponentVersionPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ComponentVersionPropertyInfo = IsComponent
type AttrSetTypeConstraint ComponentVersionPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ComponentVersionPropertyInfo = (~) T.Text
type AttrTransferType ComponentVersionPropertyInfo = T.Text
type AttrGetType ComponentVersionPropertyInfo = T.Text
type AttrLabel ComponentVersionPropertyInfo = "version"
type AttrOrigin ComponentVersionPropertyInfo = Component
attrGet = getComponentVersion
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructComponentVersion
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Component
type instance O.AttributeList Component = ComponentAttributeList
type ComponentAttributeList = ('[ '("author", ComponentAuthorPropertyInfo), '("commandLine", ComponentCommandLinePropertyInfo), '("description", ComponentDescriptionPropertyInfo), '("homepage", ComponentHomepagePropertyInfo), '("license", ComponentLicensePropertyInfo), '("name", ComponentNamePropertyInfo), '("textdomain", ComponentTextdomainPropertyInfo), '("version", ComponentVersionPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
componentAuthor :: AttrLabelProxy "author"
componentAuthor = AttrLabelProxy
componentCommandLine :: AttrLabelProxy "commandLine"
componentCommandLine = AttrLabelProxy
componentDescription :: AttrLabelProxy "description"
componentDescription = AttrLabelProxy
componentHomepage :: AttrLabelProxy "homepage"
componentHomepage = AttrLabelProxy
componentLicense :: AttrLabelProxy "license"
componentLicense = AttrLabelProxy
componentName :: AttrLabelProxy "name"
componentName = AttrLabelProxy
componentTextdomain :: AttrLabelProxy "textdomain"
componentTextdomain = AttrLabelProxy
componentVersion :: AttrLabelProxy "version"
componentVersion = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Component = ComponentSignalList
type ComponentSignalList = ('[ '("destroy", IBus.Object.ObjectDestroySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ibus_component_new" ibus_component_new ::
CString ->
CString ->
CString ->
CString ->
CString ->
CString ->
CString ->
CString ->
IO (Ptr Component)
componentNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> T.Text
-> m Component
componentNew :: Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> m Component
componentNew Text
name Text
description Text
version Text
license Text
author Text
homepage Text
commandLine Text
textdomain = IO Component -> m Component
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Component -> m Component) -> IO Component -> m Component
forall a b. (a -> b) -> a -> b
$ do
CString
name' <- Text -> IO CString
textToCString Text
name
CString
description' <- Text -> IO CString
textToCString Text
description
CString
version' <- Text -> IO CString
textToCString Text
version
CString
license' <- Text -> IO CString
textToCString Text
license
CString
author' <- Text -> IO CString
textToCString Text
author
CString
homepage' <- Text -> IO CString
textToCString Text
homepage
CString
commandLine' <- Text -> IO CString
textToCString Text
commandLine
CString
textdomain' <- Text -> IO CString
textToCString Text
textdomain
Ptr Component
result <- CString
-> CString
-> CString
-> CString
-> CString
-> CString
-> CString
-> CString
-> IO (Ptr Component)
ibus_component_new CString
name' CString
description' CString
version' CString
license' CString
author' CString
homepage' CString
commandLine' CString
textdomain'
Text -> Ptr Component -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentNew" Ptr Component
result
Component
result' <- ((ManagedPtr Component -> Component)
-> Ptr Component -> IO Component
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Component -> Component
Component) Ptr Component
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
description'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
version'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
license'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
author'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
homepage'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
commandLine'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
textdomain'
Component -> IO Component
forall (m :: * -> *) a. Monad m => a -> m a
return Component
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ibus_component_new_from_file" ibus_component_new_from_file ::
CString ->
IO (Ptr Component)
componentNewFromFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Component
componentNewFromFile :: Text -> m Component
componentNewFromFile Text
filename = IO Component -> m Component
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Component -> m Component) -> IO Component -> m Component
forall a b. (a -> b) -> a -> b
$ do
CString
filename' <- Text -> IO CString
textToCString Text
filename
Ptr Component
result <- CString -> IO (Ptr Component)
ibus_component_new_from_file CString
filename'
Text -> Ptr Component -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentNewFromFile" Ptr Component
result
Component
result' <- ((ManagedPtr Component -> Component)
-> Ptr Component -> IO Component
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Component -> Component
Component) Ptr Component
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
Component -> IO Component
forall (m :: * -> *) a. Monad m => a -> m a
return Component
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ibus_component_new_from_xml_node" ibus_component_new_from_xml_node ::
Ptr IBus.XML.XML ->
IO (Ptr Component)
componentNewFromXmlNode ::
(B.CallStack.HasCallStack, MonadIO m) =>
IBus.XML.XML
-> m Component
componentNewFromXmlNode :: XML -> m Component
componentNewFromXmlNode XML
node = IO Component -> m Component
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Component -> m Component) -> IO Component -> m Component
forall a b. (a -> b) -> a -> b
$ do
Ptr XML
node' <- XML -> IO (Ptr XML)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr XML
node
Ptr Component
result <- Ptr XML -> IO (Ptr Component)
ibus_component_new_from_xml_node Ptr XML
node'
Text -> Ptr Component -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentNewFromXmlNode" Ptr Component
result
Component
result' <- ((ManagedPtr Component -> Component)
-> Ptr Component -> IO Component
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Component -> Component
Component) Ptr Component
result
XML -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr XML
node
Component -> IO Component
forall (m :: * -> *) a. Monad m => a -> m a
return Component
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ibus_component_add_engine" ibus_component_add_engine ::
Ptr Component ->
Ptr IBus.EngineDesc.EngineDesc ->
IO ()
componentAddEngine ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a, IBus.EngineDesc.IsEngineDesc b) =>
a
-> b
-> m ()
componentAddEngine :: a -> b -> m ()
componentAddEngine a
component b
engine = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
Ptr EngineDesc
engine' <- b -> IO (Ptr EngineDesc)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
engine
Ptr Component -> Ptr EngineDesc -> IO ()
ibus_component_add_engine Ptr Component
component' Ptr EngineDesc
engine'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
engine
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ComponentAddEngineMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsComponent a, IBus.EngineDesc.IsEngineDesc b) => O.MethodInfo ComponentAddEngineMethodInfo a signature where
overloadedMethod = componentAddEngine
#endif
foreign import ccall "ibus_component_add_observed_path" ibus_component_add_observed_path ::
Ptr Component ->
CString ->
CInt ->
IO ()
componentAddObservedPath ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> T.Text
-> Bool
-> m ()
componentAddObservedPath :: a -> Text -> Bool -> m ()
componentAddObservedPath a
component Text
path Bool
accessFs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
path' <- Text -> IO CString
textToCString Text
path
let accessFs' :: CInt
accessFs' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
accessFs
Ptr Component -> CString -> CInt -> IO ()
ibus_component_add_observed_path Ptr Component
component' CString
path' CInt
accessFs'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ComponentAddObservedPathMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m, IsComponent a) => O.MethodInfo ComponentAddObservedPathMethodInfo a signature where
overloadedMethod = componentAddObservedPath
#endif
foreign import ccall "ibus_component_check_modification" ibus_component_check_modification ::
Ptr Component ->
IO CInt
componentCheckModification ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m Bool
componentCheckModification :: a -> m Bool
componentCheckModification a
component = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CInt
result <- Ptr Component -> IO CInt
ibus_component_check_modification Ptr Component
component'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ComponentCheckModificationMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsComponent a) => O.MethodInfo ComponentCheckModificationMethodInfo a signature where
overloadedMethod = componentCheckModification
#endif
foreign import ccall "ibus_component_get_author" ibus_component_get_author ::
Ptr Component ->
IO CString
componentGetAuthor ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetAuthor :: a -> m Text
componentGetAuthor a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_author Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetAuthor" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetAuthorMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetAuthorMethodInfo a signature where
overloadedMethod = componentGetAuthor
#endif
foreign import ccall "ibus_component_get_description" ibus_component_get_description ::
Ptr Component ->
IO CString
componentGetDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetDescription :: a -> m Text
componentGetDescription a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_description Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetDescription" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetDescriptionMethodInfo a signature where
overloadedMethod = componentGetDescription
#endif
foreign import ccall "ibus_component_get_engines" ibus_component_get_engines ::
Ptr Component ->
IO (Ptr (GList (Ptr IBus.EngineDesc.EngineDesc)))
componentGetEngines ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m [IBus.EngineDesc.EngineDesc]
componentGetEngines :: a -> m [EngineDesc]
componentGetEngines a
component = IO [EngineDesc] -> m [EngineDesc]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EngineDesc] -> m [EngineDesc])
-> IO [EngineDesc] -> m [EngineDesc]
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
Ptr (GList (Ptr EngineDesc))
result <- Ptr Component -> IO (Ptr (GList (Ptr EngineDesc)))
ibus_component_get_engines Ptr Component
component'
[Ptr EngineDesc]
result' <- Ptr (GList (Ptr EngineDesc)) -> IO [Ptr EngineDesc]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr EngineDesc))
result
[EngineDesc]
result'' <- (Ptr EngineDesc -> IO EngineDesc)
-> [Ptr EngineDesc] -> IO [EngineDesc]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr EngineDesc -> EngineDesc)
-> Ptr EngineDesc -> IO EngineDesc
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr EngineDesc -> EngineDesc
IBus.EngineDesc.EngineDesc) [Ptr EngineDesc]
result'
Ptr (GList (Ptr EngineDesc)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr EngineDesc))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
[EngineDesc] -> IO [EngineDesc]
forall (m :: * -> *) a. Monad m => a -> m a
return [EngineDesc]
result''
#if defined(ENABLE_OVERLOADING)
data ComponentGetEnginesMethodInfo
instance (signature ~ (m [IBus.EngineDesc.EngineDesc]), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetEnginesMethodInfo a signature where
overloadedMethod = componentGetEngines
#endif
foreign import ccall "ibus_component_get_exec" ibus_component_get_exec ::
Ptr Component ->
IO CString
componentGetExec ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetExec :: a -> m Text
componentGetExec a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_exec Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetExec" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetExecMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetExecMethodInfo a signature where
overloadedMethod = componentGetExec
#endif
foreign import ccall "ibus_component_get_homepage" ibus_component_get_homepage ::
Ptr Component ->
IO CString
componentGetHomepage ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetHomepage :: a -> m Text
componentGetHomepage a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_homepage Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetHomepage" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetHomepageMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetHomepageMethodInfo a signature where
overloadedMethod = componentGetHomepage
#endif
foreign import ccall "ibus_component_get_license" ibus_component_get_license ::
Ptr Component ->
IO CString
componentGetLicense ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetLicense :: a -> m Text
componentGetLicense a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_license Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetLicense" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetLicenseMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetLicenseMethodInfo a signature where
overloadedMethod = componentGetLicense
#endif
foreign import ccall "ibus_component_get_name" ibus_component_get_name ::
Ptr Component ->
IO CString
componentGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetName :: a -> m Text
componentGetName a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_name Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetNameMethodInfo a signature where
overloadedMethod = componentGetName
#endif
foreign import ccall "ibus_component_get_observed_paths" ibus_component_get_observed_paths ::
Ptr Component ->
IO (Ptr (GList (Ptr IBus.ObservedPath.ObservedPath)))
componentGetObservedPaths ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m [IBus.ObservedPath.ObservedPath]
componentGetObservedPaths :: a -> m [ObservedPath]
componentGetObservedPaths a
component = IO [ObservedPath] -> m [ObservedPath]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ObservedPath] -> m [ObservedPath])
-> IO [ObservedPath] -> m [ObservedPath]
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
Ptr (GList (Ptr ObservedPath))
result <- Ptr Component -> IO (Ptr (GList (Ptr ObservedPath)))
ibus_component_get_observed_paths Ptr Component
component'
[Ptr ObservedPath]
result' <- Ptr (GList (Ptr ObservedPath)) -> IO [Ptr ObservedPath]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr ObservedPath))
result
[ObservedPath]
result'' <- (Ptr ObservedPath -> IO ObservedPath)
-> [Ptr ObservedPath] -> IO [ObservedPath]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr ObservedPath -> ObservedPath)
-> Ptr ObservedPath -> IO ObservedPath
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ObservedPath -> ObservedPath
IBus.ObservedPath.ObservedPath) [Ptr ObservedPath]
result'
Ptr (GList (Ptr ObservedPath)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr ObservedPath))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
[ObservedPath] -> IO [ObservedPath]
forall (m :: * -> *) a. Monad m => a -> m a
return [ObservedPath]
result''
#if defined(ENABLE_OVERLOADING)
data ComponentGetObservedPathsMethodInfo
instance (signature ~ (m [IBus.ObservedPath.ObservedPath]), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetObservedPathsMethodInfo a signature where
overloadedMethod = componentGetObservedPaths
#endif
foreign import ccall "ibus_component_get_textdomain" ibus_component_get_textdomain ::
Ptr Component ->
IO CString
componentGetTextdomain ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetTextdomain :: a -> m Text
componentGetTextdomain a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_textdomain Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetTextdomain" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetTextdomainMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetTextdomainMethodInfo a signature where
overloadedMethod = componentGetTextdomain
#endif
foreign import ccall "ibus_component_get_version" ibus_component_get_version ::
Ptr Component ->
IO CString
componentGetVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m T.Text
componentGetVersion :: a -> m Text
componentGetVersion a
component = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
CString
result <- Ptr Component -> IO CString
ibus_component_get_version Ptr Component
component'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"componentGetVersion" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetVersionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsComponent a) => O.MethodInfo ComponentGetVersionMethodInfo a signature where
overloadedMethod = componentGetVersion
#endif
foreign import ccall "ibus_component_output" ibus_component_output ::
Ptr Component ->
Ptr GLib.String.String ->
Int32 ->
IO ()
componentOutput ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> GLib.String.String
-> Int32
-> m ()
componentOutput :: a -> String -> Int32 -> m ()
componentOutput a
component String
output Int32
indent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
Ptr String
output' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
output
Ptr Component -> Ptr String -> Int32 -> IO ()
ibus_component_output Ptr Component
component' Ptr String
output' Int32
indent
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
output
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ComponentOutputMethodInfo
instance (signature ~ (GLib.String.String -> Int32 -> m ()), MonadIO m, IsComponent a) => O.MethodInfo ComponentOutputMethodInfo a signature where
overloadedMethod = componentOutput
#endif
foreign import ccall "ibus_component_output_engines" ibus_component_output_engines ::
Ptr Component ->
Ptr GLib.String.String ->
Int32 ->
IO ()
componentOutputEngines ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> GLib.String.String
-> Int32
-> m ()
componentOutputEngines :: a -> String -> Int32 -> m ()
componentOutputEngines a
component String
output Int32
indent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Component
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
Ptr String
output' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
output
Ptr Component -> Ptr String -> Int32 -> IO ()
ibus_component_output_engines Ptr Component
component' Ptr String
output' Int32
indent
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
component
String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
output
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ComponentOutputEnginesMethodInfo
instance (signature ~ (GLib.String.String -> Int32 -> m ()), MonadIO m, IsComponent a) => O.MethodInfo ComponentOutputEnginesMethodInfo a signature where
overloadedMethod = componentOutputEngines
#endif