{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.AppLaunchContext
(
AppLaunchContext(..) ,
IsAppLaunchContext ,
toAppLaunchContext ,
#if defined(ENABLE_OVERLOADING)
ResolveAppLaunchContextMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AppLaunchContextGetDisplayMethodInfo ,
#endif
appLaunchContextGetDisplay ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextGetEnvironmentMethodInfo,
#endif
appLaunchContextGetEnvironment ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextGetStartupNotifyIdMethodInfo,
#endif
appLaunchContextGetStartupNotifyId ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextLaunchFailedMethodInfo ,
#endif
appLaunchContextLaunchFailed ,
appLaunchContextNew ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextSetenvMethodInfo ,
#endif
appLaunchContextSetenv ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextUnsetenvMethodInfo ,
#endif
appLaunchContextUnsetenv ,
AppLaunchContextLaunchFailedCallback ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextLaunchFailedSignalInfo ,
#endif
afterAppLaunchContextLaunchFailed ,
onAppLaunchContextLaunchFailed ,
AppLaunchContextLaunchStartedCallback ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextLaunchStartedSignalInfo ,
#endif
afterAppLaunchContextLaunchStarted ,
onAppLaunchContextLaunchStarted ,
AppLaunchContextLaunchedCallback ,
#if defined(ENABLE_OVERLOADING)
AppLaunchContextLaunchedSignalInfo ,
#endif
afterAppLaunchContextLaunched ,
onAppLaunchContextLaunched ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
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 GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AppInfo as Gio.AppInfo
import {-# SOURCE #-} qualified GI.Gio.Interfaces.File as Gio.File
newtype AppLaunchContext = AppLaunchContext (SP.ManagedPtr AppLaunchContext)
deriving (AppLaunchContext -> AppLaunchContext -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AppLaunchContext -> AppLaunchContext -> Bool
$c/= :: AppLaunchContext -> AppLaunchContext -> Bool
== :: AppLaunchContext -> AppLaunchContext -> Bool
$c== :: AppLaunchContext -> AppLaunchContext -> Bool
Eq)
instance SP.ManagedPtrNewtype AppLaunchContext where
toManagedPtr :: AppLaunchContext -> ManagedPtr AppLaunchContext
toManagedPtr (AppLaunchContext ManagedPtr AppLaunchContext
p) = ManagedPtr AppLaunchContext
p
foreign import ccall "g_app_launch_context_get_type"
c_g_app_launch_context_get_type :: IO B.Types.GType
instance B.Types.TypedObject AppLaunchContext where
glibType :: IO GType
glibType = IO GType
c_g_app_launch_context_get_type
instance B.Types.GObject AppLaunchContext
class (SP.GObject o, O.IsDescendantOf AppLaunchContext o) => IsAppLaunchContext o
instance (SP.GObject o, O.IsDescendantOf AppLaunchContext o) => IsAppLaunchContext o
instance O.HasParentTypes AppLaunchContext
type instance O.ParentTypes AppLaunchContext = '[GObject.Object.Object]
toAppLaunchContext :: (MIO.MonadIO m, IsAppLaunchContext o) => o -> m AppLaunchContext
toAppLaunchContext :: forall (m :: * -> *) o.
(MonadIO m, IsAppLaunchContext o) =>
o -> m AppLaunchContext
toAppLaunchContext = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr AppLaunchContext -> AppLaunchContext
AppLaunchContext
instance B.GValue.IsGValue (Maybe AppLaunchContext) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_app_launch_context_get_type
gvalueSet_ :: Ptr GValue -> Maybe AppLaunchContext -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AppLaunchContext
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr AppLaunchContext)
gvalueSet_ Ptr GValue
gv (P.Just AppLaunchContext
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AppLaunchContext
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe AppLaunchContext)
gvalueGet_ Ptr GValue
gv = do
Ptr AppLaunchContext
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AppLaunchContext)
if Ptr AppLaunchContext
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AppLaunchContext -> AppLaunchContext
AppLaunchContext Ptr AppLaunchContext
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAppLaunchContextMethod (t :: Symbol) (o :: *) :: * where
ResolveAppLaunchContextMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAppLaunchContextMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAppLaunchContextMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAppLaunchContextMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAppLaunchContextMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAppLaunchContextMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAppLaunchContextMethod "launchFailed" o = AppLaunchContextLaunchFailedMethodInfo
ResolveAppLaunchContextMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAppLaunchContextMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAppLaunchContextMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAppLaunchContextMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAppLaunchContextMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAppLaunchContextMethod "setenv" o = AppLaunchContextSetenvMethodInfo
ResolveAppLaunchContextMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAppLaunchContextMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAppLaunchContextMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAppLaunchContextMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAppLaunchContextMethod "unsetenv" o = AppLaunchContextUnsetenvMethodInfo
ResolveAppLaunchContextMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAppLaunchContextMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAppLaunchContextMethod "getDisplay" o = AppLaunchContextGetDisplayMethodInfo
ResolveAppLaunchContextMethod "getEnvironment" o = AppLaunchContextGetEnvironmentMethodInfo
ResolveAppLaunchContextMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAppLaunchContextMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAppLaunchContextMethod "getStartupNotifyId" o = AppLaunchContextGetStartupNotifyIdMethodInfo
ResolveAppLaunchContextMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAppLaunchContextMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAppLaunchContextMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAppLaunchContextMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAppLaunchContextMethod t AppLaunchContext, O.OverloadedMethod info AppLaunchContext p) => OL.IsLabel t (AppLaunchContext -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveAppLaunchContextMethod t AppLaunchContext, O.OverloadedMethod info AppLaunchContext p, R.HasField t AppLaunchContext p) => R.HasField t AppLaunchContext p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAppLaunchContextMethod t AppLaunchContext, O.OverloadedMethodInfo info AppLaunchContext) => OL.IsLabel t (O.MethodProxy info AppLaunchContext) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type AppLaunchContextLaunchFailedCallback =
T.Text
-> IO ()
type C_AppLaunchContextLaunchFailedCallback =
Ptr AppLaunchContext ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_AppLaunchContextLaunchFailedCallback :: C_AppLaunchContextLaunchFailedCallback -> IO (FunPtr C_AppLaunchContextLaunchFailedCallback)
wrap_AppLaunchContextLaunchFailedCallback ::
GObject a => (a -> AppLaunchContextLaunchFailedCallback) ->
C_AppLaunchContextLaunchFailedCallback
wrap_AppLaunchContextLaunchFailedCallback :: forall a.
GObject a =>
(a -> AppLaunchContextLaunchFailedCallback)
-> C_AppLaunchContextLaunchFailedCallback
wrap_AppLaunchContextLaunchFailedCallback a -> AppLaunchContextLaunchFailedCallback
gi'cb Ptr AppLaunchContext
gi'selfPtr CString
startupNotifyId Ptr ()
_ = do
Text
startupNotifyId' <- HasCallStack => CString -> IO Text
cstringToText CString
startupNotifyId
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr AppLaunchContext
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \AppLaunchContext
gi'self -> a -> AppLaunchContextLaunchFailedCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce AppLaunchContext
gi'self) Text
startupNotifyId'
onAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchFailedCallback) -> m SignalHandlerId
onAppLaunchContextLaunchFailed :: forall a (m :: * -> *).
(IsAppLaunchContext a, MonadIO m) =>
a
-> ((?self::a) => AppLaunchContextLaunchFailedCallback)
-> m SignalHandlerId
onAppLaunchContextLaunchFailed a
obj (?self::a) => AppLaunchContextLaunchFailedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> AppLaunchContextLaunchFailedCallback
wrapped a
self = let ?self = a
self in (?self::a) => AppLaunchContextLaunchFailedCallback
cb
let wrapped' :: C_AppLaunchContextLaunchFailedCallback
wrapped' = forall a.
GObject a =>
(a -> AppLaunchContextLaunchFailedCallback)
-> C_AppLaunchContextLaunchFailedCallback
wrap_AppLaunchContextLaunchFailedCallback a -> AppLaunchContextLaunchFailedCallback
wrapped
FunPtr C_AppLaunchContextLaunchFailedCallback
wrapped'' <- C_AppLaunchContextLaunchFailedCallback
-> IO (FunPtr C_AppLaunchContextLaunchFailedCallback)
mk_AppLaunchContextLaunchFailedCallback C_AppLaunchContextLaunchFailedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"launch-failed" FunPtr C_AppLaunchContextLaunchFailedCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing
afterAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchFailedCallback) -> m SignalHandlerId
afterAppLaunchContextLaunchFailed :: forall a (m :: * -> *).
(IsAppLaunchContext a, MonadIO m) =>
a
-> ((?self::a) => AppLaunchContextLaunchFailedCallback)
-> m SignalHandlerId
afterAppLaunchContextLaunchFailed a
obj (?self::a) => AppLaunchContextLaunchFailedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> AppLaunchContextLaunchFailedCallback
wrapped a
self = let ?self = a
self in (?self::a) => AppLaunchContextLaunchFailedCallback
cb
let wrapped' :: C_AppLaunchContextLaunchFailedCallback
wrapped' = forall a.
GObject a =>
(a -> AppLaunchContextLaunchFailedCallback)
-> C_AppLaunchContextLaunchFailedCallback
wrap_AppLaunchContextLaunchFailedCallback a -> AppLaunchContextLaunchFailedCallback
wrapped
FunPtr C_AppLaunchContextLaunchFailedCallback
wrapped'' <- C_AppLaunchContextLaunchFailedCallback
-> IO (FunPtr C_AppLaunchContextLaunchFailedCallback)
mk_AppLaunchContextLaunchFailedCallback C_AppLaunchContextLaunchFailedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"launch-failed" FunPtr C_AppLaunchContextLaunchFailedCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextLaunchFailedSignalInfo
instance SignalInfo AppLaunchContextLaunchFailedSignalInfo where
type HaskellCallbackType AppLaunchContextLaunchFailedSignalInfo = AppLaunchContextLaunchFailedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_AppLaunchContextLaunchFailedCallback cb
cb'' <- mk_AppLaunchContextLaunchFailedCallback cb'
connectSignalFunPtr obj "launch-failed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext::launch-failed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#g:signal:launchFailed"})
#endif
type AppLaunchContextLaunchStartedCallback =
Gio.AppInfo.AppInfo
-> Maybe GVariant
-> IO ()
type C_AppLaunchContextLaunchStartedCallback =
Ptr AppLaunchContext ->
Ptr Gio.AppInfo.AppInfo ->
Ptr GVariant ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_AppLaunchContextLaunchStartedCallback :: C_AppLaunchContextLaunchStartedCallback -> IO (FunPtr C_AppLaunchContextLaunchStartedCallback)
wrap_AppLaunchContextLaunchStartedCallback ::
GObject a => (a -> AppLaunchContextLaunchStartedCallback) ->
C_AppLaunchContextLaunchStartedCallback
wrap_AppLaunchContextLaunchStartedCallback :: forall a.
GObject a =>
(a -> AppLaunchContextLaunchStartedCallback)
-> C_AppLaunchContextLaunchStartedCallback
wrap_AppLaunchContextLaunchStartedCallback a -> AppLaunchContextLaunchStartedCallback
gi'cb Ptr AppLaunchContext
gi'selfPtr Ptr AppInfo
info Ptr GVariant
platformData Ptr ()
_ = do
AppInfo
info' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AppInfo -> AppInfo
Gio.AppInfo.AppInfo) Ptr AppInfo
info
Maybe GVariant
maybePlatformData <-
if Ptr GVariant
platformData forall a. Eq a => a -> a -> Bool
== forall a. Ptr a
nullPtr
then forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
Nothing
else do
GVariant
platformData' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
platformData
forall (m :: * -> *) a. Monad m => a -> m a
return forall a b. (a -> b) -> a -> b
$ forall a. a -> Maybe a
Just GVariant
platformData'
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr AppLaunchContext
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \AppLaunchContext
gi'self -> a -> AppLaunchContextLaunchStartedCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce AppLaunchContext
gi'self) AppInfo
info' Maybe GVariant
maybePlatformData
onAppLaunchContextLaunchStarted :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchStartedCallback) -> m SignalHandlerId
onAppLaunchContextLaunchStarted :: forall a (m :: * -> *).
(IsAppLaunchContext a, MonadIO m) =>
a
-> ((?self::a) => AppLaunchContextLaunchStartedCallback)
-> m SignalHandlerId
onAppLaunchContextLaunchStarted a
obj (?self::a) => AppLaunchContextLaunchStartedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> AppLaunchContextLaunchStartedCallback
wrapped a
self = let ?self = a
self in (?self::a) => AppLaunchContextLaunchStartedCallback
cb
let wrapped' :: C_AppLaunchContextLaunchStartedCallback
wrapped' = forall a.
GObject a =>
(a -> AppLaunchContextLaunchStartedCallback)
-> C_AppLaunchContextLaunchStartedCallback
wrap_AppLaunchContextLaunchStartedCallback a -> AppLaunchContextLaunchStartedCallback
wrapped
FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' <- C_AppLaunchContextLaunchStartedCallback
-> IO (FunPtr C_AppLaunchContextLaunchStartedCallback)
mk_AppLaunchContextLaunchStartedCallback C_AppLaunchContextLaunchStartedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"launch-started" FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing
afterAppLaunchContextLaunchStarted :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchStartedCallback) -> m SignalHandlerId
afterAppLaunchContextLaunchStarted :: forall a (m :: * -> *).
(IsAppLaunchContext a, MonadIO m) =>
a
-> ((?self::a) => AppLaunchContextLaunchStartedCallback)
-> m SignalHandlerId
afterAppLaunchContextLaunchStarted a
obj (?self::a) => AppLaunchContextLaunchStartedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> AppLaunchContextLaunchStartedCallback
wrapped a
self = let ?self = a
self in (?self::a) => AppLaunchContextLaunchStartedCallback
cb
let wrapped' :: C_AppLaunchContextLaunchStartedCallback
wrapped' = forall a.
GObject a =>
(a -> AppLaunchContextLaunchStartedCallback)
-> C_AppLaunchContextLaunchStartedCallback
wrap_AppLaunchContextLaunchStartedCallback a -> AppLaunchContextLaunchStartedCallback
wrapped
FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' <- C_AppLaunchContextLaunchStartedCallback
-> IO (FunPtr C_AppLaunchContextLaunchStartedCallback)
mk_AppLaunchContextLaunchStartedCallback C_AppLaunchContextLaunchStartedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"launch-started" FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextLaunchStartedSignalInfo
instance SignalInfo AppLaunchContextLaunchStartedSignalInfo where
type HaskellCallbackType AppLaunchContextLaunchStartedSignalInfo = AppLaunchContextLaunchStartedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_AppLaunchContextLaunchStartedCallback cb
cb'' <- mk_AppLaunchContextLaunchStartedCallback cb'
connectSignalFunPtr obj "launch-started" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext::launch-started"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#g:signal:launchStarted"})
#endif
type AppLaunchContextLaunchedCallback =
Gio.AppInfo.AppInfo
-> GVariant
-> IO ()
type C_AppLaunchContextLaunchedCallback =
Ptr AppLaunchContext ->
Ptr Gio.AppInfo.AppInfo ->
Ptr GVariant ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_AppLaunchContextLaunchedCallback :: C_AppLaunchContextLaunchedCallback -> IO (FunPtr C_AppLaunchContextLaunchedCallback)
wrap_AppLaunchContextLaunchedCallback ::
GObject a => (a -> AppLaunchContextLaunchedCallback) ->
C_AppLaunchContextLaunchedCallback
wrap_AppLaunchContextLaunchedCallback :: forall a.
GObject a =>
(a -> AppLaunchContextLaunchedCallback)
-> C_AppLaunchContextLaunchStartedCallback
wrap_AppLaunchContextLaunchedCallback a -> AppLaunchContextLaunchedCallback
gi'cb Ptr AppLaunchContext
gi'selfPtr Ptr AppInfo
info Ptr GVariant
platformData Ptr ()
_ = do
AppInfo
info' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AppInfo -> AppInfo
Gio.AppInfo.AppInfo) Ptr AppInfo
info
GVariant
platformData' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
platformData
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr AppLaunchContext
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \AppLaunchContext
gi'self -> a -> AppLaunchContextLaunchedCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce AppLaunchContext
gi'self) AppInfo
info' GVariant
platformData'
onAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchedCallback) -> m SignalHandlerId
onAppLaunchContextLaunched :: forall a (m :: * -> *).
(IsAppLaunchContext a, MonadIO m) =>
a
-> ((?self::a) => AppLaunchContextLaunchedCallback)
-> m SignalHandlerId
onAppLaunchContextLaunched a
obj (?self::a) => AppLaunchContextLaunchedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> AppLaunchContextLaunchedCallback
wrapped a
self = let ?self = a
self in (?self::a) => AppLaunchContextLaunchedCallback
cb
let wrapped' :: C_AppLaunchContextLaunchStartedCallback
wrapped' = forall a.
GObject a =>
(a -> AppLaunchContextLaunchedCallback)
-> C_AppLaunchContextLaunchStartedCallback
wrap_AppLaunchContextLaunchedCallback a -> AppLaunchContextLaunchedCallback
wrapped
FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' <- C_AppLaunchContextLaunchStartedCallback
-> IO (FunPtr C_AppLaunchContextLaunchStartedCallback)
mk_AppLaunchContextLaunchedCallback C_AppLaunchContextLaunchStartedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"launched" FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing
afterAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchedCallback) -> m SignalHandlerId
afterAppLaunchContextLaunched :: forall a (m :: * -> *).
(IsAppLaunchContext a, MonadIO m) =>
a
-> ((?self::a) => AppLaunchContextLaunchedCallback)
-> m SignalHandlerId
afterAppLaunchContextLaunched a
obj (?self::a) => AppLaunchContextLaunchedCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> AppLaunchContextLaunchedCallback
wrapped a
self = let ?self = a
self in (?self::a) => AppLaunchContextLaunchedCallback
cb
let wrapped' :: C_AppLaunchContextLaunchStartedCallback
wrapped' = forall a.
GObject a =>
(a -> AppLaunchContextLaunchedCallback)
-> C_AppLaunchContextLaunchStartedCallback
wrap_AppLaunchContextLaunchedCallback a -> AppLaunchContextLaunchedCallback
wrapped
FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' <- C_AppLaunchContextLaunchStartedCallback
-> IO (FunPtr C_AppLaunchContextLaunchStartedCallback)
mk_AppLaunchContextLaunchedCallback C_AppLaunchContextLaunchStartedCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"launched" FunPtr C_AppLaunchContextLaunchStartedCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextLaunchedSignalInfo
instance SignalInfo AppLaunchContextLaunchedSignalInfo where
type HaskellCallbackType AppLaunchContextLaunchedSignalInfo = AppLaunchContextLaunchedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_AppLaunchContextLaunchedCallback cb
cb'' <- mk_AppLaunchContextLaunchedCallback cb'
connectSignalFunPtr obj "launched" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext::launched"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#g:signal:launched"})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AppLaunchContext
type instance O.AttributeList AppLaunchContext = AppLaunchContextAttributeList
type AppLaunchContextAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AppLaunchContext = AppLaunchContextSignalList
type AppLaunchContextSignalList = ('[ '("launchFailed", AppLaunchContextLaunchFailedSignalInfo), '("launchStarted", AppLaunchContextLaunchStartedSignalInfo), '("launched", AppLaunchContextLaunchedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_app_launch_context_new" g_app_launch_context_new ::
IO (Ptr AppLaunchContext)
appLaunchContextNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m AppLaunchContext
appLaunchContextNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
m AppLaunchContext
appLaunchContextNew = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AppLaunchContext
result <- IO (Ptr AppLaunchContext)
g_app_launch_context_new
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"appLaunchContextNew" Ptr AppLaunchContext
result
AppLaunchContext
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr AppLaunchContext -> AppLaunchContext
AppLaunchContext) Ptr AppLaunchContext
result
forall (m :: * -> *) a. Monad m => a -> m a
return AppLaunchContext
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_app_launch_context_get_display" g_app_launch_context_get_display ::
Ptr AppLaunchContext ->
Ptr Gio.AppInfo.AppInfo ->
Ptr (GList (Ptr Gio.File.File)) ->
IO CString
appLaunchContextGetDisplay ::
(B.CallStack.HasCallStack, MonadIO m, IsAppLaunchContext a, Gio.AppInfo.IsAppInfo b, Gio.File.IsFile c) =>
a
-> b
-> [c]
-> m (Maybe T.Text)
appLaunchContextGetDisplay :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b,
IsFile c) =>
a -> b -> [c] -> m (Maybe Text)
appLaunchContextGetDisplay a
context b
info [c]
files = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AppLaunchContext
context' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr AppInfo
info' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
info
[Ptr File]
files' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [c]
files
Ptr (GList (Ptr File))
files'' <- forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr File]
files'
CString
result <- Ptr AppLaunchContext
-> Ptr AppInfo -> Ptr (GList (Ptr File)) -> IO CString
g_app_launch_context_get_display Ptr AppLaunchContext
context' Ptr AppInfo
info' Ptr (GList (Ptr File))
files''
Maybe Text
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
cstringToText CString
result'
forall a. Ptr a -> IO ()
freeMem CString
result'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
info
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [c]
files
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr File))
files''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextGetDisplayMethodInfo
instance (signature ~ (b -> [c] -> m (Maybe T.Text)), MonadIO m, IsAppLaunchContext a, Gio.AppInfo.IsAppInfo b, Gio.File.IsFile c) => O.OverloadedMethod AppLaunchContextGetDisplayMethodInfo a signature where
overloadedMethod = appLaunchContextGetDisplay
instance O.OverloadedMethodInfo AppLaunchContextGetDisplayMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext.appLaunchContextGetDisplay",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#v:appLaunchContextGetDisplay"
})
#endif
foreign import ccall "g_app_launch_context_get_environment" g_app_launch_context_get_environment ::
Ptr AppLaunchContext ->
IO (Ptr CString)
appLaunchContextGetEnvironment ::
(B.CallStack.HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a
-> m [[Char]]
appLaunchContextGetEnvironment :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a -> m [[Char]]
appLaunchContextGetEnvironment a
context = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AppLaunchContext
context' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr CString
result <- Ptr AppLaunchContext -> IO (Ptr CString)
g_app_launch_context_get_environment Ptr AppLaunchContext
context'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"appLaunchContextGetEnvironment" Ptr CString
result
[[Char]]
result' <- HasCallStack => Ptr CString -> IO [[Char]]
unpackZeroTerminatedFileNameArray Ptr CString
result
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
result
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
forall (m :: * -> *) a. Monad m => a -> m a
return [[Char]]
result'
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextGetEnvironmentMethodInfo
instance (signature ~ (m [[Char]]), MonadIO m, IsAppLaunchContext a) => O.OverloadedMethod AppLaunchContextGetEnvironmentMethodInfo a signature where
overloadedMethod = appLaunchContextGetEnvironment
instance O.OverloadedMethodInfo AppLaunchContextGetEnvironmentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext.appLaunchContextGetEnvironment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#v:appLaunchContextGetEnvironment"
})
#endif
foreign import ccall "g_app_launch_context_get_startup_notify_id" g_app_launch_context_get_startup_notify_id ::
Ptr AppLaunchContext ->
Ptr Gio.AppInfo.AppInfo ->
Ptr (GList (Ptr Gio.File.File)) ->
IO CString
appLaunchContextGetStartupNotifyId ::
(B.CallStack.HasCallStack, MonadIO m, IsAppLaunchContext a, Gio.AppInfo.IsAppInfo b, Gio.File.IsFile c) =>
a
-> b
-> [c]
-> m (Maybe T.Text)
appLaunchContextGetStartupNotifyId :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b,
IsFile c) =>
a -> b -> [c] -> m (Maybe Text)
appLaunchContextGetStartupNotifyId a
context b
info [c]
files = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AppLaunchContext
context' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr AppInfo
info' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
info
[Ptr File]
files' <- forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [c]
files
Ptr (GList (Ptr File))
files'' <- forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr File]
files'
CString
result <- Ptr AppLaunchContext
-> Ptr AppInfo -> Ptr (GList (Ptr File)) -> IO CString
g_app_launch_context_get_startup_notify_id Ptr AppLaunchContext
context' Ptr AppInfo
info' Ptr (GList (Ptr File))
files''
Maybe Text
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
cstringToText CString
result'
forall a. Ptr a -> IO ()
freeMem CString
result'
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
info
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [c]
files
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr File))
files''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextGetStartupNotifyIdMethodInfo
instance (signature ~ (b -> [c] -> m (Maybe T.Text)), MonadIO m, IsAppLaunchContext a, Gio.AppInfo.IsAppInfo b, Gio.File.IsFile c) => O.OverloadedMethod AppLaunchContextGetStartupNotifyIdMethodInfo a signature where
overloadedMethod = appLaunchContextGetStartupNotifyId
instance O.OverloadedMethodInfo AppLaunchContextGetStartupNotifyIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext.appLaunchContextGetStartupNotifyId",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#v:appLaunchContextGetStartupNotifyId"
})
#endif
foreign import ccall "g_app_launch_context_launch_failed" g_app_launch_context_launch_failed ::
Ptr AppLaunchContext ->
CString ->
IO ()
appLaunchContextLaunchFailed ::
(B.CallStack.HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a
-> T.Text
-> m ()
appLaunchContextLaunchFailed :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a -> Text -> m ()
appLaunchContextLaunchFailed a
context Text
startupNotifyId = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AppLaunchContext
context' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
startupNotifyId' <- Text -> IO CString
textToCString Text
startupNotifyId
Ptr AppLaunchContext -> CString -> IO ()
g_app_launch_context_launch_failed Ptr AppLaunchContext
context' CString
startupNotifyId'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
forall a. Ptr a -> IO ()
freeMem CString
startupNotifyId'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextLaunchFailedMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAppLaunchContext a) => O.OverloadedMethod AppLaunchContextLaunchFailedMethodInfo a signature where
overloadedMethod = appLaunchContextLaunchFailed
instance O.OverloadedMethodInfo AppLaunchContextLaunchFailedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext.appLaunchContextLaunchFailed",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#v:appLaunchContextLaunchFailed"
})
#endif
foreign import ccall "g_app_launch_context_setenv" g_app_launch_context_setenv ::
Ptr AppLaunchContext ->
CString ->
CString ->
IO ()
appLaunchContextSetenv ::
(B.CallStack.HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a
-> [Char]
-> [Char]
-> m ()
appLaunchContextSetenv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a -> [Char] -> [Char] -> m ()
appLaunchContextSetenv a
context [Char]
variable [Char]
value = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AppLaunchContext
context' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
variable' <- [Char] -> IO CString
stringToCString [Char]
variable
CString
value' <- [Char] -> IO CString
stringToCString [Char]
value
Ptr AppLaunchContext -> CString -> CString -> IO ()
g_app_launch_context_setenv Ptr AppLaunchContext
context' CString
variable' CString
value'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
forall a. Ptr a -> IO ()
freeMem CString
variable'
forall a. Ptr a -> IO ()
freeMem CString
value'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextSetenvMethodInfo
instance (signature ~ ([Char] -> [Char] -> m ()), MonadIO m, IsAppLaunchContext a) => O.OverloadedMethod AppLaunchContextSetenvMethodInfo a signature where
overloadedMethod = appLaunchContextSetenv
instance O.OverloadedMethodInfo AppLaunchContextSetenvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext.appLaunchContextSetenv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#v:appLaunchContextSetenv"
})
#endif
foreign import ccall "g_app_launch_context_unsetenv" g_app_launch_context_unsetenv ::
Ptr AppLaunchContext ->
CString ->
IO ()
appLaunchContextUnsetenv ::
(B.CallStack.HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a
-> [Char]
-> m ()
appLaunchContextUnsetenv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppLaunchContext a) =>
a -> [Char] -> m ()
appLaunchContextUnsetenv a
context [Char]
variable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr AppLaunchContext
context' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
variable' <- [Char] -> IO CString
stringToCString [Char]
variable
Ptr AppLaunchContext -> CString -> IO ()
g_app_launch_context_unsetenv Ptr AppLaunchContext
context' CString
variable'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
forall a. Ptr a -> IO ()
freeMem CString
variable'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AppLaunchContextUnsetenvMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsAppLaunchContext a) => O.OverloadedMethod AppLaunchContextUnsetenvMethodInfo a signature where
overloadedMethod = appLaunchContextUnsetenv
instance O.OverloadedMethodInfo AppLaunchContextUnsetenvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.AppLaunchContext.appLaunchContextUnsetenv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-AppLaunchContext.html#v:appLaunchContextUnsetenv"
})
#endif