{-# 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.Kind as DK
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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GObject.Structs.Parameter as GObject.Parameter
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.Subprocess as Gio.Subprocess
import {-# SOURCE #-} qualified GI.Gio.Structs.OutputVector as Gio.OutputVector
#else
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
#endif
newtype SubprocessLauncher = SubprocessLauncher (SP.ManagedPtr SubprocessLauncher)
deriving (SubprocessLauncher -> SubprocessLauncher -> Bool
(SubprocessLauncher -> SubprocessLauncher -> Bool)
-> (SubprocessLauncher -> SubprocessLauncher -> Bool)
-> Eq SubprocessLauncher
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SubprocessLauncher -> SubprocessLauncher -> Bool
== :: SubprocessLauncher -> SubprocessLauncher -> Bool
$c/= :: SubprocessLauncher -> SubprocessLauncher -> Bool
/= :: 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 = IO SubprocessLauncher -> m SubprocessLauncher
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SubprocessLauncher -> m SubprocessLauncher)
-> (o -> IO SubprocessLauncher) -> o -> m SubprocessLauncher
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SubprocessLauncher -> SubprocessLauncher)
-> o -> IO SubprocessLauncher
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 = Ptr GValue -> Ptr SubprocessLauncher -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr SubprocessLauncher
forall a. Ptr a
FP.nullPtr :: FP.Ptr SubprocessLauncher)
gvalueSet_ Ptr GValue
gv (P.Just SubprocessLauncher
obj) = SubprocessLauncher -> (Ptr SubprocessLauncher -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SubprocessLauncher
obj (Ptr GValue -> Ptr SubprocessLauncher -> IO ()
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 <- Ptr GValue -> IO (Ptr SubprocessLauncher)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr SubprocessLauncher)
if Ptr SubprocessLauncher
ptr Ptr SubprocessLauncher -> Ptr SubprocessLauncher -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr SubprocessLauncher
forall a. Ptr a
FP.nullPtr
then SubprocessLauncher -> Maybe SubprocessLauncher
forall a. a -> Maybe a
P.Just (SubprocessLauncher -> Maybe SubprocessLauncher)
-> IO SubprocessLauncher -> IO (Maybe SubprocessLauncher)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr SubprocessLauncher -> SubprocessLauncher)
-> Ptr SubprocessLauncher -> IO SubprocessLauncher
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 Maybe SubprocessLauncher -> IO (Maybe SubprocessLauncher)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SubprocessLauncher
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSubprocessLauncherMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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 = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> [SubprocessFlags] -> IO (GValueConstruct o)
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.33/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, DK.Type)])
#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, DK.Type)])
#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 = IO SubprocessLauncher -> m SubprocessLauncher
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SubprocessLauncher -> m SubprocessLauncher)
-> IO SubprocessLauncher -> m SubprocessLauncher
forall a b. (a -> b) -> a -> b
$ do
let flags' :: CUInt
flags' = [SubprocessFlags] -> CUInt
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'
Text -> Ptr SubprocessLauncher -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"subprocessLauncherNew" Ptr SubprocessLauncher
result
SubprocessLauncher
result' <- ((ManagedPtr SubprocessLauncher -> SubprocessLauncher)
-> Ptr SubprocessLauncher -> IO SubprocessLauncher
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SubprocessLauncher -> SubprocessLauncher
SubprocessLauncher) Ptr SubprocessLauncher
result
SubprocessLauncher -> IO SubprocessLauncher
forall a. a -> IO a
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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SubprocessLauncher -> IO ()
g_subprocess_launcher_close Ptr SubprocessLauncher
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
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.33/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 = IO (Maybe String) -> m (Maybe String)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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 <- CString -> (CString -> IO String) -> IO (Maybe String)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO String) -> IO (Maybe String))
-> (CString -> IO String) -> IO (Maybe String)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
String
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
String -> IO String
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
variable'
Maybe String -> IO (Maybe String)
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
cwd'
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
env'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
env'
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let flags' :: CUInt
flags' = [SubprocessFlags] -> CUInt
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'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybePath <- case Maybe String
path of
Maybe String
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just String
jPath -> do
CString
jPath' <- String -> IO CString
stringToCString String
jPath
CString -> IO CString
forall a. a -> IO a
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
() -> IO ()
forall a. a -> IO a
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.33/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
-> Maybe ([Char])
-> m ()
subprocessLauncherSetStdinFilePath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSubprocessLauncher a) =>
a -> Maybe String -> m ()
subprocessLauncherSetStdinFilePath a
self Maybe String
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybePath <- case Maybe String
path of
Maybe String
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just String
jPath -> do
CString
jPath' <- String -> IO CString
stringToCString String
jPath
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPath'
Ptr SubprocessLauncher -> CString -> IO ()
g_subprocess_launcher_set_stdin_file_path Ptr SubprocessLauncher
self' CString
maybePath
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SubprocessLauncherSetStdinFilePathMethodInfo
instance (signature ~ (Maybe ([Char]) -> 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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybePath <- case Maybe String
path of
Maybe String
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just String
jPath -> do
CString
jPath' <- String -> IO CString
stringToCString String
jPath
CString -> IO CString
forall a. a -> IO a
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
overwrite
Ptr SubprocessLauncher -> CString -> CString -> CInt -> IO ()
g_subprocess_launcher_setenv Ptr SubprocessLauncher
self' CString
variable' CString
value' CInt
overwrite'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
variable'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
value'
() -> IO ()
forall a. a -> IO a
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.33/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 = IO Subprocess -> m Subprocess
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Subprocess -> m Subprocess) -> IO Subprocess -> m Subprocess
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CString
argv' <- [String] -> IO (Ptr CString)
packZeroTerminatedFileNameArray [String]
argv
IO Subprocess -> IO () -> IO Subprocess
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Subprocess
result <- (Ptr (Ptr GError) -> IO (Ptr Subprocess)) -> IO (Ptr Subprocess)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Subprocess)) -> IO (Ptr Subprocess))
-> (Ptr (Ptr GError) -> IO (Ptr Subprocess)) -> IO (Ptr Subprocess)
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'
Text -> Ptr Subprocess -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"subprocessLauncherSpawnv" Ptr Subprocess
result
Subprocess
result' <- ((ManagedPtr Subprocess -> Subprocess)
-> Ptr Subprocess -> IO Subprocess
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
Subprocess -> IO Subprocess
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Subprocess
result'
) (do
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
argv'
Ptr CString -> IO ()
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
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.33/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 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr SubprocessLauncher
self' <- a -> IO (Ptr SubprocessLauncher)
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'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
variable'
() -> IO ()
forall a. a -> IO a
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.33/docs/GI-Gio-Objects-SubprocessLauncher.html#v:subprocessLauncherUnsetenv"
})
#endif