{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.Application
(
Application(..) ,
IsApplication ,
toApplication ,
noApplication ,
#if defined(ENABLE_OVERLOADING)
ResolveApplicationMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ApplicationActivateMethodInfo ,
#endif
applicationActivate ,
#if defined(ENABLE_OVERLOADING)
ApplicationAddMainOptionMethodInfo ,
#endif
applicationAddMainOption ,
#if defined(ENABLE_OVERLOADING)
ApplicationAddMainOptionEntriesMethodInfo,
#endif
applicationAddMainOptionEntries ,
#if defined(ENABLE_OVERLOADING)
ApplicationAddOptionGroupMethodInfo ,
#endif
applicationAddOptionGroup ,
#if defined(ENABLE_OVERLOADING)
ApplicationBindBusyPropertyMethodInfo ,
#endif
applicationBindBusyProperty ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetApplicationIdMethodInfo ,
#endif
applicationGetApplicationId ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetDbusConnectionMethodInfo ,
#endif
applicationGetDbusConnection ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetDbusObjectPathMethodInfo ,
#endif
applicationGetDbusObjectPath ,
applicationGetDefault ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetFlagsMethodInfo ,
#endif
applicationGetFlags ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetInactivityTimeoutMethodInfo,
#endif
applicationGetInactivityTimeout ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetIsBusyMethodInfo ,
#endif
applicationGetIsBusy ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetIsRegisteredMethodInfo ,
#endif
applicationGetIsRegistered ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetIsRemoteMethodInfo ,
#endif
applicationGetIsRemote ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetResourceBasePathMethodInfo,
#endif
applicationGetResourceBasePath ,
#if defined(ENABLE_OVERLOADING)
ApplicationHoldMethodInfo ,
#endif
applicationHold ,
applicationIdIsValid ,
#if defined(ENABLE_OVERLOADING)
ApplicationMarkBusyMethodInfo ,
#endif
applicationMarkBusy ,
applicationNew ,
#if defined(ENABLE_OVERLOADING)
ApplicationOpenMethodInfo ,
#endif
applicationOpen ,
#if defined(ENABLE_OVERLOADING)
ApplicationQuitMethodInfo ,
#endif
applicationQuit ,
#if defined(ENABLE_OVERLOADING)
ApplicationRegisterMethodInfo ,
#endif
applicationRegister ,
#if defined(ENABLE_OVERLOADING)
ApplicationReleaseMethodInfo ,
#endif
applicationRelease ,
#if defined(ENABLE_OVERLOADING)
ApplicationRunMethodInfo ,
#endif
applicationRun ,
#if defined(ENABLE_OVERLOADING)
ApplicationSendNotificationMethodInfo ,
#endif
applicationSendNotification ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetActionGroupMethodInfo ,
#endif
applicationSetActionGroup ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetApplicationIdMethodInfo ,
#endif
applicationSetApplicationId ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetDefaultMethodInfo ,
#endif
applicationSetDefault ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetFlagsMethodInfo ,
#endif
applicationSetFlags ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetInactivityTimeoutMethodInfo,
#endif
applicationSetInactivityTimeout ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetOptionContextDescriptionMethodInfo,
#endif
applicationSetOptionContextDescription ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetOptionContextParameterStringMethodInfo,
#endif
applicationSetOptionContextParameterString,
#if defined(ENABLE_OVERLOADING)
ApplicationSetOptionContextSummaryMethodInfo,
#endif
applicationSetOptionContextSummary ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetResourceBasePathMethodInfo,
#endif
applicationSetResourceBasePath ,
#if defined(ENABLE_OVERLOADING)
ApplicationUnbindBusyPropertyMethodInfo ,
#endif
applicationUnbindBusyProperty ,
#if defined(ENABLE_OVERLOADING)
ApplicationUnmarkBusyMethodInfo ,
#endif
applicationUnmarkBusy ,
#if defined(ENABLE_OVERLOADING)
ApplicationWithdrawNotificationMethodInfo,
#endif
applicationWithdrawNotification ,
#if defined(ENABLE_OVERLOADING)
ApplicationActionGroupPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationActionGroup ,
#endif
clearApplicationActionGroup ,
constructApplicationActionGroup ,
setApplicationActionGroup ,
#if defined(ENABLE_OVERLOADING)
ApplicationApplicationIdPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationApplicationId ,
#endif
clearApplicationApplicationId ,
constructApplicationApplicationId ,
getApplicationApplicationId ,
setApplicationApplicationId ,
#if defined(ENABLE_OVERLOADING)
ApplicationFlagsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationFlags ,
#endif
constructApplicationFlags ,
getApplicationFlags ,
setApplicationFlags ,
#if defined(ENABLE_OVERLOADING)
ApplicationInactivityTimeoutPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
applicationInactivityTimeout ,
#endif
constructApplicationInactivityTimeout ,
getApplicationInactivityTimeout ,
setApplicationInactivityTimeout ,
#if defined(ENABLE_OVERLOADING)
ApplicationIsBusyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationIsBusy ,
#endif
getApplicationIsBusy ,
#if defined(ENABLE_OVERLOADING)
ApplicationIsRegisteredPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationIsRegistered ,
#endif
getApplicationIsRegistered ,
#if defined(ENABLE_OVERLOADING)
ApplicationIsRemotePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationIsRemote ,
#endif
getApplicationIsRemote ,
#if defined(ENABLE_OVERLOADING)
ApplicationResourceBasePathPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationResourceBasePath ,
#endif
clearApplicationResourceBasePath ,
constructApplicationResourceBasePath ,
getApplicationResourceBasePath ,
setApplicationResourceBasePath ,
ApplicationActivateCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationActivateSignalInfo ,
#endif
C_ApplicationActivateCallback ,
afterApplicationActivate ,
genClosure_ApplicationActivate ,
mk_ApplicationActivateCallback ,
noApplicationActivateCallback ,
onApplicationActivate ,
wrap_ApplicationActivateCallback ,
ApplicationCommandLineCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationCommandLineSignalInfo ,
#endif
C_ApplicationCommandLineCallback ,
afterApplicationCommandLine ,
genClosure_ApplicationCommandLine ,
mk_ApplicationCommandLineCallback ,
noApplicationCommandLineCallback ,
onApplicationCommandLine ,
wrap_ApplicationCommandLineCallback ,
ApplicationHandleLocalOptionsCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationHandleLocalOptionsSignalInfo ,
#endif
C_ApplicationHandleLocalOptionsCallback ,
afterApplicationHandleLocalOptions ,
genClosure_ApplicationHandleLocalOptions,
mk_ApplicationHandleLocalOptionsCallback,
noApplicationHandleLocalOptionsCallback ,
onApplicationHandleLocalOptions ,
wrap_ApplicationHandleLocalOptionsCallback,
ApplicationNameLostCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationNameLostSignalInfo ,
#endif
C_ApplicationNameLostCallback ,
afterApplicationNameLost ,
genClosure_ApplicationNameLost ,
mk_ApplicationNameLostCallback ,
noApplicationNameLostCallback ,
onApplicationNameLost ,
wrap_ApplicationNameLostCallback ,
ApplicationOpenCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationOpenSignalInfo ,
#endif
C_ApplicationOpenCallback ,
afterApplicationOpen ,
genClosure_ApplicationOpen ,
mk_ApplicationOpenCallback ,
noApplicationOpenCallback ,
onApplicationOpen ,
wrap_ApplicationOpenCallback ,
ApplicationShutdownCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationShutdownSignalInfo ,
#endif
C_ApplicationShutdownCallback ,
afterApplicationShutdown ,
genClosure_ApplicationShutdown ,
mk_ApplicationShutdownCallback ,
noApplicationShutdownCallback ,
onApplicationShutdown ,
wrap_ApplicationShutdownCallback ,
ApplicationStartupCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationStartupSignalInfo ,
#endif
C_ApplicationStartupCallback ,
afterApplicationStartup ,
genClosure_ApplicationStartup ,
mk_ApplicationStartupCallback ,
noApplicationStartupCallback ,
onApplicationStartup ,
wrap_ApplicationStartupCallback ,
) 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.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 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.Enums as GLib.Enums
import qualified GI.GLib.Flags as GLib.Flags
import qualified GI.GLib.Structs.OptionEntry as GLib.OptionEntry
import qualified GI.GLib.Structs.OptionGroup as GLib.OptionGroup
import qualified GI.GLib.Structs.VariantDict as GLib.VariantDict
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionMap as Gio.ActionMap
import {-# SOURCE #-} qualified GI.Gio.Interfaces.File as Gio.File
import {-# SOURCE #-} qualified GI.Gio.Objects.ApplicationCommandLine as Gio.ApplicationCommandLine
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.Notification as Gio.Notification
newtype Application = Application (ManagedPtr Application)
deriving (Application -> Application -> Bool
(Application -> Application -> Bool)
-> (Application -> Application -> Bool) -> Eq Application
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Application -> Application -> Bool
$c/= :: Application -> Application -> Bool
== :: Application -> Application -> Bool
$c== :: Application -> Application -> Bool
Eq)
foreign import ccall "g_application_get_type"
c_g_application_get_type :: IO GType
instance GObject Application where
gobjectType :: IO GType
gobjectType = IO GType
c_g_application_get_type
instance B.GValue.IsGValue Application where
toGValue :: Application -> IO GValue
toGValue o :: Application
o = do
GType
gtype <- IO GType
c_g_application_get_type
Application -> (Ptr Application -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Application
o (GType
-> (GValue -> Ptr Application -> IO ())
-> Ptr Application
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Application -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Application
fromGValue gv :: GValue
gv = do
Ptr Application
ptr <- GValue -> IO (Ptr Application)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Application)
(ManagedPtr Application -> Application)
-> Ptr Application -> IO Application
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Application -> Application
Application Ptr Application
ptr
class (GObject o, O.IsDescendantOf Application o) => IsApplication o
instance (GObject o, O.IsDescendantOf Application o) => IsApplication o
instance O.HasParentTypes Application
type instance O.ParentTypes Application = '[GObject.Object.Object, Gio.ActionGroup.ActionGroup, Gio.ActionMap.ActionMap]
toApplication :: (MonadIO m, IsApplication o) => o -> m Application
toApplication :: o -> m Application
toApplication = IO Application -> m Application
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Application -> m Application)
-> (o -> IO Application) -> o -> m Application
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Application -> Application) -> o -> IO Application
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Application -> Application
Application
noApplication :: Maybe Application
noApplication :: Maybe Application
noApplication = Maybe Application
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveApplicationMethod (t :: Symbol) (o :: *) :: * where
ResolveApplicationMethod "actionAdded" o = Gio.ActionGroup.ActionGroupActionAddedMethodInfo
ResolveApplicationMethod "actionEnabledChanged" o = Gio.ActionGroup.ActionGroupActionEnabledChangedMethodInfo
ResolveApplicationMethod "actionRemoved" o = Gio.ActionGroup.ActionGroupActionRemovedMethodInfo
ResolveApplicationMethod "actionStateChanged" o = Gio.ActionGroup.ActionGroupActionStateChangedMethodInfo
ResolveApplicationMethod "activate" o = ApplicationActivateMethodInfo
ResolveApplicationMethod "activateAction" o = Gio.ActionGroup.ActionGroupActivateActionMethodInfo
ResolveApplicationMethod "addAction" o = Gio.ActionMap.ActionMapAddActionMethodInfo
ResolveApplicationMethod "addActionEntries" o = Gio.ActionMap.ActionMapAddActionEntriesMethodInfo
ResolveApplicationMethod "addMainOption" o = ApplicationAddMainOptionMethodInfo
ResolveApplicationMethod "addMainOptionEntries" o = ApplicationAddMainOptionEntriesMethodInfo
ResolveApplicationMethod "addOptionGroup" o = ApplicationAddOptionGroupMethodInfo
ResolveApplicationMethod "bindBusyProperty" o = ApplicationBindBusyPropertyMethodInfo
ResolveApplicationMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveApplicationMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveApplicationMethod "changeActionState" o = Gio.ActionGroup.ActionGroupChangeActionStateMethodInfo
ResolveApplicationMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveApplicationMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveApplicationMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveApplicationMethod "hasAction" o = Gio.ActionGroup.ActionGroupHasActionMethodInfo
ResolveApplicationMethod "hold" o = ApplicationHoldMethodInfo
ResolveApplicationMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveApplicationMethod "listActions" o = Gio.ActionGroup.ActionGroupListActionsMethodInfo
ResolveApplicationMethod "lookupAction" o = Gio.ActionMap.ActionMapLookupActionMethodInfo
ResolveApplicationMethod "markBusy" o = ApplicationMarkBusyMethodInfo
ResolveApplicationMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveApplicationMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveApplicationMethod "open" o = ApplicationOpenMethodInfo
ResolveApplicationMethod "queryAction" o = Gio.ActionGroup.ActionGroupQueryActionMethodInfo
ResolveApplicationMethod "quit" o = ApplicationQuitMethodInfo
ResolveApplicationMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveApplicationMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveApplicationMethod "register" o = ApplicationRegisterMethodInfo
ResolveApplicationMethod "release" o = ApplicationReleaseMethodInfo
ResolveApplicationMethod "removeAction" o = Gio.ActionMap.ActionMapRemoveActionMethodInfo
ResolveApplicationMethod "run" o = ApplicationRunMethodInfo
ResolveApplicationMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveApplicationMethod "sendNotification" o = ApplicationSendNotificationMethodInfo
ResolveApplicationMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveApplicationMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveApplicationMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveApplicationMethod "unbindBusyProperty" o = ApplicationUnbindBusyPropertyMethodInfo
ResolveApplicationMethod "unmarkBusy" o = ApplicationUnmarkBusyMethodInfo
ResolveApplicationMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveApplicationMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveApplicationMethod "withdrawNotification" o = ApplicationWithdrawNotificationMethodInfo
ResolveApplicationMethod "getActionEnabled" o = Gio.ActionGroup.ActionGroupGetActionEnabledMethodInfo
ResolveApplicationMethod "getActionParameterType" o = Gio.ActionGroup.ActionGroupGetActionParameterTypeMethodInfo
ResolveApplicationMethod "getActionState" o = Gio.ActionGroup.ActionGroupGetActionStateMethodInfo
ResolveApplicationMethod "getActionStateHint" o = Gio.ActionGroup.ActionGroupGetActionStateHintMethodInfo
ResolveApplicationMethod "getActionStateType" o = Gio.ActionGroup.ActionGroupGetActionStateTypeMethodInfo
ResolveApplicationMethod "getApplicationId" o = ApplicationGetApplicationIdMethodInfo
ResolveApplicationMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveApplicationMethod "getDbusConnection" o = ApplicationGetDbusConnectionMethodInfo
ResolveApplicationMethod "getDbusObjectPath" o = ApplicationGetDbusObjectPathMethodInfo
ResolveApplicationMethod "getFlags" o = ApplicationGetFlagsMethodInfo
ResolveApplicationMethod "getInactivityTimeout" o = ApplicationGetInactivityTimeoutMethodInfo
ResolveApplicationMethod "getIsBusy" o = ApplicationGetIsBusyMethodInfo
ResolveApplicationMethod "getIsRegistered" o = ApplicationGetIsRegisteredMethodInfo
ResolveApplicationMethod "getIsRemote" o = ApplicationGetIsRemoteMethodInfo
ResolveApplicationMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveApplicationMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveApplicationMethod "getResourceBasePath" o = ApplicationGetResourceBasePathMethodInfo
ResolveApplicationMethod "setActionGroup" o = ApplicationSetActionGroupMethodInfo
ResolveApplicationMethod "setApplicationId" o = ApplicationSetApplicationIdMethodInfo
ResolveApplicationMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveApplicationMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveApplicationMethod "setDefault" o = ApplicationSetDefaultMethodInfo
ResolveApplicationMethod "setFlags" o = ApplicationSetFlagsMethodInfo
ResolveApplicationMethod "setInactivityTimeout" o = ApplicationSetInactivityTimeoutMethodInfo
ResolveApplicationMethod "setOptionContextDescription" o = ApplicationSetOptionContextDescriptionMethodInfo
ResolveApplicationMethod "setOptionContextParameterString" o = ApplicationSetOptionContextParameterStringMethodInfo
ResolveApplicationMethod "setOptionContextSummary" o = ApplicationSetOptionContextSummaryMethodInfo
ResolveApplicationMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveApplicationMethod "setResourceBasePath" o = ApplicationSetResourceBasePathMethodInfo
ResolveApplicationMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveApplicationMethod t Application, O.MethodInfo info Application p) => OL.IsLabel t (Application -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type ApplicationActivateCallback =
IO ()
noApplicationActivateCallback :: Maybe ApplicationActivateCallback
noApplicationActivateCallback :: Maybe (IO ())
noApplicationActivateCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_ApplicationActivateCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ApplicationActivateCallback :: C_ApplicationActivateCallback -> IO (FunPtr C_ApplicationActivateCallback)
genClosure_ApplicationActivate :: MonadIO m => ApplicationActivateCallback -> m (GClosure C_ApplicationActivateCallback)
genClosure_ApplicationActivate :: IO () -> m (GClosure C_ApplicationActivateCallback)
genClosure_ApplicationActivate cb :: IO ()
cb = IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback))
-> IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationActivateCallback IO ()
cb
C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationActivateCallback C_ApplicationActivateCallback
cb' IO (FunPtr C_ApplicationActivateCallback)
-> (FunPtr C_ApplicationActivateCallback
-> IO (GClosure C_ApplicationActivateCallback))
-> IO (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ApplicationActivateCallback
-> IO (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ApplicationActivateCallback ::
ApplicationActivateCallback ->
C_ApplicationActivateCallback
wrap_ApplicationActivateCallback :: IO () -> C_ApplicationActivateCallback
wrap_ApplicationActivateCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onApplicationActivate :: (IsApplication a, MonadIO m) => a -> ApplicationActivateCallback -> m SignalHandlerId
onApplicationActivate :: a -> IO () -> m SignalHandlerId
onApplicationActivate obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationActivateCallback IO ()
cb
FunPtr C_ApplicationActivateCallback
cb'' <- C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationActivateCallback C_ApplicationActivateCallback
cb'
a
-> Text
-> FunPtr C_ApplicationActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "activate" FunPtr C_ApplicationActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationActivate :: (IsApplication a, MonadIO m) => a -> ApplicationActivateCallback -> m SignalHandlerId
afterApplicationActivate :: a -> IO () -> m SignalHandlerId
afterApplicationActivate obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationActivateCallback IO ()
cb
FunPtr C_ApplicationActivateCallback
cb'' <- C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationActivateCallback C_ApplicationActivateCallback
cb'
a
-> Text
-> FunPtr C_ApplicationActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "activate" FunPtr C_ApplicationActivateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationActivateSignalInfo
instance SignalInfo ApplicationActivateSignalInfo where
type HaskellCallbackType ApplicationActivateSignalInfo = ApplicationActivateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationActivateCallback cb
cb'' <- mk_ApplicationActivateCallback cb'
connectSignalFunPtr obj "activate" cb'' connectMode detail
#endif
type ApplicationCommandLineCallback =
Gio.ApplicationCommandLine.ApplicationCommandLine
-> IO Int32
noApplicationCommandLineCallback :: Maybe ApplicationCommandLineCallback
noApplicationCommandLineCallback :: Maybe ApplicationCommandLineCallback
noApplicationCommandLineCallback = Maybe ApplicationCommandLineCallback
forall a. Maybe a
Nothing
type C_ApplicationCommandLineCallback =
Ptr () ->
Ptr Gio.ApplicationCommandLine.ApplicationCommandLine ->
Ptr () ->
IO Int32
foreign import ccall "wrapper"
mk_ApplicationCommandLineCallback :: C_ApplicationCommandLineCallback -> IO (FunPtr C_ApplicationCommandLineCallback)
genClosure_ApplicationCommandLine :: MonadIO m => ApplicationCommandLineCallback -> m (GClosure C_ApplicationCommandLineCallback)
genClosure_ApplicationCommandLine :: ApplicationCommandLineCallback
-> m (GClosure C_ApplicationCommandLineCallback)
genClosure_ApplicationCommandLine cb :: ApplicationCommandLineCallback
cb = IO (GClosure C_ApplicationCommandLineCallback)
-> m (GClosure C_ApplicationCommandLineCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ApplicationCommandLineCallback)
-> m (GClosure C_ApplicationCommandLineCallback))
-> IO (GClosure C_ApplicationCommandLineCallback)
-> m (GClosure C_ApplicationCommandLineCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationCommandLineCallback
cb' = ApplicationCommandLineCallback -> C_ApplicationCommandLineCallback
wrap_ApplicationCommandLineCallback ApplicationCommandLineCallback
cb
C_ApplicationCommandLineCallback
-> IO (FunPtr C_ApplicationCommandLineCallback)
mk_ApplicationCommandLineCallback C_ApplicationCommandLineCallback
cb' IO (FunPtr C_ApplicationCommandLineCallback)
-> (FunPtr C_ApplicationCommandLineCallback
-> IO (GClosure C_ApplicationCommandLineCallback))
-> IO (GClosure C_ApplicationCommandLineCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ApplicationCommandLineCallback
-> IO (GClosure C_ApplicationCommandLineCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ApplicationCommandLineCallback ::
ApplicationCommandLineCallback ->
C_ApplicationCommandLineCallback
wrap_ApplicationCommandLineCallback :: ApplicationCommandLineCallback -> C_ApplicationCommandLineCallback
wrap_ApplicationCommandLineCallback _cb :: ApplicationCommandLineCallback
_cb _ commandLine :: Ptr ApplicationCommandLine
commandLine _ = do
ApplicationCommandLine
commandLine' <- ((ManagedPtr ApplicationCommandLine -> ApplicationCommandLine)
-> Ptr ApplicationCommandLine -> IO ApplicationCommandLine
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ApplicationCommandLine -> ApplicationCommandLine
Gio.ApplicationCommandLine.ApplicationCommandLine) Ptr ApplicationCommandLine
commandLine
Int32
result <- ApplicationCommandLineCallback
_cb ApplicationCommandLine
commandLine'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
onApplicationCommandLine :: (IsApplication a, MonadIO m) => a -> ApplicationCommandLineCallback -> m SignalHandlerId
onApplicationCommandLine :: a -> ApplicationCommandLineCallback -> m SignalHandlerId
onApplicationCommandLine obj :: a
obj cb :: ApplicationCommandLineCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationCommandLineCallback
cb' = ApplicationCommandLineCallback -> C_ApplicationCommandLineCallback
wrap_ApplicationCommandLineCallback ApplicationCommandLineCallback
cb
FunPtr C_ApplicationCommandLineCallback
cb'' <- C_ApplicationCommandLineCallback
-> IO (FunPtr C_ApplicationCommandLineCallback)
mk_ApplicationCommandLineCallback C_ApplicationCommandLineCallback
cb'
a
-> Text
-> FunPtr C_ApplicationCommandLineCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "command-line" FunPtr C_ApplicationCommandLineCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationCommandLine :: (IsApplication a, MonadIO m) => a -> ApplicationCommandLineCallback -> m SignalHandlerId
afterApplicationCommandLine :: a -> ApplicationCommandLineCallback -> m SignalHandlerId
afterApplicationCommandLine obj :: a
obj cb :: ApplicationCommandLineCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationCommandLineCallback
cb' = ApplicationCommandLineCallback -> C_ApplicationCommandLineCallback
wrap_ApplicationCommandLineCallback ApplicationCommandLineCallback
cb
FunPtr C_ApplicationCommandLineCallback
cb'' <- C_ApplicationCommandLineCallback
-> IO (FunPtr C_ApplicationCommandLineCallback)
mk_ApplicationCommandLineCallback C_ApplicationCommandLineCallback
cb'
a
-> Text
-> FunPtr C_ApplicationCommandLineCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "command-line" FunPtr C_ApplicationCommandLineCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationCommandLineSignalInfo
instance SignalInfo ApplicationCommandLineSignalInfo where
type HaskellCallbackType ApplicationCommandLineSignalInfo = ApplicationCommandLineCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationCommandLineCallback cb
cb'' <- mk_ApplicationCommandLineCallback cb'
connectSignalFunPtr obj "command-line" cb'' connectMode detail
#endif
type ApplicationHandleLocalOptionsCallback =
GLib.VariantDict.VariantDict
-> IO Int32
noApplicationHandleLocalOptionsCallback :: Maybe ApplicationHandleLocalOptionsCallback
noApplicationHandleLocalOptionsCallback :: Maybe ApplicationHandleLocalOptionsCallback
noApplicationHandleLocalOptionsCallback = Maybe ApplicationHandleLocalOptionsCallback
forall a. Maybe a
Nothing
type C_ApplicationHandleLocalOptionsCallback =
Ptr () ->
Ptr GLib.VariantDict.VariantDict ->
Ptr () ->
IO Int32
foreign import ccall "wrapper"
mk_ApplicationHandleLocalOptionsCallback :: C_ApplicationHandleLocalOptionsCallback -> IO (FunPtr C_ApplicationHandleLocalOptionsCallback)
genClosure_ApplicationHandleLocalOptions :: MonadIO m => ApplicationHandleLocalOptionsCallback -> m (GClosure C_ApplicationHandleLocalOptionsCallback)
genClosure_ApplicationHandleLocalOptions :: ApplicationHandleLocalOptionsCallback
-> m (GClosure C_ApplicationHandleLocalOptionsCallback)
genClosure_ApplicationHandleLocalOptions cb :: ApplicationHandleLocalOptionsCallback
cb = IO (GClosure C_ApplicationHandleLocalOptionsCallback)
-> m (GClosure C_ApplicationHandleLocalOptionsCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ApplicationHandleLocalOptionsCallback)
-> m (GClosure C_ApplicationHandleLocalOptionsCallback))
-> IO (GClosure C_ApplicationHandleLocalOptionsCallback)
-> m (GClosure C_ApplicationHandleLocalOptionsCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationHandleLocalOptionsCallback
cb' = ApplicationHandleLocalOptionsCallback
-> C_ApplicationHandleLocalOptionsCallback
wrap_ApplicationHandleLocalOptionsCallback ApplicationHandleLocalOptionsCallback
cb
C_ApplicationHandleLocalOptionsCallback
-> IO (FunPtr C_ApplicationHandleLocalOptionsCallback)
mk_ApplicationHandleLocalOptionsCallback C_ApplicationHandleLocalOptionsCallback
cb' IO (FunPtr C_ApplicationHandleLocalOptionsCallback)
-> (FunPtr C_ApplicationHandleLocalOptionsCallback
-> IO (GClosure C_ApplicationHandleLocalOptionsCallback))
-> IO (GClosure C_ApplicationHandleLocalOptionsCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ApplicationHandleLocalOptionsCallback
-> IO (GClosure C_ApplicationHandleLocalOptionsCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ApplicationHandleLocalOptionsCallback ::
ApplicationHandleLocalOptionsCallback ->
C_ApplicationHandleLocalOptionsCallback
wrap_ApplicationHandleLocalOptionsCallback :: ApplicationHandleLocalOptionsCallback
-> C_ApplicationHandleLocalOptionsCallback
wrap_ApplicationHandleLocalOptionsCallback _cb :: ApplicationHandleLocalOptionsCallback
_cb _ options :: Ptr VariantDict
options _ = do
(ManagedPtr VariantDict -> VariantDict)
-> Ptr VariantDict
-> ApplicationHandleLocalOptionsCallback
-> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr VariantDict -> VariantDict
GLib.VariantDict.VariantDict Ptr VariantDict
options (ApplicationHandleLocalOptionsCallback -> IO Int32)
-> ApplicationHandleLocalOptionsCallback -> IO Int32
forall a b. (a -> b) -> a -> b
$ \options' :: VariantDict
options' -> do
Int32
result <- ApplicationHandleLocalOptionsCallback
_cb VariantDict
options'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
onApplicationHandleLocalOptions :: (IsApplication a, MonadIO m) => a -> ApplicationHandleLocalOptionsCallback -> m SignalHandlerId
onApplicationHandleLocalOptions :: a -> ApplicationHandleLocalOptionsCallback -> m SignalHandlerId
onApplicationHandleLocalOptions obj :: a
obj cb :: ApplicationHandleLocalOptionsCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationHandleLocalOptionsCallback
cb' = ApplicationHandleLocalOptionsCallback
-> C_ApplicationHandleLocalOptionsCallback
wrap_ApplicationHandleLocalOptionsCallback ApplicationHandleLocalOptionsCallback
cb
FunPtr C_ApplicationHandleLocalOptionsCallback
cb'' <- C_ApplicationHandleLocalOptionsCallback
-> IO (FunPtr C_ApplicationHandleLocalOptionsCallback)
mk_ApplicationHandleLocalOptionsCallback C_ApplicationHandleLocalOptionsCallback
cb'
a
-> Text
-> FunPtr C_ApplicationHandleLocalOptionsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "handle-local-options" FunPtr C_ApplicationHandleLocalOptionsCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationHandleLocalOptions :: (IsApplication a, MonadIO m) => a -> ApplicationHandleLocalOptionsCallback -> m SignalHandlerId
afterApplicationHandleLocalOptions :: a -> ApplicationHandleLocalOptionsCallback -> m SignalHandlerId
afterApplicationHandleLocalOptions obj :: a
obj cb :: ApplicationHandleLocalOptionsCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationHandleLocalOptionsCallback
cb' = ApplicationHandleLocalOptionsCallback
-> C_ApplicationHandleLocalOptionsCallback
wrap_ApplicationHandleLocalOptionsCallback ApplicationHandleLocalOptionsCallback
cb
FunPtr C_ApplicationHandleLocalOptionsCallback
cb'' <- C_ApplicationHandleLocalOptionsCallback
-> IO (FunPtr C_ApplicationHandleLocalOptionsCallback)
mk_ApplicationHandleLocalOptionsCallback C_ApplicationHandleLocalOptionsCallback
cb'
a
-> Text
-> FunPtr C_ApplicationHandleLocalOptionsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "handle-local-options" FunPtr C_ApplicationHandleLocalOptionsCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationHandleLocalOptionsSignalInfo
instance SignalInfo ApplicationHandleLocalOptionsSignalInfo where
type HaskellCallbackType ApplicationHandleLocalOptionsSignalInfo = ApplicationHandleLocalOptionsCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationHandleLocalOptionsCallback cb
cb'' <- mk_ApplicationHandleLocalOptionsCallback cb'
connectSignalFunPtr obj "handle-local-options" cb'' connectMode detail
#endif
type ApplicationNameLostCallback =
IO Bool
noApplicationNameLostCallback :: Maybe ApplicationNameLostCallback
noApplicationNameLostCallback :: Maybe ApplicationNameLostCallback
noApplicationNameLostCallback = Maybe ApplicationNameLostCallback
forall a. Maybe a
Nothing
type C_ApplicationNameLostCallback =
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_ApplicationNameLostCallback :: C_ApplicationNameLostCallback -> IO (FunPtr C_ApplicationNameLostCallback)
genClosure_ApplicationNameLost :: MonadIO m => ApplicationNameLostCallback -> m (GClosure C_ApplicationNameLostCallback)
genClosure_ApplicationNameLost :: ApplicationNameLostCallback
-> m (GClosure C_ApplicationNameLostCallback)
genClosure_ApplicationNameLost cb :: ApplicationNameLostCallback
cb = IO (GClosure C_ApplicationNameLostCallback)
-> m (GClosure C_ApplicationNameLostCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ApplicationNameLostCallback)
-> m (GClosure C_ApplicationNameLostCallback))
-> IO (GClosure C_ApplicationNameLostCallback)
-> m (GClosure C_ApplicationNameLostCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationNameLostCallback
cb' = ApplicationNameLostCallback -> C_ApplicationNameLostCallback
wrap_ApplicationNameLostCallback ApplicationNameLostCallback
cb
C_ApplicationNameLostCallback
-> IO (FunPtr C_ApplicationNameLostCallback)
mk_ApplicationNameLostCallback C_ApplicationNameLostCallback
cb' IO (FunPtr C_ApplicationNameLostCallback)
-> (FunPtr C_ApplicationNameLostCallback
-> IO (GClosure C_ApplicationNameLostCallback))
-> IO (GClosure C_ApplicationNameLostCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ApplicationNameLostCallback
-> IO (GClosure C_ApplicationNameLostCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ApplicationNameLostCallback ::
ApplicationNameLostCallback ->
C_ApplicationNameLostCallback
wrap_ApplicationNameLostCallback :: ApplicationNameLostCallback -> C_ApplicationNameLostCallback
wrap_ApplicationNameLostCallback _cb :: ApplicationNameLostCallback
_cb _ _ = do
Bool
result <- ApplicationNameLostCallback
_cb
let result' :: CInt
result' = (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
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
onApplicationNameLost :: (IsApplication a, MonadIO m) => a -> ApplicationNameLostCallback -> m SignalHandlerId
onApplicationNameLost :: a -> ApplicationNameLostCallback -> m SignalHandlerId
onApplicationNameLost obj :: a
obj cb :: ApplicationNameLostCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationNameLostCallback
cb' = ApplicationNameLostCallback -> C_ApplicationNameLostCallback
wrap_ApplicationNameLostCallback ApplicationNameLostCallback
cb
FunPtr C_ApplicationNameLostCallback
cb'' <- C_ApplicationNameLostCallback
-> IO (FunPtr C_ApplicationNameLostCallback)
mk_ApplicationNameLostCallback C_ApplicationNameLostCallback
cb'
a
-> Text
-> FunPtr C_ApplicationNameLostCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "name-lost" FunPtr C_ApplicationNameLostCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationNameLost :: (IsApplication a, MonadIO m) => a -> ApplicationNameLostCallback -> m SignalHandlerId
afterApplicationNameLost :: a -> ApplicationNameLostCallback -> m SignalHandlerId
afterApplicationNameLost obj :: a
obj cb :: ApplicationNameLostCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationNameLostCallback
cb' = ApplicationNameLostCallback -> C_ApplicationNameLostCallback
wrap_ApplicationNameLostCallback ApplicationNameLostCallback
cb
FunPtr C_ApplicationNameLostCallback
cb'' <- C_ApplicationNameLostCallback
-> IO (FunPtr C_ApplicationNameLostCallback)
mk_ApplicationNameLostCallback C_ApplicationNameLostCallback
cb'
a
-> Text
-> FunPtr C_ApplicationNameLostCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "name-lost" FunPtr C_ApplicationNameLostCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationNameLostSignalInfo
instance SignalInfo ApplicationNameLostSignalInfo where
type HaskellCallbackType ApplicationNameLostSignalInfo = ApplicationNameLostCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationNameLostCallback cb
cb'' <- mk_ApplicationNameLostCallback cb'
connectSignalFunPtr obj "name-lost" cb'' connectMode detail
#endif
type ApplicationOpenCallback =
[Gio.File.File]
-> T.Text
-> IO ()
noApplicationOpenCallback :: Maybe ApplicationOpenCallback
noApplicationOpenCallback :: Maybe ApplicationOpenCallback
noApplicationOpenCallback = Maybe ApplicationOpenCallback
forall a. Maybe a
Nothing
type C_ApplicationOpenCallback =
Ptr () ->
Ptr (Ptr Gio.File.File) ->
Int32 ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ApplicationOpenCallback :: C_ApplicationOpenCallback -> IO (FunPtr C_ApplicationOpenCallback)
genClosure_ApplicationOpen :: MonadIO m => ApplicationOpenCallback -> m (GClosure C_ApplicationOpenCallback)
genClosure_ApplicationOpen :: ApplicationOpenCallback -> m (GClosure C_ApplicationOpenCallback)
genClosure_ApplicationOpen cb :: ApplicationOpenCallback
cb = IO (GClosure C_ApplicationOpenCallback)
-> m (GClosure C_ApplicationOpenCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ApplicationOpenCallback)
-> m (GClosure C_ApplicationOpenCallback))
-> IO (GClosure C_ApplicationOpenCallback)
-> m (GClosure C_ApplicationOpenCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationOpenCallback
cb' = ApplicationOpenCallback -> C_ApplicationOpenCallback
wrap_ApplicationOpenCallback ApplicationOpenCallback
cb
C_ApplicationOpenCallback -> IO (FunPtr C_ApplicationOpenCallback)
mk_ApplicationOpenCallback C_ApplicationOpenCallback
cb' IO (FunPtr C_ApplicationOpenCallback)
-> (FunPtr C_ApplicationOpenCallback
-> IO (GClosure C_ApplicationOpenCallback))
-> IO (GClosure C_ApplicationOpenCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ApplicationOpenCallback
-> IO (GClosure C_ApplicationOpenCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ApplicationOpenCallback ::
ApplicationOpenCallback ->
C_ApplicationOpenCallback
wrap_ApplicationOpenCallback :: ApplicationOpenCallback -> C_ApplicationOpenCallback
wrap_ApplicationOpenCallback _cb :: ApplicationOpenCallback
_cb _ files :: Ptr (Ptr File)
files nFiles :: Int32
nFiles hint :: CString
hint _ = do
[Ptr File]
files' <- (Int32 -> Ptr (Ptr File) -> IO [Ptr File]
forall a b. Integral a => a -> Ptr (Ptr b) -> IO [Ptr b]
unpackPtrArrayWithLength Int32
nFiles) Ptr (Ptr File)
files
[File]
files'' <- (Ptr File -> IO File) -> [Ptr File] -> IO [File]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr File -> File
Gio.File.File) [Ptr File]
files'
Text
hint' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
hint
ApplicationOpenCallback
_cb [File]
files'' Text
hint'
onApplicationOpen :: (IsApplication a, MonadIO m) => a -> ApplicationOpenCallback -> m SignalHandlerId
onApplicationOpen :: a -> ApplicationOpenCallback -> m SignalHandlerId
onApplicationOpen obj :: a
obj cb :: ApplicationOpenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationOpenCallback
cb' = ApplicationOpenCallback -> C_ApplicationOpenCallback
wrap_ApplicationOpenCallback ApplicationOpenCallback
cb
FunPtr C_ApplicationOpenCallback
cb'' <- C_ApplicationOpenCallback -> IO (FunPtr C_ApplicationOpenCallback)
mk_ApplicationOpenCallback C_ApplicationOpenCallback
cb'
a
-> Text
-> FunPtr C_ApplicationOpenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "open" FunPtr C_ApplicationOpenCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationOpen :: (IsApplication a, MonadIO m) => a -> ApplicationOpenCallback -> m SignalHandlerId
afterApplicationOpen :: a -> ApplicationOpenCallback -> m SignalHandlerId
afterApplicationOpen obj :: a
obj cb :: ApplicationOpenCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationOpenCallback
cb' = ApplicationOpenCallback -> C_ApplicationOpenCallback
wrap_ApplicationOpenCallback ApplicationOpenCallback
cb
FunPtr C_ApplicationOpenCallback
cb'' <- C_ApplicationOpenCallback -> IO (FunPtr C_ApplicationOpenCallback)
mk_ApplicationOpenCallback C_ApplicationOpenCallback
cb'
a
-> Text
-> FunPtr C_ApplicationOpenCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "open" FunPtr C_ApplicationOpenCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationOpenSignalInfo
instance SignalInfo ApplicationOpenSignalInfo where
type HaskellCallbackType ApplicationOpenSignalInfo = ApplicationOpenCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationOpenCallback cb
cb'' <- mk_ApplicationOpenCallback cb'
connectSignalFunPtr obj "open" cb'' connectMode detail
#endif
type ApplicationShutdownCallback =
IO ()
noApplicationShutdownCallback :: Maybe ApplicationShutdownCallback
noApplicationShutdownCallback :: Maybe (IO ())
noApplicationShutdownCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_ApplicationShutdownCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ApplicationShutdownCallback :: C_ApplicationShutdownCallback -> IO (FunPtr C_ApplicationShutdownCallback)
genClosure_ApplicationShutdown :: MonadIO m => ApplicationShutdownCallback -> m (GClosure C_ApplicationShutdownCallback)
genClosure_ApplicationShutdown :: IO () -> m (GClosure C_ApplicationActivateCallback)
genClosure_ApplicationShutdown cb :: IO ()
cb = IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback))
-> IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationShutdownCallback IO ()
cb
C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationShutdownCallback C_ApplicationActivateCallback
cb' IO (FunPtr C_ApplicationActivateCallback)
-> (FunPtr C_ApplicationActivateCallback
-> IO (GClosure C_ApplicationActivateCallback))
-> IO (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ApplicationActivateCallback
-> IO (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ApplicationShutdownCallback ::
ApplicationShutdownCallback ->
C_ApplicationShutdownCallback
wrap_ApplicationShutdownCallback :: IO () -> C_ApplicationActivateCallback
wrap_ApplicationShutdownCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onApplicationShutdown :: (IsApplication a, MonadIO m) => a -> ApplicationShutdownCallback -> m SignalHandlerId
onApplicationShutdown :: a -> IO () -> m SignalHandlerId
onApplicationShutdown obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationShutdownCallback IO ()
cb
FunPtr C_ApplicationActivateCallback
cb'' <- C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationShutdownCallback C_ApplicationActivateCallback
cb'
a
-> Text
-> FunPtr C_ApplicationActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "shutdown" FunPtr C_ApplicationActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationShutdown :: (IsApplication a, MonadIO m) => a -> ApplicationShutdownCallback -> m SignalHandlerId
afterApplicationShutdown :: a -> IO () -> m SignalHandlerId
afterApplicationShutdown obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationShutdownCallback IO ()
cb
FunPtr C_ApplicationActivateCallback
cb'' <- C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationShutdownCallback C_ApplicationActivateCallback
cb'
a
-> Text
-> FunPtr C_ApplicationActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "shutdown" FunPtr C_ApplicationActivateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationShutdownSignalInfo
instance SignalInfo ApplicationShutdownSignalInfo where
type HaskellCallbackType ApplicationShutdownSignalInfo = ApplicationShutdownCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationShutdownCallback cb
cb'' <- mk_ApplicationShutdownCallback cb'
connectSignalFunPtr obj "shutdown" cb'' connectMode detail
#endif
type ApplicationStartupCallback =
IO ()
noApplicationStartupCallback :: Maybe ApplicationStartupCallback
noApplicationStartupCallback :: Maybe (IO ())
noApplicationStartupCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_ApplicationStartupCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ApplicationStartupCallback :: C_ApplicationStartupCallback -> IO (FunPtr C_ApplicationStartupCallback)
genClosure_ApplicationStartup :: MonadIO m => ApplicationStartupCallback -> m (GClosure C_ApplicationStartupCallback)
genClosure_ApplicationStartup :: IO () -> m (GClosure C_ApplicationActivateCallback)
genClosure_ApplicationStartup cb :: IO ()
cb = IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback))
-> IO (GClosure C_ApplicationActivateCallback)
-> m (GClosure C_ApplicationActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationStartupCallback IO ()
cb
C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationStartupCallback C_ApplicationActivateCallback
cb' IO (FunPtr C_ApplicationActivateCallback)
-> (FunPtr C_ApplicationActivateCallback
-> IO (GClosure C_ApplicationActivateCallback))
-> IO (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ApplicationActivateCallback
-> IO (GClosure C_ApplicationActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ApplicationStartupCallback ::
ApplicationStartupCallback ->
C_ApplicationStartupCallback
wrap_ApplicationStartupCallback :: IO () -> C_ApplicationActivateCallback
wrap_ApplicationStartupCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onApplicationStartup :: (IsApplication a, MonadIO m) => a -> ApplicationStartupCallback -> m SignalHandlerId
onApplicationStartup :: a -> IO () -> m SignalHandlerId
onApplicationStartup obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationStartupCallback IO ()
cb
FunPtr C_ApplicationActivateCallback
cb'' <- C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationStartupCallback C_ApplicationActivateCallback
cb'
a
-> Text
-> FunPtr C_ApplicationActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "startup" FunPtr C_ApplicationActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationStartup :: (IsApplication a, MonadIO m) => a -> ApplicationStartupCallback -> m SignalHandlerId
afterApplicationStartup :: a -> IO () -> m SignalHandlerId
afterApplicationStartup obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ApplicationActivateCallback
cb' = IO () -> C_ApplicationActivateCallback
wrap_ApplicationStartupCallback IO ()
cb
FunPtr C_ApplicationActivateCallback
cb'' <- C_ApplicationActivateCallback
-> IO (FunPtr C_ApplicationActivateCallback)
mk_ApplicationStartupCallback C_ApplicationActivateCallback
cb'
a
-> Text
-> FunPtr C_ApplicationActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "startup" FunPtr C_ApplicationActivateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationStartupSignalInfo
instance SignalInfo ApplicationStartupSignalInfo where
type HaskellCallbackType ApplicationStartupSignalInfo = ApplicationStartupCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationStartupCallback cb
cb'' <- mk_ApplicationStartupCallback cb'
connectSignalFunPtr obj "startup" cb'' connectMode detail
#endif
setApplicationActionGroup :: (MonadIO m, IsApplication o, Gio.ActionGroup.IsActionGroup a) => o -> a -> m ()
setApplicationActionGroup :: o -> a -> m ()
setApplicationActionGroup obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "action-group" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructApplicationActionGroup :: (IsApplication o, Gio.ActionGroup.IsActionGroup a) => a -> IO (GValueConstruct o)
constructApplicationActionGroup :: a -> IO (GValueConstruct o)
constructApplicationActionGroup val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "action-group" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
clearApplicationActionGroup :: (MonadIO m, IsApplication o) => o -> m ()
clearApplicationActionGroup :: o -> m ()
clearApplicationActionGroup obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe ActionGroup -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "action-group" (Maybe ActionGroup
forall a. Maybe a
Nothing :: Maybe Gio.ActionGroup.ActionGroup)
#if defined(ENABLE_OVERLOADING)
data ApplicationActionGroupPropertyInfo
instance AttrInfo ApplicationActionGroupPropertyInfo where
type AttrAllowedOps ApplicationActionGroupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrClear]
type AttrBaseTypeConstraint ApplicationActionGroupPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationActionGroupPropertyInfo = Gio.ActionGroup.IsActionGroup
type AttrTransferTypeConstraint ApplicationActionGroupPropertyInfo = Gio.ActionGroup.IsActionGroup
type AttrTransferType ApplicationActionGroupPropertyInfo = Gio.ActionGroup.ActionGroup
type AttrGetType ApplicationActionGroupPropertyInfo = ()
type AttrLabel ApplicationActionGroupPropertyInfo = "action-group"
type AttrOrigin ApplicationActionGroupPropertyInfo = Application
attrGet = undefined
attrSet = setApplicationActionGroup
attrTransfer _ v = do
unsafeCastTo Gio.ActionGroup.ActionGroup v
attrConstruct = constructApplicationActionGroup
attrClear = clearApplicationActionGroup
#endif
getApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> m T.Text
getApplicationApplicationId :: o -> m Text
getApplicationApplicationId obj :: 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 "getApplicationApplicationId" (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 "application-id"
setApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> T.Text -> m ()
setApplicationApplicationId :: o -> Text -> m ()
setApplicationApplicationId obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "application-id" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructApplicationApplicationId :: (IsApplication o) => T.Text -> IO (GValueConstruct o)
constructApplicationApplicationId :: Text -> IO (GValueConstruct o)
constructApplicationApplicationId val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "application-id" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
clearApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> m ()
clearApplicationApplicationId :: o -> m ()
clearApplicationApplicationId obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "application-id" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data ApplicationApplicationIdPropertyInfo
instance AttrInfo ApplicationApplicationIdPropertyInfo where
type AttrAllowedOps ApplicationApplicationIdPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ApplicationApplicationIdPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationApplicationIdPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ApplicationApplicationIdPropertyInfo = (~) T.Text
type AttrTransferType ApplicationApplicationIdPropertyInfo = T.Text
type AttrGetType ApplicationApplicationIdPropertyInfo = T.Text
type AttrLabel ApplicationApplicationIdPropertyInfo = "application-id"
type AttrOrigin ApplicationApplicationIdPropertyInfo = Application
attrGet = getApplicationApplicationId
attrSet = setApplicationApplicationId
attrTransfer _ v = do
return v
attrConstruct = constructApplicationApplicationId
attrClear = clearApplicationApplicationId
#endif
getApplicationFlags :: (MonadIO m, IsApplication o) => o -> m [Gio.Flags.ApplicationFlags]
getApplicationFlags :: o -> m [ApplicationFlags]
getApplicationFlags obj :: o
obj = IO [ApplicationFlags] -> m [ApplicationFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ApplicationFlags] -> m [ApplicationFlags])
-> IO [ApplicationFlags] -> m [ApplicationFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [ApplicationFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj "flags"
setApplicationFlags :: (MonadIO m, IsApplication o) => o -> [Gio.Flags.ApplicationFlags] -> m ()
setApplicationFlags :: o -> [ApplicationFlags] -> m ()
setApplicationFlags obj :: o
obj val :: [ApplicationFlags]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> [ApplicationFlags] -> IO ()
forall a b.
(IsGFlag b, BoxedFlags b, GObject a) =>
a -> String -> [b] -> IO ()
B.Properties.setObjectPropertyFlags o
obj "flags" [ApplicationFlags]
val
constructApplicationFlags :: (IsApplication o) => [Gio.Flags.ApplicationFlags] -> IO (GValueConstruct o)
constructApplicationFlags :: [ApplicationFlags] -> IO (GValueConstruct o)
constructApplicationFlags val :: [ApplicationFlags]
val = String -> [ApplicationFlags] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags "flags" [ApplicationFlags]
val
#if defined(ENABLE_OVERLOADING)
data ApplicationFlagsPropertyInfo
instance AttrInfo ApplicationFlagsPropertyInfo where
type AttrAllowedOps ApplicationFlagsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ApplicationFlagsPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationFlagsPropertyInfo = (~) [Gio.Flags.ApplicationFlags]
type AttrTransferTypeConstraint ApplicationFlagsPropertyInfo = (~) [Gio.Flags.ApplicationFlags]
type AttrTransferType ApplicationFlagsPropertyInfo = [Gio.Flags.ApplicationFlags]
type AttrGetType ApplicationFlagsPropertyInfo = [Gio.Flags.ApplicationFlags]
type AttrLabel ApplicationFlagsPropertyInfo = "flags"
type AttrOrigin ApplicationFlagsPropertyInfo = Application
attrGet = getApplicationFlags
attrSet = setApplicationFlags
attrTransfer _ v = do
return v
attrConstruct = constructApplicationFlags
attrClear = undefined
#endif
getApplicationInactivityTimeout :: (MonadIO m, IsApplication o) => o -> m Word32
getApplicationInactivityTimeout :: o -> m Word32
getApplicationInactivityTimeout obj :: o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj "inactivity-timeout"
setApplicationInactivityTimeout :: (MonadIO m, IsApplication o) => o -> Word32 -> m ()
setApplicationInactivityTimeout :: o -> Word32 -> m ()
setApplicationInactivityTimeout obj :: o
obj val :: Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj "inactivity-timeout" Word32
val
constructApplicationInactivityTimeout :: (IsApplication o) => Word32 -> IO (GValueConstruct o)
constructApplicationInactivityTimeout :: Word32 -> IO (GValueConstruct o)
constructApplicationInactivityTimeout val :: Word32
val = String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 "inactivity-timeout" Word32
val
#if defined(ENABLE_OVERLOADING)
data ApplicationInactivityTimeoutPropertyInfo
instance AttrInfo ApplicationInactivityTimeoutPropertyInfo where
type AttrAllowedOps ApplicationInactivityTimeoutPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ApplicationInactivityTimeoutPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationInactivityTimeoutPropertyInfo = (~) Word32
type AttrTransferTypeConstraint ApplicationInactivityTimeoutPropertyInfo = (~) Word32
type AttrTransferType ApplicationInactivityTimeoutPropertyInfo = Word32
type AttrGetType ApplicationInactivityTimeoutPropertyInfo = Word32
type AttrLabel ApplicationInactivityTimeoutPropertyInfo = "inactivity-timeout"
type AttrOrigin ApplicationInactivityTimeoutPropertyInfo = Application
attrGet = getApplicationInactivityTimeout
attrSet = setApplicationInactivityTimeout
attrTransfer _ v = do
return v
attrConstruct = constructApplicationInactivityTimeout
attrClear = undefined
#endif
getApplicationIsBusy :: (MonadIO m, IsApplication o) => o -> m Bool
getApplicationIsBusy :: o -> m Bool
getApplicationIsBusy obj :: o
obj = ApplicationNameLostCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ApplicationNameLostCallback -> m Bool)
-> ApplicationNameLostCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> ApplicationNameLostCallback
forall a. GObject a => a -> String -> ApplicationNameLostCallback
B.Properties.getObjectPropertyBool o
obj "is-busy"
#if defined(ENABLE_OVERLOADING)
data ApplicationIsBusyPropertyInfo
instance AttrInfo ApplicationIsBusyPropertyInfo where
type AttrAllowedOps ApplicationIsBusyPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint ApplicationIsBusyPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationIsBusyPropertyInfo = (~) ()
type AttrTransferTypeConstraint ApplicationIsBusyPropertyInfo = (~) ()
type AttrTransferType ApplicationIsBusyPropertyInfo = ()
type AttrGetType ApplicationIsBusyPropertyInfo = Bool
type AttrLabel ApplicationIsBusyPropertyInfo = "is-busy"
type AttrOrigin ApplicationIsBusyPropertyInfo = Application
attrGet = getApplicationIsBusy
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getApplicationIsRegistered :: (MonadIO m, IsApplication o) => o -> m Bool
getApplicationIsRegistered :: o -> m Bool
getApplicationIsRegistered obj :: o
obj = ApplicationNameLostCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ApplicationNameLostCallback -> m Bool)
-> ApplicationNameLostCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> ApplicationNameLostCallback
forall a. GObject a => a -> String -> ApplicationNameLostCallback
B.Properties.getObjectPropertyBool o
obj "is-registered"
#if defined(ENABLE_OVERLOADING)
data ApplicationIsRegisteredPropertyInfo
instance AttrInfo ApplicationIsRegisteredPropertyInfo where
type AttrAllowedOps ApplicationIsRegisteredPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint ApplicationIsRegisteredPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationIsRegisteredPropertyInfo = (~) ()
type AttrTransferTypeConstraint ApplicationIsRegisteredPropertyInfo = (~) ()
type AttrTransferType ApplicationIsRegisteredPropertyInfo = ()
type AttrGetType ApplicationIsRegisteredPropertyInfo = Bool
type AttrLabel ApplicationIsRegisteredPropertyInfo = "is-registered"
type AttrOrigin ApplicationIsRegisteredPropertyInfo = Application
attrGet = getApplicationIsRegistered
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getApplicationIsRemote :: (MonadIO m, IsApplication o) => o -> m Bool
getApplicationIsRemote :: o -> m Bool
getApplicationIsRemote obj :: o
obj = ApplicationNameLostCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ApplicationNameLostCallback -> m Bool)
-> ApplicationNameLostCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> ApplicationNameLostCallback
forall a. GObject a => a -> String -> ApplicationNameLostCallback
B.Properties.getObjectPropertyBool o
obj "is-remote"
#if defined(ENABLE_OVERLOADING)
data ApplicationIsRemotePropertyInfo
instance AttrInfo ApplicationIsRemotePropertyInfo where
type AttrAllowedOps ApplicationIsRemotePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint ApplicationIsRemotePropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationIsRemotePropertyInfo = (~) ()
type AttrTransferTypeConstraint ApplicationIsRemotePropertyInfo = (~) ()
type AttrTransferType ApplicationIsRemotePropertyInfo = ()
type AttrGetType ApplicationIsRemotePropertyInfo = Bool
type AttrLabel ApplicationIsRemotePropertyInfo = "is-remote"
type AttrOrigin ApplicationIsRemotePropertyInfo = Application
attrGet = getApplicationIsRemote
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> m (Maybe T.Text)
getApplicationResourceBasePath :: o -> m (Maybe Text)
getApplicationResourceBasePath obj :: 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 "resource-base-path"
setApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> T.Text -> m ()
setApplicationResourceBasePath :: o -> Text -> m ()
setApplicationResourceBasePath obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "resource-base-path" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructApplicationResourceBasePath :: (IsApplication o) => T.Text -> IO (GValueConstruct o)
constructApplicationResourceBasePath :: Text -> IO (GValueConstruct o)
constructApplicationResourceBasePath val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "resource-base-path" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
clearApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> m ()
clearApplicationResourceBasePath :: o -> m ()
clearApplicationResourceBasePath obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "resource-base-path" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data ApplicationResourceBasePathPropertyInfo
instance AttrInfo ApplicationResourceBasePathPropertyInfo where
type AttrAllowedOps ApplicationResourceBasePathPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ApplicationResourceBasePathPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationResourceBasePathPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ApplicationResourceBasePathPropertyInfo = (~) T.Text
type AttrTransferType ApplicationResourceBasePathPropertyInfo = T.Text
type AttrGetType ApplicationResourceBasePathPropertyInfo = (Maybe T.Text)
type AttrLabel ApplicationResourceBasePathPropertyInfo = "resource-base-path"
type AttrOrigin ApplicationResourceBasePathPropertyInfo = Application
attrGet = getApplicationResourceBasePath
attrSet = setApplicationResourceBasePath
attrTransfer _ v = do
return v
attrConstruct = constructApplicationResourceBasePath
attrClear = clearApplicationResourceBasePath
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Application
type instance O.AttributeList Application = ApplicationAttributeList
type ApplicationAttributeList = ('[ '("actionGroup", ApplicationActionGroupPropertyInfo), '("applicationId", ApplicationApplicationIdPropertyInfo), '("flags", ApplicationFlagsPropertyInfo), '("inactivityTimeout", ApplicationInactivityTimeoutPropertyInfo), '("isBusy", ApplicationIsBusyPropertyInfo), '("isRegistered", ApplicationIsRegisteredPropertyInfo), '("isRemote", ApplicationIsRemotePropertyInfo), '("resourceBasePath", ApplicationResourceBasePathPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
applicationActionGroup :: AttrLabelProxy "actionGroup"
applicationActionGroup = AttrLabelProxy
applicationApplicationId :: AttrLabelProxy "applicationId"
applicationApplicationId = AttrLabelProxy
applicationFlags :: AttrLabelProxy "flags"
applicationFlags = AttrLabelProxy
applicationInactivityTimeout :: AttrLabelProxy "inactivityTimeout"
applicationInactivityTimeout = AttrLabelProxy
applicationIsBusy :: AttrLabelProxy "isBusy"
applicationIsBusy = AttrLabelProxy
applicationIsRegistered :: AttrLabelProxy "isRegistered"
applicationIsRegistered = AttrLabelProxy
applicationIsRemote :: AttrLabelProxy "isRemote"
applicationIsRemote = AttrLabelProxy
applicationResourceBasePath :: AttrLabelProxy "resourceBasePath"
applicationResourceBasePath = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Application = ApplicationSignalList
type ApplicationSignalList = ('[ '("actionAdded", Gio.ActionGroup.ActionGroupActionAddedSignalInfo), '("actionEnabledChanged", Gio.ActionGroup.ActionGroupActionEnabledChangedSignalInfo), '("actionRemoved", Gio.ActionGroup.ActionGroupActionRemovedSignalInfo), '("actionStateChanged", Gio.ActionGroup.ActionGroupActionStateChangedSignalInfo), '("activate", ApplicationActivateSignalInfo), '("commandLine", ApplicationCommandLineSignalInfo), '("handleLocalOptions", ApplicationHandleLocalOptionsSignalInfo), '("nameLost", ApplicationNameLostSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("open", ApplicationOpenSignalInfo), '("shutdown", ApplicationShutdownSignalInfo), '("startup", ApplicationStartupSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_application_new" g_application_new ::
CString ->
CUInt ->
IO (Ptr Application)
applicationNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> [Gio.Flags.ApplicationFlags]
-> m (Maybe Application)
applicationNew :: Maybe Text -> [ApplicationFlags] -> m (Maybe Application)
applicationNew applicationId :: Maybe Text
applicationId flags :: [ApplicationFlags]
flags = IO (Maybe Application) -> m (Maybe Application)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Application) -> m (Maybe Application))
-> IO (Maybe Application) -> m (Maybe Application)
forall a b. (a -> b) -> a -> b
$ do
CString
maybeApplicationId <- case Maybe Text
applicationId of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jApplicationId :: Text
jApplicationId -> do
CString
jApplicationId' <- Text -> IO CString
textToCString Text
jApplicationId
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jApplicationId'
let flags' :: CUInt
flags' = [ApplicationFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ApplicationFlags]
flags
Ptr Application
result <- CString -> CUInt -> IO (Ptr Application)
g_application_new CString
maybeApplicationId CUInt
flags'
Maybe Application
maybeResult <- Ptr Application
-> (Ptr Application -> IO Application) -> IO (Maybe Application)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Application
result ((Ptr Application -> IO Application) -> IO (Maybe Application))
-> (Ptr Application -> IO Application) -> IO (Maybe Application)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Application
result' -> do
Application
result'' <- ((ManagedPtr Application -> Application)
-> Ptr Application -> IO Application
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Application -> Application
Application) Ptr Application
result'
Application -> IO Application
forall (m :: * -> *) a. Monad m => a -> m a
return Application
result''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeApplicationId
Maybe Application -> IO (Maybe Application)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Application
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_application_activate" g_application_activate ::
Ptr Application ->
IO ()
applicationActivate ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m ()
applicationActivate :: a -> m ()
applicationActivate application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> IO ()
g_application_activate Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationActivateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationActivateMethodInfo a signature where
overloadedMethod = applicationActivate
#endif
foreign import ccall "g_application_add_main_option" g_application_add_main_option ::
Ptr Application ->
CString ->
Int8 ->
CUInt ->
CUInt ->
CString ->
CString ->
IO ()
applicationAddMainOption ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> T.Text
-> Int8
-> [GLib.Flags.OptionFlags]
-> GLib.Enums.OptionArg
-> T.Text
-> Maybe (T.Text)
-> m ()
applicationAddMainOption :: a
-> Text
-> Int8
-> [OptionFlags]
-> OptionArg
-> Text
-> Maybe Text
-> m ()
applicationAddMainOption application :: a
application longName :: Text
longName shortName :: Int8
shortName flags :: [OptionFlags]
flags arg :: OptionArg
arg description :: Text
description argDescription :: Maybe Text
argDescription = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
longName' <- Text -> IO CString
textToCString Text
longName
let flags' :: CUInt
flags' = [OptionFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [OptionFlags]
flags
let arg' :: CUInt
arg' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (OptionArg -> Int) -> OptionArg -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. OptionArg -> Int
forall a. Enum a => a -> Int
fromEnum) OptionArg
arg
CString
description' <- Text -> IO CString
textToCString Text
description
CString
maybeArgDescription <- case Maybe Text
argDescription of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jArgDescription :: Text
jArgDescription -> do
CString
jArgDescription' <- Text -> IO CString
textToCString Text
jArgDescription
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jArgDescription'
Ptr Application
-> CString -> Int8 -> CUInt -> CUInt -> CString -> CString -> IO ()
g_application_add_main_option Ptr Application
application' CString
longName' Int8
shortName CUInt
flags' CUInt
arg' CString
description' CString
maybeArgDescription
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
longName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
description'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeArgDescription
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationAddMainOptionMethodInfo
instance (signature ~ (T.Text -> Int8 -> [GLib.Flags.OptionFlags] -> GLib.Enums.OptionArg -> T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationAddMainOptionMethodInfo a signature where
overloadedMethod = applicationAddMainOption
#endif
foreign import ccall "g_application_add_main_option_entries" g_application_add_main_option_entries ::
Ptr Application ->
Ptr (Ptr GLib.OptionEntry.OptionEntry) ->
IO ()
applicationAddMainOptionEntries ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> [GLib.OptionEntry.OptionEntry]
-> m ()
applicationAddMainOptionEntries :: a -> [OptionEntry] -> m ()
applicationAddMainOptionEntries application :: a
application entries :: [OptionEntry]
entries = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
[Ptr OptionEntry]
entries' <- (OptionEntry -> IO (Ptr OptionEntry))
-> [OptionEntry] -> IO [Ptr OptionEntry]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM OptionEntry -> IO (Ptr OptionEntry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [OptionEntry]
entries
Ptr (Ptr OptionEntry)
entries'' <- [Ptr OptionEntry] -> IO (Ptr (Ptr OptionEntry))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packZeroTerminatedPtrArray [Ptr OptionEntry]
entries'
Ptr Application -> Ptr (Ptr OptionEntry) -> IO ()
g_application_add_main_option_entries Ptr Application
application' Ptr (Ptr OptionEntry)
entries''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
(OptionEntry -> IO ()) -> [OptionEntry] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ OptionEntry -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [OptionEntry]
entries
Ptr (Ptr OptionEntry) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr OptionEntry)
entries''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationAddMainOptionEntriesMethodInfo
instance (signature ~ ([GLib.OptionEntry.OptionEntry] -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationAddMainOptionEntriesMethodInfo a signature where
overloadedMethod = applicationAddMainOptionEntries
#endif
foreign import ccall "g_application_add_option_group" g_application_add_option_group ::
Ptr Application ->
Ptr GLib.OptionGroup.OptionGroup ->
IO ()
applicationAddOptionGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> GLib.OptionGroup.OptionGroup
-> m ()
applicationAddOptionGroup :: a -> OptionGroup -> m ()
applicationAddOptionGroup application :: a
application group :: OptionGroup
group = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr OptionGroup
group' <- OptionGroup -> IO (Ptr OptionGroup)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed OptionGroup
group
Ptr Application -> Ptr OptionGroup -> IO ()
g_application_add_option_group Ptr Application
application' Ptr OptionGroup
group'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
OptionGroup -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr OptionGroup
group
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationAddOptionGroupMethodInfo
instance (signature ~ (GLib.OptionGroup.OptionGroup -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationAddOptionGroupMethodInfo a signature where
overloadedMethod = applicationAddOptionGroup
#endif
foreign import ccall "g_application_bind_busy_property" g_application_bind_busy_property ::
Ptr Application ->
Ptr GObject.Object.Object ->
CString ->
IO ()
applicationBindBusyProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> m ()
applicationBindBusyProperty :: a -> b -> Text -> m ()
applicationBindBusyProperty application :: a
application object :: b
object property :: Text
property = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
property' <- Text -> IO CString
textToCString Text
property
Ptr Application -> Ptr Object -> CString -> IO ()
g_application_bind_busy_property Ptr Application
application' Ptr Object
object' CString
property'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
property'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationBindBusyPropertyMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsApplication a, GObject.Object.IsObject b) => O.MethodInfo ApplicationBindBusyPropertyMethodInfo a signature where
overloadedMethod = applicationBindBusyProperty
#endif
foreign import ccall "g_application_get_application_id" g_application_get_application_id ::
Ptr Application ->
IO CString
applicationGetApplicationId ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m T.Text
applicationGetApplicationId :: a -> m Text
applicationGetApplicationId application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
result <- Ptr Application -> IO CString
g_application_get_application_id Ptr Application
application'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "applicationGetApplicationId" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetApplicationIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetApplicationIdMethodInfo a signature where
overloadedMethod = applicationGetApplicationId
#endif
foreign import ccall "g_application_get_dbus_connection" g_application_get_dbus_connection ::
Ptr Application ->
IO (Ptr Gio.DBusConnection.DBusConnection)
applicationGetDbusConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m Gio.DBusConnection.DBusConnection
applicationGetDbusConnection :: a -> m DBusConnection
applicationGetDbusConnection application :: a
application = IO DBusConnection -> m DBusConnection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusConnection -> m DBusConnection)
-> IO DBusConnection -> m DBusConnection
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr DBusConnection
result <- Ptr Application -> IO (Ptr DBusConnection)
g_application_get_dbus_connection Ptr Application
application'
Text -> Ptr DBusConnection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "applicationGetDbusConnection" Ptr DBusConnection
result
DBusConnection
result' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
DBusConnection -> IO DBusConnection
forall (m :: * -> *) a. Monad m => a -> m a
return DBusConnection
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetDbusConnectionMethodInfo
instance (signature ~ (m Gio.DBusConnection.DBusConnection), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetDbusConnectionMethodInfo a signature where
overloadedMethod = applicationGetDbusConnection
#endif
foreign import ccall "g_application_get_dbus_object_path" g_application_get_dbus_object_path ::
Ptr Application ->
IO CString
applicationGetDbusObjectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m T.Text
applicationGetDbusObjectPath :: a -> m Text
applicationGetDbusObjectPath application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
result <- Ptr Application -> IO CString
g_application_get_dbus_object_path Ptr Application
application'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "applicationGetDbusObjectPath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetDbusObjectPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetDbusObjectPathMethodInfo a signature where
overloadedMethod = applicationGetDbusObjectPath
#endif
foreign import ccall "g_application_get_flags" g_application_get_flags ::
Ptr Application ->
IO CUInt
applicationGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m [Gio.Flags.ApplicationFlags]
applicationGetFlags :: a -> m [ApplicationFlags]
applicationGetFlags application :: a
application = IO [ApplicationFlags] -> m [ApplicationFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ApplicationFlags] -> m [ApplicationFlags])
-> IO [ApplicationFlags] -> m [ApplicationFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CUInt
result <- Ptr Application -> IO CUInt
g_application_get_flags Ptr Application
application'
let result' :: [ApplicationFlags]
result' = CUInt -> [ApplicationFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
[ApplicationFlags] -> IO [ApplicationFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [ApplicationFlags]
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetFlagsMethodInfo
instance (signature ~ (m [Gio.Flags.ApplicationFlags]), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetFlagsMethodInfo a signature where
overloadedMethod = applicationGetFlags
#endif
foreign import ccall "g_application_get_inactivity_timeout" g_application_get_inactivity_timeout ::
Ptr Application ->
IO Word32
applicationGetInactivityTimeout ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m Word32
applicationGetInactivityTimeout :: a -> m Word32
applicationGetInactivityTimeout application :: a
application = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Word32
result <- Ptr Application -> IO Word32
g_application_get_inactivity_timeout Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data ApplicationGetInactivityTimeoutMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetInactivityTimeoutMethodInfo a signature where
overloadedMethod = applicationGetInactivityTimeout
#endif
foreign import ccall "g_application_get_is_busy" g_application_get_is_busy ::
Ptr Application ->
IO CInt
applicationGetIsBusy ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m Bool
applicationGetIsBusy :: a -> m Bool
applicationGetIsBusy application :: a
application = ApplicationNameLostCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ApplicationNameLostCallback -> m Bool)
-> ApplicationNameLostCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CInt
result <- Ptr Application -> IO CInt
g_application_get_is_busy Ptr Application
application'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Bool -> ApplicationNameLostCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetIsBusyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetIsBusyMethodInfo a signature where
overloadedMethod = applicationGetIsBusy
#endif
foreign import ccall "g_application_get_is_registered" g_application_get_is_registered ::
Ptr Application ->
IO CInt
applicationGetIsRegistered ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m Bool
applicationGetIsRegistered :: a -> m Bool
applicationGetIsRegistered application :: a
application = ApplicationNameLostCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ApplicationNameLostCallback -> m Bool)
-> ApplicationNameLostCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CInt
result <- Ptr Application -> IO CInt
g_application_get_is_registered Ptr Application
application'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Bool -> ApplicationNameLostCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetIsRegisteredMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetIsRegisteredMethodInfo a signature where
overloadedMethod = applicationGetIsRegistered
#endif
foreign import ccall "g_application_get_is_remote" g_application_get_is_remote ::
Ptr Application ->
IO CInt
applicationGetIsRemote ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m Bool
applicationGetIsRemote :: a -> m Bool
applicationGetIsRemote application :: a
application = ApplicationNameLostCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ApplicationNameLostCallback -> m Bool)
-> ApplicationNameLostCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CInt
result <- Ptr Application -> IO CInt
g_application_get_is_remote Ptr Application
application'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Bool -> ApplicationNameLostCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetIsRemoteMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetIsRemoteMethodInfo a signature where
overloadedMethod = applicationGetIsRemote
#endif
foreign import ccall "g_application_get_resource_base_path" g_application_get_resource_base_path ::
Ptr Application ->
IO CString
applicationGetResourceBasePath ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m (Maybe T.Text)
applicationGetResourceBasePath :: a -> m (Maybe Text)
applicationGetResourceBasePath application :: a
application = 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
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
result <- Ptr Application -> IO CString
g_application_get_resource_base_path Ptr Application
application'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data ApplicationGetResourceBasePathMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsApplication a) => O.MethodInfo ApplicationGetResourceBasePathMethodInfo a signature where
overloadedMethod = applicationGetResourceBasePath
#endif
foreign import ccall "g_application_hold" g_application_hold ::
Ptr Application ->
IO ()
applicationHold ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m ()
applicationHold :: a -> m ()
applicationHold application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> IO ()
g_application_hold Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationHoldMethodInfo
instance (signature ~ (m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationHoldMethodInfo a signature where
overloadedMethod = applicationHold
#endif
foreign import ccall "g_application_mark_busy" g_application_mark_busy ::
Ptr Application ->
IO ()
applicationMarkBusy ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m ()
applicationMarkBusy :: a -> m ()
applicationMarkBusy application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> IO ()
g_application_mark_busy Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationMarkBusyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationMarkBusyMethodInfo a signature where
overloadedMethod = applicationMarkBusy
#endif
foreign import ccall "g_application_open" g_application_open ::
Ptr Application ->
Ptr (Ptr Gio.File.File) ->
Int32 ->
CString ->
IO ()
applicationOpen ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> [Gio.File.File]
-> T.Text
-> m ()
applicationOpen :: a -> [File] -> Text -> m ()
applicationOpen application :: a
application files :: [File]
files hint :: Text
hint = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let nFiles :: Int32
nFiles = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [File] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [File]
files
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
[Ptr File]
files' <- (File -> IO (Ptr File)) -> [File] -> IO [Ptr File]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM File -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [File]
files
Ptr (Ptr File)
files'' <- [Ptr File] -> IO (Ptr (Ptr File))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr File]
files'
CString
hint' <- Text -> IO CString
textToCString Text
hint
Ptr Application -> Ptr (Ptr File) -> Int32 -> CString -> IO ()
g_application_open Ptr Application
application' Ptr (Ptr File)
files'' Int32
nFiles CString
hint'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
(File -> IO ()) -> [File] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ File -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [File]
files
Ptr (Ptr File) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr File)
files''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
hint'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationOpenMethodInfo
instance (signature ~ ([Gio.File.File] -> T.Text -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationOpenMethodInfo a signature where
overloadedMethod = applicationOpen
#endif
foreign import ccall "g_application_quit" g_application_quit ::
Ptr Application ->
IO ()
applicationQuit ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m ()
applicationQuit :: a -> m ()
applicationQuit application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> IO ()
g_application_quit Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationQuitMethodInfo
instance (signature ~ (m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationQuitMethodInfo a signature where
overloadedMethod = applicationQuit
#endif
foreign import ccall "g_application_register" g_application_register ::
Ptr Application ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
applicationRegister ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
applicationRegister :: a -> Maybe b -> m ()
applicationRegister application :: a
application cancellable :: Maybe b
cancellable = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Application -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
g_application_register Ptr Application
application' Ptr Cancellable
maybeCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data ApplicationRegisterMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsApplication a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ApplicationRegisterMethodInfo a signature where
overloadedMethod = applicationRegister
#endif
foreign import ccall "g_application_release" g_application_release ::
Ptr Application ->
IO ()
applicationRelease ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m ()
applicationRelease :: a -> m ()
applicationRelease application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> IO ()
g_application_release Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationReleaseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationReleaseMethodInfo a signature where
overloadedMethod = applicationRelease
#endif
foreign import ccall "g_application_run" g_application_run ::
Ptr Application ->
Int32 ->
Ptr CString ->
IO Int32
applicationRun ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Maybe ([[Char]])
-> m Int32
applicationRun :: a -> Maybe [String] -> m Int32
applicationRun application :: a
application argv :: Maybe [String]
argv = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
let argc :: Int32
argc = case Maybe [String]
argv of
Nothing -> 0
Just jArgv :: [String]
jArgv -> Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [String] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [String]
jArgv
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr CString
maybeArgv <- case Maybe [String]
argv of
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just jArgv :: [String]
jArgv -> do
Ptr CString
jArgv' <- [String] -> IO (Ptr CString)
packFileNameArray [String]
jArgv
Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jArgv'
Int32
result <- Ptr Application -> Int32 -> Ptr CString -> IO Int32
g_application_run Ptr Application
application' Int32
argc Ptr CString
maybeArgv
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
(Int32 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Int32
argc) CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeArgv
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeArgv
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data ApplicationRunMethodInfo
instance (signature ~ (Maybe ([[Char]]) -> m Int32), MonadIO m, IsApplication a) => O.MethodInfo ApplicationRunMethodInfo a signature where
overloadedMethod = applicationRun
#endif
foreign import ccall "g_application_send_notification" g_application_send_notification ::
Ptr Application ->
CString ->
Ptr Gio.Notification.Notification ->
IO ()
applicationSendNotification ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, Gio.Notification.IsNotification b) =>
a
-> Maybe (T.Text)
-> b
-> m ()
applicationSendNotification :: a -> Maybe Text -> b -> m ()
applicationSendNotification application :: a
application id :: Maybe Text
id notification :: b
notification = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
maybeId <- case Maybe Text
id of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jId :: Text
jId -> do
CString
jId' <- Text -> IO CString
textToCString Text
jId
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jId'
Ptr Notification
notification' <- b -> IO (Ptr Notification)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
notification
Ptr Application -> CString -> Ptr Notification -> IO ()
g_application_send_notification Ptr Application
application' CString
maybeId Ptr Notification
notification'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
notification
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeId
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSendNotificationMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> m ()), MonadIO m, IsApplication a, Gio.Notification.IsNotification b) => O.MethodInfo ApplicationSendNotificationMethodInfo a signature where
overloadedMethod = applicationSendNotification
#endif
foreign import ccall "g_application_set_action_group" g_application_set_action_group ::
Ptr Application ->
Ptr Gio.ActionGroup.ActionGroup ->
IO ()
{-# DEPRECATED applicationSetActionGroup ["(Since version 2.32)","Use the t'GI.Gio.Interfaces.ActionMap.ActionMap' interface instead. Never ever","mix use of this API with use of t'GI.Gio.Interfaces.ActionMap.ActionMap' on the same /@application@/","or things will go very badly wrong. This function is known to","introduce buggy behaviour (ie: signals not emitted on changes to the","action group), so you should really use t'GI.Gio.Interfaces.ActionMap.ActionMap' instead."] #-}
applicationSetActionGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, Gio.ActionGroup.IsActionGroup b) =>
a
-> Maybe (b)
-> m ()
applicationSetActionGroup :: a -> Maybe b -> m ()
applicationSetActionGroup application :: a
application actionGroup :: Maybe b
actionGroup = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr ActionGroup
maybeActionGroup <- case Maybe b
actionGroup of
Nothing -> Ptr ActionGroup -> IO (Ptr ActionGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ActionGroup
forall a. Ptr a
nullPtr
Just jActionGroup :: b
jActionGroup -> do
Ptr ActionGroup
jActionGroup' <- b -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jActionGroup
Ptr ActionGroup -> IO (Ptr ActionGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ActionGroup
jActionGroup'
Ptr Application -> Ptr ActionGroup -> IO ()
g_application_set_action_group Ptr Application
application' Ptr ActionGroup
maybeActionGroup
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
actionGroup b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetActionGroupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsApplication a, Gio.ActionGroup.IsActionGroup b) => O.MethodInfo ApplicationSetActionGroupMethodInfo a signature where
overloadedMethod = applicationSetActionGroup
#endif
foreign import ccall "g_application_set_application_id" g_application_set_application_id ::
Ptr Application ->
CString ->
IO ()
applicationSetApplicationId ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Maybe (T.Text)
-> m ()
applicationSetApplicationId :: a -> Maybe Text -> m ()
applicationSetApplicationId application :: a
application applicationId :: Maybe Text
applicationId = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
maybeApplicationId <- case Maybe Text
applicationId of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jApplicationId :: Text
jApplicationId -> do
CString
jApplicationId' <- Text -> IO CString
textToCString Text
jApplicationId
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jApplicationId'
Ptr Application -> CString -> IO ()
g_application_set_application_id Ptr Application
application' CString
maybeApplicationId
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeApplicationId
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetApplicationIdMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetApplicationIdMethodInfo a signature where
overloadedMethod = applicationSetApplicationId
#endif
foreign import ccall "g_application_set_default" g_application_set_default ::
Ptr Application ->
IO ()
applicationSetDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m ()
applicationSetDefault :: a -> m ()
applicationSetDefault application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> IO ()
g_application_set_default Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetDefaultMethodInfo
instance (signature ~ (m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetDefaultMethodInfo a signature where
overloadedMethod = applicationSetDefault
#endif
foreign import ccall "g_application_set_flags" g_application_set_flags ::
Ptr Application ->
CUInt ->
IO ()
applicationSetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> [Gio.Flags.ApplicationFlags]
-> m ()
applicationSetFlags :: a -> [ApplicationFlags] -> m ()
applicationSetFlags application :: a
application flags :: [ApplicationFlags]
flags = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
let flags' :: CUInt
flags' = [ApplicationFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ApplicationFlags]
flags
Ptr Application -> CUInt -> IO ()
g_application_set_flags Ptr Application
application' CUInt
flags'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetFlagsMethodInfo
instance (signature ~ ([Gio.Flags.ApplicationFlags] -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetFlagsMethodInfo a signature where
overloadedMethod = applicationSetFlags
#endif
foreign import ccall "g_application_set_inactivity_timeout" g_application_set_inactivity_timeout ::
Ptr Application ->
Word32 ->
IO ()
applicationSetInactivityTimeout ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Word32
-> m ()
applicationSetInactivityTimeout :: a -> Word32 -> m ()
applicationSetInactivityTimeout application :: a
application inactivityTimeout :: Word32
inactivityTimeout = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> Word32 -> IO ()
g_application_set_inactivity_timeout Ptr Application
application' Word32
inactivityTimeout
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetInactivityTimeoutMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetInactivityTimeoutMethodInfo a signature where
overloadedMethod = applicationSetInactivityTimeout
#endif
foreign import ccall "g_application_set_option_context_description" g_application_set_option_context_description ::
Ptr Application ->
CString ->
IO ()
applicationSetOptionContextDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Maybe (T.Text)
-> m ()
applicationSetOptionContextDescription :: a -> Maybe Text -> m ()
applicationSetOptionContextDescription application :: a
application description :: Maybe Text
description = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
maybeDescription <- case Maybe Text
description of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jDescription :: Text
jDescription -> do
CString
jDescription' <- Text -> IO CString
textToCString Text
jDescription
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jDescription'
Ptr Application -> CString -> IO ()
g_application_set_option_context_description Ptr Application
application' CString
maybeDescription
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeDescription
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetOptionContextDescriptionMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetOptionContextDescriptionMethodInfo a signature where
overloadedMethod = applicationSetOptionContextDescription
#endif
foreign import ccall "g_application_set_option_context_parameter_string" g_application_set_option_context_parameter_string ::
Ptr Application ->
CString ->
IO ()
applicationSetOptionContextParameterString ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Maybe (T.Text)
-> m ()
applicationSetOptionContextParameterString :: a -> Maybe Text -> m ()
applicationSetOptionContextParameterString application :: a
application parameterString :: Maybe Text
parameterString = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
maybeParameterString <- case Maybe Text
parameterString of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jParameterString :: Text
jParameterString -> do
CString
jParameterString' <- Text -> IO CString
textToCString Text
jParameterString
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jParameterString'
Ptr Application -> CString -> IO ()
g_application_set_option_context_parameter_string Ptr Application
application' CString
maybeParameterString
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeParameterString
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetOptionContextParameterStringMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetOptionContextParameterStringMethodInfo a signature where
overloadedMethod = applicationSetOptionContextParameterString
#endif
foreign import ccall "g_application_set_option_context_summary" g_application_set_option_context_summary ::
Ptr Application ->
CString ->
IO ()
applicationSetOptionContextSummary ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Maybe (T.Text)
-> m ()
applicationSetOptionContextSummary :: a -> Maybe Text -> m ()
applicationSetOptionContextSummary application :: a
application summary :: Maybe Text
summary = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
maybeSummary <- case Maybe Text
summary of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jSummary :: Text
jSummary -> do
CString
jSummary' <- Text -> IO CString
textToCString Text
jSummary
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jSummary'
Ptr Application -> CString -> IO ()
g_application_set_option_context_summary Ptr Application
application' CString
maybeSummary
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeSummary
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetOptionContextSummaryMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetOptionContextSummaryMethodInfo a signature where
overloadedMethod = applicationSetOptionContextSummary
#endif
foreign import ccall "g_application_set_resource_base_path" g_application_set_resource_base_path ::
Ptr Application ->
CString ->
IO ()
applicationSetResourceBasePath ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Maybe (T.Text)
-> m ()
applicationSetResourceBasePath :: a -> Maybe Text -> m ()
applicationSetResourceBasePath application :: a
application resourcePath :: Maybe Text
resourcePath = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
maybeResourcePath <- case Maybe Text
resourcePath of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jResourcePath :: Text
jResourcePath -> do
CString
jResourcePath' <- Text -> IO CString
textToCString Text
jResourcePath
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jResourcePath'
Ptr Application -> CString -> IO ()
g_application_set_resource_base_path Ptr Application
application' CString
maybeResourcePath
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeResourcePath
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetResourceBasePathMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationSetResourceBasePathMethodInfo a signature where
overloadedMethod = applicationSetResourceBasePath
#endif
foreign import ccall "g_application_unbind_busy_property" g_application_unbind_busy_property ::
Ptr Application ->
Ptr GObject.Object.Object ->
CString ->
IO ()
applicationUnbindBusyProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, GObject.Object.IsObject b) =>
a
-> b
-> T.Text
-> m ()
applicationUnbindBusyProperty :: a -> b -> Text -> m ()
applicationUnbindBusyProperty application :: a
application object :: b
object property :: Text
property = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CString
property' <- Text -> IO CString
textToCString Text
property
Ptr Application -> Ptr Object -> CString -> IO ()
g_application_unbind_busy_property Ptr Application
application' Ptr Object
object' CString
property'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
property'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationUnbindBusyPropertyMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsApplication a, GObject.Object.IsObject b) => O.MethodInfo ApplicationUnbindBusyPropertyMethodInfo a signature where
overloadedMethod = applicationUnbindBusyProperty
#endif
foreign import ccall "g_application_unmark_busy" g_application_unmark_busy ::
Ptr Application ->
IO ()
applicationUnmarkBusy ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m ()
applicationUnmarkBusy :: a -> m ()
applicationUnmarkBusy application :: a
application = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> IO ()
g_application_unmark_busy Ptr Application
application'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationUnmarkBusyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationUnmarkBusyMethodInfo a signature where
overloadedMethod = applicationUnmarkBusy
#endif
foreign import ccall "g_application_withdraw_notification" g_application_withdraw_notification ::
Ptr Application ->
CString ->
IO ()
applicationWithdrawNotification ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> T.Text
-> m ()
applicationWithdrawNotification :: a -> Text -> m ()
applicationWithdrawNotification application :: a
application id :: Text
id = 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 Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
CString
id' <- Text -> IO CString
textToCString Text
id
Ptr Application -> CString -> IO ()
g_application_withdraw_notification Ptr Application
application' CString
id'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
id'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationWithdrawNotificationMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsApplication a) => O.MethodInfo ApplicationWithdrawNotificationMethodInfo a signature where
overloadedMethod = applicationWithdrawNotification
#endif
foreign import ccall "g_application_get_default" g_application_get_default ::
IO (Ptr Application)
applicationGetDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Application
applicationGetDefault :: m Application
applicationGetDefault = IO Application -> m Application
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Application -> m Application)
-> IO Application -> m Application
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
result <- IO (Ptr Application)
g_application_get_default
Text -> Ptr Application -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "applicationGetDefault" Ptr Application
result
Application
result' <- ((ManagedPtr Application -> Application)
-> Ptr Application -> IO Application
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Application -> Application
Application) Ptr Application
result
Application -> IO Application
forall (m :: * -> *) a. Monad m => a -> m a
return Application
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_application_id_is_valid" g_application_id_is_valid ::
CString ->
IO CInt
applicationIdIsValid ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Bool
applicationIdIsValid :: Text -> m Bool
applicationIdIsValid applicationId :: Text
applicationId = ApplicationNameLostCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ApplicationNameLostCallback -> m Bool)
-> ApplicationNameLostCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CString
applicationId' <- Text -> IO CString
textToCString Text
applicationId
CInt
result <- CString -> IO CInt
g_application_id_is_valid CString
applicationId'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
applicationId'
Bool -> ApplicationNameLostCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
#endif