{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.SubprocessLauncher
(
SubprocessLauncher(..) ,
IsSubprocessLauncher ,
toSubprocessLauncher ,
#if defined(ENABLE_OVERLOADING)
ResolveSubprocessLauncherMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherCloseMethodInfo ,
#endif
subprocessLauncherClose ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherGetenvMethodInfo ,
#endif
subprocessLauncherGetenv ,
subprocessLauncherNew ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSetCwdMethodInfo ,
#endif
subprocessLauncherSetCwd ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSetEnvironMethodInfo ,
#endif
subprocessLauncherSetEnviron ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSetFlagsMethodInfo ,
#endif
subprocessLauncherSetFlags ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSetStderrFilePathMethodInfo,
#endif
subprocessLauncherSetStderrFilePath ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSetStdinFilePathMethodInfo,
#endif
subprocessLauncherSetStdinFilePath ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSetStdoutFilePathMethodInfo,
#endif
subprocessLauncherSetStdoutFilePath ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSetenvMethodInfo ,
#endif
subprocessLauncherSetenv ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherSpawnvMethodInfo ,
#endif
subprocessLauncherSpawnv ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherTakeFdMethodInfo ,
#endif
subprocessLauncherTakeFd ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherTakeStderrFdMethodInfo,
#endif
subprocessLauncherTakeStderrFd ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherTakeStdinFdMethodInfo ,
#endif
subprocessLauncherTakeStdinFd ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherTakeStdoutFdMethodInfo,
#endif
subprocessLauncherTakeStdoutFd ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherUnsetenvMethodInfo ,
#endif
subprocessLauncherUnsetenv ,
#if defined(ENABLE_OVERLOADING)
SubprocessLauncherFlagsPropertyInfo ,
#endif
constructSubprocessLauncherFlags ,
#if defined(ENABLE_OVERLOADING)
subprocessLauncherFlags ,
#endif
) 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.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Objects.Subprocess as Gio.Subprocess
newtype SubprocessLauncher = SubprocessLauncher (SP.ManagedPtr SubprocessLauncher)
deriving (SubprocessLauncher -> SubprocessLauncher -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubprocessLauncher -> SubprocessLauncher -> Bool
$c/= :: SubprocessLauncher -> SubprocessLauncher -> Bool
== :: SubprocessLauncher -> SubprocessLauncher -> Bool
$c== :: SubprocessLauncher -> SubprocessLauncher -> Bool
Eq)
instance SP.ManagedPtrNewtype SubprocessLauncher where
toManagedPtr :: SubprocessLauncher -> ManagedPtr SubprocessLauncher
toManagedPtr (SubprocessLauncher ManagedPtr SubprocessLauncher
p) = ManagedPtr SubprocessLauncher
p
foreign import ccall "g_subprocess_launcher_get_type"
c_g_subprocess_launcher_get_type :: IO B.Types.GType
instance B.Types.TypedObject SubprocessLauncher where
glibType :: IO GType
glibType = IO GType
c_g_subprocess_launcher_get_type
instance B.Types.GObject SubprocessLauncher
class (SP.GObject o, O.IsDescendantOf SubprocessLauncher o) => IsSubprocessLauncher o
instance (SP.GObject o, O.IsDescendantOf SubprocessLauncher o) => IsSubprocessLauncher o
instance O.HasParentTypes SubprocessLauncher
type instance O.ParentTypes SubprocessLauncher = '[GObject.Object.Object]
toSubprocessLauncher :: (MIO.MonadIO m, IsSubprocessLauncher o) => o -> m SubprocessLauncher
toSubprocessLauncher :: forall (m :: * -> *) o.
(MonadIO m, IsSubprocessLauncher o) =>
o -> m SubprocessLauncher
toSubprocessLauncher = 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 SubprocessLauncher -> SubprocessLauncher
SubprocessLauncher
instance B.GValue.IsGValue (Maybe SubprocessLauncher) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_subprocess_launcher_get_type
gvalueSet_ :: Ptr GValue -> Maybe SubprocessLauncher -> IO ()
gvalueSet_ Ptr GValue
gv Maybe SubprocessLauncher
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 SubprocessLauncher)
gvalueSet_ Ptr GValue
gv (P.Just SubprocessLauncher
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SubprocessLauncher
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe SubprocessLauncher)
gvalueGet_ Ptr GValue
gv = do
Ptr SubprocessLauncher
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr SubprocessLauncher)
if Ptr SubprocessLauncher
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 SubprocessLauncher -> SubprocessLauncher
SubprocessLauncher Ptr SubprocessLauncher
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSubprocessLauncherMethod (t :: Symbol) (o :: *) :: * where
ResolveSubprocessLauncherMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSubprocessLauncherMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSubprocessLauncherMethod "close" o = SubprocessLauncherCloseMethodInfo
ResolveSubprocessLauncherMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSubprocessLauncherMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSubprocessLauncherMethod "getenv" o = SubprocessLauncherGetenvMethodInfo
ResolveSubprocessLauncherMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSubprocessLauncherMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSubprocessLauncherMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSubprocessLauncherMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSubprocessLauncherMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSubprocessLauncherMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSubprocessLauncherMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSubprocessLauncherMethod "setenv" o = SubprocessLauncherSetenvMethodInfo
ResolveSubprocessLauncherMethod "spawnv" o = SubprocessLauncherSpawnvMethodInfo
ResolveSubprocessLauncherMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSubprocessLauncherMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSubprocessLauncherMethod "takeFd" o = SubprocessLauncherTakeFdMethodInfo
ResolveSubprocessLauncherMethod "takeStderrFd" o = SubprocessLauncherTakeStderrFdMethodInfo
ResolveSubprocessLauncherMethod "takeStdinFd" o = SubprocessLauncherTakeStdinFdMethodInfo
ResolveSubprocessLauncherMethod "takeStdoutFd" o = SubprocessLauncherTakeStdoutFdMethodInfo
ResolveSubprocessLauncherMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSubprocessLauncherMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSubprocessLauncherMethod "unsetenv" o = SubprocessLauncherUnsetenvMethodInfo
ResolveSubprocessLauncherMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSubprocessLauncherMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSubprocessLauncherMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSubprocessLauncherMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSubprocessLauncherMethod "setCwd" o = SubprocessLauncherSetCwdMethodInfo
ResolveSubprocessLauncherMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSubprocessLauncherMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSubprocessLauncherMethod "setEnviron" o = SubprocessLauncherSetEnvironMethodInfo
ResolveSubprocessLauncherMethod "setFlags" o = SubprocessLauncherSetFlagsMethodInfo
ResolveSubprocessLauncherMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSubprocessLauncherMethod "setStderrFilePath" o = SubprocessLauncherSetStderrFilePathMethodInfo
ResolveSubprocessLauncherMethod "setStdinFilePath" o = SubprocessLauncherSetStdinFilePathMethodInfo
ResolveSubprocessLauncherMethod "setStdoutFilePath" o = SubprocessLauncherSetStdoutFilePathMethodInfo
ResolveSubprocessLauncherMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSubprocessLauncherMethod t SubprocessLauncher, O.OverloadedMethod info SubprocessLauncher p) => OL.IsLabel t (SubprocessLauncher -> 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 ~ ResolveSubprocessLauncherMethod t SubprocessLauncher, O.OverloadedMethod info SubprocessLauncher p, R.HasField t SubprocessLauncher p) => R.HasField t SubprocessLauncher p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSubprocessLauncherMethod t SubprocessLauncher, O.OverloadedMethodInfo info SubprocessLauncher) => OL.IsLabel t (O.MethodProxy info SubprocessLauncher) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
constructSubprocessLauncherFlags :: (IsSubprocessLauncher o, MIO.MonadIO m) => [Gio.Flags.SubprocessFlags] -> m (GValueConstruct o)
constructSubprocessLauncherFlags :: forall o (m :: * -> *).
(IsSubprocessLauncher o, MonadIO m) =>
[SubprocessFlags] -> m (GValueConstruct o)
constructSubprocessLauncherFlags [SubprocessFlags]
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"flags" [SubprocessFlags]
val
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherFlagsPropertyInfo
instance AttrInfo SubprocessLauncherFlagsPropertyInfo where
type AttrAllowedOps SubprocessLauncherFlagsPropertyInfo = '[ 'AttrConstruct]
type AttrBaseTypeConstraint SubprocessLauncherFlagsPropertyInfo = IsSubprocessLauncher
type AttrSetTypeConstraint SubprocessLauncherFlagsPropertyInfo = (~) [Gio.Flags.SubprocessFlags]
type AttrTransferTypeConstraint SubprocessLauncherFlagsPropertyInfo = (~) [Gio.Flags.SubprocessFlags]
type AttrTransferType SubprocessLauncherFlagsPropertyInfo = [Gio.Flags.SubprocessFlags]
type AttrGetType SubprocessLauncherFlagsPropertyInfo = ()
type AttrLabel SubprocessLauncherFlagsPropertyInfo = "flags"
type AttrOrigin SubprocessLauncherFlagsPropertyInfo = SubprocessLauncher
attrGet = undefined
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructSubprocessLauncherFlags
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.flags"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#g:attr:flags"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SubprocessLauncher
type instance O.AttributeList SubprocessLauncher = SubprocessLauncherAttributeList
type SubprocessLauncherAttributeList = ('[ '("flags", SubprocessLauncherFlagsPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
subprocessLauncherFlags :: AttrLabelProxy "flags"
subprocessLauncherFlags = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SubprocessLauncher = SubprocessLauncherSignalList
type SubprocessLauncherSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_subprocess_launcher_new" g_subprocess_launcher_new ::
CUInt ->
IO (Ptr SubprocessLauncher)
subprocessLauncherNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
[Gio.Flags.SubprocessFlags]
-> m SubprocessLauncher
subprocessLauncherNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[SubprocessFlags] -> m SubprocessLauncher
subprocessLauncherNew [SubprocessFlags]
flags = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SubprocessFlags]
flags
Ptr SubprocessLauncher
result <- CUInt -> IO (Ptr SubprocessLauncher)
g_subprocess_launcher_new CUInt
flags'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"subprocessLauncherNew" Ptr SubprocessLauncher
result
SubprocessLauncher
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SubprocessLauncher -> SubprocessLauncher
SubprocessLauncher) Ptr SubprocessLauncher
result
forall (m :: * -> *) a. Monad m => a -> m a
return SubprocessLauncher
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_subprocess_launcher_close" g_subprocess_launcher_close ::
Ptr SubprocessLauncher ->
IO ()
subprocessLauncherClose ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> m ()
subprocessLauncherClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> m ()
subprocessLauncherClose a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SubprocessLauncher -> IO ()
g_subprocess_launcher_close Ptr SubprocessLauncher
self'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherCloseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherCloseMethodInfo a signature where
overloadedMethod = subprocessLauncherClose
instance O.OverloadedMethodInfo SubprocessLauncherCloseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherClose",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherClose"
})
#endif
foreign import ccall "g_subprocess_launcher_getenv" g_subprocess_launcher_getenv ::
Ptr SubprocessLauncher ->
CString ->
IO CString
subprocessLauncherGetenv ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> [Char]
-> m (Maybe [Char])
subprocessLauncherGetenv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> String -> m (Maybe String)
subprocessLauncherGetenv a
self String
variable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
variable' <- String -> IO CString
stringToCString String
variable
CString
result <- Ptr SubprocessLauncher -> CString -> IO CString
g_subprocess_launcher_getenv Ptr SubprocessLauncher
self' CString
variable'
Maybe String
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
String
result'' <- HasCallStack => CString -> IO String
cstringToString CString
result'
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
variable'
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe String
maybeResult
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherGetenvMethodInfo
instance (signature ~ ([Char] -> m (Maybe [Char])), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherGetenvMethodInfo a signature where
overloadedMethod = subprocessLauncherGetenv
instance O.OverloadedMethodInfo SubprocessLauncherGetenvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherGetenv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherGetenv"
})
#endif
foreign import ccall "g_subprocess_launcher_set_cwd" g_subprocess_launcher_set_cwd ::
Ptr SubprocessLauncher ->
CString ->
IO ()
subprocessLauncherSetCwd ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> [Char]
-> m ()
subprocessLauncherSetCwd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> String -> m ()
subprocessLauncherSetCwd a
self String
cwd = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
cwd' <- String -> IO CString
stringToCString String
cwd
Ptr SubprocessLauncher -> CString -> IO ()
g_subprocess_launcher_set_cwd Ptr SubprocessLauncher
self' CString
cwd'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
cwd'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSetCwdMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSetCwdMethodInfo a signature where
overloadedMethod = subprocessLauncherSetCwd
instance O.OverloadedMethodInfo SubprocessLauncherSetCwdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSetCwd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSetCwd"
})
#endif
foreign import ccall "g_subprocess_launcher_set_environ" g_subprocess_launcher_set_environ ::
Ptr SubprocessLauncher ->
Ptr CString ->
IO ()
subprocessLauncherSetEnviron ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> [[Char]]
-> m ()
subprocessLauncherSetEnviron :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> [String] -> m ()
subprocessLauncherSetEnviron a
self [String]
env = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CString
env' <- [String] -> IO (Ptr CString)
packZeroTerminatedFileNameArray [String]
env
Ptr SubprocessLauncher -> Ptr CString -> IO ()
g_subprocess_launcher_set_environ Ptr SubprocessLauncher
self' Ptr CString
env'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
env'
forall a. Ptr a -> IO ()
freeMem Ptr CString
env'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSetEnvironMethodInfo
instance (signature ~ ([[Char]] -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSetEnvironMethodInfo a signature where
overloadedMethod = subprocessLauncherSetEnviron
instance O.OverloadedMethodInfo SubprocessLauncherSetEnvironMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSetEnviron",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSetEnviron"
})
#endif
foreign import ccall "g_subprocess_launcher_set_flags" g_subprocess_launcher_set_flags ::
Ptr SubprocessLauncher ->
CUInt ->
IO ()
subprocessLauncherSetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> [Gio.Flags.SubprocessFlags]
-> m ()
subprocessLauncherSetFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> [SubprocessFlags] -> m ()
subprocessLauncherSetFlags a
self [SubprocessFlags]
flags = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SubprocessFlags]
flags
Ptr SubprocessLauncher -> CUInt -> IO ()
g_subprocess_launcher_set_flags Ptr SubprocessLauncher
self' CUInt
flags'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSetFlagsMethodInfo
instance (signature ~ ([Gio.Flags.SubprocessFlags] -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSetFlagsMethodInfo a signature where
overloadedMethod = subprocessLauncherSetFlags
instance O.OverloadedMethodInfo SubprocessLauncherSetFlagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSetFlags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSetFlags"
})
#endif
foreign import ccall "g_subprocess_launcher_set_stderr_file_path" g_subprocess_launcher_set_stderr_file_path ::
Ptr SubprocessLauncher ->
CString ->
IO ()
subprocessLauncherSetStderrFilePath ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> Maybe ([Char])
-> m ()
subprocessLauncherSetStderrFilePath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Maybe String -> m ()
subprocessLauncherSetStderrFilePath a
self Maybe String
path = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybePath <- case Maybe String
path of
Maybe String
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just String
jPath -> do
CString
jPath' <- String -> IO CString
stringToCString String
jPath
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPath'
Ptr SubprocessLauncher -> CString -> IO ()
g_subprocess_launcher_set_stderr_file_path Ptr SubprocessLauncher
self' CString
maybePath
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
maybePath
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSetStderrFilePathMethodInfo
instance (signature ~ (Maybe ([Char]) -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSetStderrFilePathMethodInfo a signature where
overloadedMethod = subprocessLauncherSetStderrFilePath
instance O.OverloadedMethodInfo SubprocessLauncherSetStderrFilePathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSetStderrFilePath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSetStderrFilePath"
})
#endif
foreign import ccall "g_subprocess_launcher_set_stdin_file_path" g_subprocess_launcher_set_stdin_file_path ::
Ptr SubprocessLauncher ->
CString ->
IO ()
subprocessLauncherSetStdinFilePath ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> T.Text
-> m ()
subprocessLauncherSetStdinFilePath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Text -> m ()
subprocessLauncherSetStdinFilePath a
self Text
path = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr SubprocessLauncher -> CString -> IO ()
g_subprocess_launcher_set_stdin_file_path Ptr SubprocessLauncher
self' CString
path'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
path'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSetStdinFilePathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSetStdinFilePathMethodInfo a signature where
overloadedMethod = subprocessLauncherSetStdinFilePath
instance O.OverloadedMethodInfo SubprocessLauncherSetStdinFilePathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSetStdinFilePath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSetStdinFilePath"
})
#endif
foreign import ccall "g_subprocess_launcher_set_stdout_file_path" g_subprocess_launcher_set_stdout_file_path ::
Ptr SubprocessLauncher ->
CString ->
IO ()
subprocessLauncherSetStdoutFilePath ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> Maybe ([Char])
-> m ()
subprocessLauncherSetStdoutFilePath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Maybe String -> m ()
subprocessLauncherSetStdoutFilePath a
self Maybe String
path = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybePath <- case Maybe String
path of
Maybe String
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just String
jPath -> do
CString
jPath' <- String -> IO CString
stringToCString String
jPath
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPath'
Ptr SubprocessLauncher -> CString -> IO ()
g_subprocess_launcher_set_stdout_file_path Ptr SubprocessLauncher
self' CString
maybePath
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
maybePath
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSetStdoutFilePathMethodInfo
instance (signature ~ (Maybe ([Char]) -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSetStdoutFilePathMethodInfo a signature where
overloadedMethod = subprocessLauncherSetStdoutFilePath
instance O.OverloadedMethodInfo SubprocessLauncherSetStdoutFilePathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSetStdoutFilePath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSetStdoutFilePath"
})
#endif
foreign import ccall "g_subprocess_launcher_setenv" g_subprocess_launcher_setenv ::
Ptr SubprocessLauncher ->
CString ->
CString ->
CInt ->
IO ()
subprocessLauncherSetenv ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> [Char]
-> [Char]
-> Bool
-> m ()
subprocessLauncherSetenv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> String -> String -> Bool -> m ()
subprocessLauncherSetenv a
self String
variable String
value Bool
overwrite = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
variable' <- String -> IO CString
stringToCString String
variable
CString
value' <- String -> IO CString
stringToCString String
value
let overwrite' :: CInt
overwrite' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) Bool
overwrite
Ptr SubprocessLauncher -> CString -> CString -> CInt -> IO ()
g_subprocess_launcher_setenv Ptr SubprocessLauncher
self' CString
variable' CString
value' CInt
overwrite'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
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 SubprocessLauncherSetenvMethodInfo
instance (signature ~ ([Char] -> [Char] -> Bool -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSetenvMethodInfo a signature where
overloadedMethod = subprocessLauncherSetenv
instance O.OverloadedMethodInfo SubprocessLauncherSetenvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSetenv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSetenv"
})
#endif
foreign import ccall "g_subprocess_launcher_spawnv" g_subprocess_launcher_spawnv ::
Ptr SubprocessLauncher ->
Ptr CString ->
Ptr (Ptr GError) ->
IO (Ptr Gio.Subprocess.Subprocess)
subprocessLauncherSpawnv ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> [[Char]]
-> m Gio.Subprocess.Subprocess
subprocessLauncherSpawnv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> [String] -> m Subprocess
subprocessLauncherSpawnv a
self [String]
argv = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CString
argv' <- [String] -> IO (Ptr CString)
packZeroTerminatedFileNameArray [String]
argv
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Subprocess
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr SubprocessLauncher
-> Ptr CString -> Ptr (Ptr GError) -> IO (Ptr Subprocess)
g_subprocess_launcher_spawnv Ptr SubprocessLauncher
self' Ptr CString
argv'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"subprocessLauncherSpawnv" Ptr Subprocess
result
Subprocess
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Subprocess -> Subprocess
Gio.Subprocess.Subprocess) Ptr Subprocess
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
forall (m :: * -> *) a. Monad m => a -> m a
return Subprocess
result'
) (do
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
)
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSpawnvMethodInfo
instance (signature ~ ([[Char]] -> m Gio.Subprocess.Subprocess), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherSpawnvMethodInfo a signature where
overloadedMethod = subprocessLauncherSpawnv
instance O.OverloadedMethodInfo SubprocessLauncherSpawnvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherSpawnv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherSpawnv"
})
#endif
foreign import ccall "g_subprocess_launcher_take_fd" g_subprocess_launcher_take_fd ::
Ptr SubprocessLauncher ->
Int32 ->
Int32 ->
IO ()
subprocessLauncherTakeFd ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> Int32
-> Int32
-> m ()
subprocessLauncherTakeFd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Int32 -> Int32 -> m ()
subprocessLauncherTakeFd a
self Int32
sourceFd Int32
targetFd = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SubprocessLauncher -> Int32 -> Int32 -> IO ()
g_subprocess_launcher_take_fd Ptr SubprocessLauncher
self' Int32
sourceFd Int32
targetFd
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherTakeFdMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherTakeFdMethodInfo a signature where
overloadedMethod = subprocessLauncherTakeFd
instance O.OverloadedMethodInfo SubprocessLauncherTakeFdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherTakeFd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherTakeFd"
})
#endif
foreign import ccall "g_subprocess_launcher_take_stderr_fd" g_subprocess_launcher_take_stderr_fd ::
Ptr SubprocessLauncher ->
Int32 ->
IO ()
subprocessLauncherTakeStderrFd ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> Int32
-> m ()
subprocessLauncherTakeStderrFd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Int32 -> m ()
subprocessLauncherTakeStderrFd a
self Int32
fd = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SubprocessLauncher -> Int32 -> IO ()
g_subprocess_launcher_take_stderr_fd Ptr SubprocessLauncher
self' Int32
fd
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherTakeStderrFdMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherTakeStderrFdMethodInfo a signature where
overloadedMethod = subprocessLauncherTakeStderrFd
instance O.OverloadedMethodInfo SubprocessLauncherTakeStderrFdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherTakeStderrFd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherTakeStderrFd"
})
#endif
foreign import ccall "g_subprocess_launcher_take_stdin_fd" g_subprocess_launcher_take_stdin_fd ::
Ptr SubprocessLauncher ->
Int32 ->
IO ()
subprocessLauncherTakeStdinFd ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> Int32
-> m ()
subprocessLauncherTakeStdinFd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Int32 -> m ()
subprocessLauncherTakeStdinFd a
self Int32
fd = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SubprocessLauncher -> Int32 -> IO ()
g_subprocess_launcher_take_stdin_fd Ptr SubprocessLauncher
self' Int32
fd
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherTakeStdinFdMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherTakeStdinFdMethodInfo a signature where
overloadedMethod = subprocessLauncherTakeStdinFd
instance O.OverloadedMethodInfo SubprocessLauncherTakeStdinFdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherTakeStdinFd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherTakeStdinFd"
})
#endif
foreign import ccall "g_subprocess_launcher_take_stdout_fd" g_subprocess_launcher_take_stdout_fd ::
Ptr SubprocessLauncher ->
Int32 ->
IO ()
subprocessLauncherTakeStdoutFd ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> Int32
-> m ()
subprocessLauncherTakeStdoutFd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Int32 -> m ()
subprocessLauncherTakeStdoutFd a
self Int32
fd = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SubprocessLauncher -> Int32 -> IO ()
g_subprocess_launcher_take_stdout_fd Ptr SubprocessLauncher
self' Int32
fd
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherTakeStdoutFdMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherTakeStdoutFdMethodInfo a signature where
overloadedMethod = subprocessLauncherTakeStdoutFd
instance O.OverloadedMethodInfo SubprocessLauncherTakeStdoutFdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherTakeStdoutFd",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherTakeStdoutFd"
})
#endif
foreign import ccall "g_subprocess_launcher_unsetenv" g_subprocess_launcher_unsetenv ::
Ptr SubprocessLauncher ->
CString ->
IO ()
subprocessLauncherUnsetenv ::
(B.CallStack.HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a
-> [Char]
-> m ()
subprocessLauncherUnsetenv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> String -> m ()
subprocessLauncherUnsetenv a
self String
variable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
variable' <- String -> IO CString
stringToCString String
variable
Ptr SubprocessLauncher -> CString -> IO ()
g_subprocess_launcher_unsetenv Ptr SubprocessLauncher
self' CString
variable'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. Ptr a -> IO ()
freeMem CString
variable'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherUnsetenvMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsSubprocessLauncher a) => O.OverloadedMethod SubprocessLauncherUnsetenvMethodInfo a signature where
overloadedMethod = subprocessLauncherUnsetenv
instance O.OverloadedMethodInfo SubprocessLauncherUnsetenvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.SubprocessLauncher.subprocessLauncherUnsetenv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherUnsetenv"
})
#endif