gi-gio-0.2.46.12: GI/Gio/Objects/SubprocessLauncher.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Gio.Objects.SubprocessLauncher
(
-- * Exported types
SubprocessLauncher(..) ,
SubprocessLauncherK ,
toSubprocessLauncher ,
noSubprocessLauncher ,
-- * Methods
-- ** subprocessLauncherGetenv
subprocessLauncherGetenv ,
-- ** subprocessLauncherNew
subprocessLauncherNew ,
-- ** subprocessLauncherSetChildSetup
subprocessLauncherSetChildSetup ,
-- ** subprocessLauncherSetCwd
subprocessLauncherSetCwd ,
-- ** subprocessLauncherSetEnviron
subprocessLauncherSetEnviron ,
-- ** subprocessLauncherSetFlags
subprocessLauncherSetFlags ,
-- ** subprocessLauncherSetStderrFilePath
subprocessLauncherSetStderrFilePath ,
-- ** subprocessLauncherSetStdinFilePath
subprocessLauncherSetStdinFilePath ,
-- ** subprocessLauncherSetStdoutFilePath
subprocessLauncherSetStdoutFilePath ,
-- ** subprocessLauncherSetenv
subprocessLauncherSetenv ,
-- ** subprocessLauncherSpawnv
subprocessLauncherSpawnv ,
-- ** subprocessLauncherTakeFd
subprocessLauncherTakeFd ,
-- ** subprocessLauncherTakeStderrFd
subprocessLauncherTakeStderrFd ,
-- ** subprocessLauncherTakeStdinFd
subprocessLauncherTakeStdinFd ,
-- ** subprocessLauncherTakeStdoutFd
subprocessLauncherTakeStdoutFd ,
-- ** subprocessLauncherUnsetenv
subprocessLauncherUnsetenv ,
-- * Properties
-- ** Flags
SubprocessLauncherFlagsPropertyInfo ,
constructSubprocessLauncherFlags ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gio.Types
import GI.Gio.Callbacks
import qualified GI.GLib as GLib
import qualified GI.GObject as GObject
newtype SubprocessLauncher = SubprocessLauncher (ForeignPtr SubprocessLauncher)
foreign import ccall "g_subprocess_launcher_get_type"
c_g_subprocess_launcher_get_type :: IO GType
type instance ParentTypes SubprocessLauncher = SubprocessLauncherParentTypes
type SubprocessLauncherParentTypes = '[GObject.Object]
instance GObject SubprocessLauncher where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_g_subprocess_launcher_get_type
class GObject o => SubprocessLauncherK o
instance (GObject o, IsDescendantOf SubprocessLauncher o) => SubprocessLauncherK o
toSubprocessLauncher :: SubprocessLauncherK o => o -> IO SubprocessLauncher
toSubprocessLauncher = unsafeCastTo SubprocessLauncher
noSubprocessLauncher :: Maybe SubprocessLauncher
noSubprocessLauncher = Nothing
-- VVV Prop "flags"
-- Type: TInterface "Gio" "SubprocessFlags"
-- Flags: [PropertyWritable,PropertyConstructOnly]
constructSubprocessLauncherFlags :: [SubprocessFlags] -> IO ([Char], GValue)
constructSubprocessLauncherFlags val = constructObjectPropertyFlags "flags" val
data SubprocessLauncherFlagsPropertyInfo
instance AttrInfo SubprocessLauncherFlagsPropertyInfo where
type AttrAllowedOps SubprocessLauncherFlagsPropertyInfo = '[ 'AttrConstruct]
type AttrSetTypeConstraint SubprocessLauncherFlagsPropertyInfo = (~) [SubprocessFlags]
type AttrBaseTypeConstraint SubprocessLauncherFlagsPropertyInfo = SubprocessLauncherK
type AttrGetType SubprocessLauncherFlagsPropertyInfo = ()
type AttrLabel SubprocessLauncherFlagsPropertyInfo = "SubprocessLauncher::flags"
attrGet _ = undefined
attrSet _ = undefined
attrConstruct _ = constructSubprocessLauncherFlags
type instance AttributeList SubprocessLauncher = SubprocessLauncherAttributeList
type SubprocessLauncherAttributeList = ('[ '("flags", SubprocessLauncherFlagsPropertyInfo)] :: [(Symbol, *)])
type instance SignalList SubprocessLauncher = SubprocessLauncherSignalList
type SubprocessLauncherSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method SubprocessLauncher::new
-- method type : Constructor
-- Args : [Arg {argName = "flags", argType = TInterface "Gio" "SubprocessFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "flags", argType = TInterface "Gio" "SubprocessFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "SubprocessLauncher"
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_new" g_subprocess_launcher_new ::
CUInt -> -- flags : TInterface "Gio" "SubprocessFlags"
IO (Ptr SubprocessLauncher)
subprocessLauncherNew ::
(MonadIO m) =>
[SubprocessFlags] -> -- flags
m SubprocessLauncher
subprocessLauncherNew flags = liftIO $ do
let flags' = gflagsToWord flags
result <- g_subprocess_launcher_new flags'
checkUnexpectedReturnNULL "g_subprocess_launcher_new" result
result' <- (wrapObject SubprocessLauncher) result
return result'
-- method SubprocessLauncher::getenv
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_getenv" g_subprocess_launcher_getenv ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- variable : TBasicType TUTF8
IO CString
subprocessLauncherGetenv ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- variable
m T.Text
subprocessLauncherGetenv _obj variable = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
variable' <- textToCString variable
result <- g_subprocess_launcher_getenv _obj' variable'
checkUnexpectedReturnNULL "g_subprocess_launcher_getenv" result
result' <- cstringToText result
touchManagedPtr _obj
freeMem variable'
return result'
-- method SubprocessLauncher::set_child_setup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_setup", argType = TInterface "GLib" "SpawnChildSetupFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy_notify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_setup", argType = TInterface "GLib" "SpawnChildSetupFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_set_child_setup" g_subprocess_launcher_set_child_setup ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
FunPtr GLib.SpawnChildSetupFuncC -> -- child_setup : TInterface "GLib" "SpawnChildSetupFunc"
Ptr () -> -- user_data : TBasicType TVoid
FunPtr GLib.DestroyNotifyC -> -- destroy_notify : TInterface "GLib" "DestroyNotify"
IO ()
subprocessLauncherSetChildSetup ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
GLib.SpawnChildSetupFunc -> -- child_setup
m ()
subprocessLauncherSetChildSetup _obj child_setup = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
child_setup' <- GLib.mkSpawnChildSetupFunc (GLib.spawnChildSetupFuncWrapper Nothing child_setup)
let user_data = castFunPtrToPtr child_setup'
let destroy_notify = safeFreeFunPtrPtr
g_subprocess_launcher_set_child_setup _obj' child_setup' user_data destroy_notify
touchManagedPtr _obj
return ()
-- method SubprocessLauncher::set_cwd
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cwd", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cwd", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_set_cwd" g_subprocess_launcher_set_cwd ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- cwd : TBasicType TUTF8
IO ()
subprocessLauncherSetCwd ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- cwd
m ()
subprocessLauncherSetCwd _obj cwd = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
cwd' <- textToCString cwd
g_subprocess_launcher_set_cwd _obj' cwd'
touchManagedPtr _obj
freeMem cwd'
return ()
-- method SubprocessLauncher::set_environ
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "env", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "env", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_set_environ" g_subprocess_launcher_set_environ ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- env : TBasicType TUTF8
IO ()
subprocessLauncherSetEnviron ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- env
m ()
subprocessLauncherSetEnviron _obj env = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
env' <- textToCString env
g_subprocess_launcher_set_environ _obj' env'
touchManagedPtr _obj
freeMem env'
return ()
-- method SubprocessLauncher::set_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "SubprocessFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "SubprocessFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_set_flags" g_subprocess_launcher_set_flags ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CUInt -> -- flags : TInterface "Gio" "SubprocessFlags"
IO ()
subprocessLauncherSetFlags ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
[SubprocessFlags] -> -- flags
m ()
subprocessLauncherSetFlags _obj flags = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let flags' = gflagsToWord flags
g_subprocess_launcher_set_flags _obj' flags'
touchManagedPtr _obj
return ()
-- method SubprocessLauncher::set_stderr_file_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_set_stderr_file_path" g_subprocess_launcher_set_stderr_file_path ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- path : TBasicType TUTF8
IO ()
subprocessLauncherSetStderrFilePath ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- path
m ()
subprocessLauncherSetStderrFilePath _obj path = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
path' <- textToCString path
g_subprocess_launcher_set_stderr_file_path _obj' path'
touchManagedPtr _obj
freeMem path'
return ()
-- method SubprocessLauncher::set_stdin_file_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_set_stdin_file_path" g_subprocess_launcher_set_stdin_file_path ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- path : TBasicType TUTF8
IO ()
subprocessLauncherSetStdinFilePath ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- path
m ()
subprocessLauncherSetStdinFilePath _obj path = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
path' <- textToCString path
g_subprocess_launcher_set_stdin_file_path _obj' path'
touchManagedPtr _obj
freeMem path'
return ()
-- method SubprocessLauncher::set_stdout_file_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_set_stdout_file_path" g_subprocess_launcher_set_stdout_file_path ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- path : TBasicType TUTF8
IO ()
subprocessLauncherSetStdoutFilePath ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- path
m ()
subprocessLauncherSetStdoutFilePath _obj path = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
path' <- textToCString path
g_subprocess_launcher_set_stdout_file_path _obj' path'
touchManagedPtr _obj
freeMem path'
return ()
-- method SubprocessLauncher::setenv
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "overwrite", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_setenv" g_subprocess_launcher_setenv ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- variable : TBasicType TUTF8
CString -> -- value : TBasicType TUTF8
CInt -> -- overwrite : TBasicType TBoolean
IO ()
subprocessLauncherSetenv ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- variable
T.Text -> -- value
Bool -> -- overwrite
m ()
subprocessLauncherSetenv _obj variable value overwrite = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
variable' <- textToCString variable
value' <- textToCString value
let overwrite' = (fromIntegral . fromEnum) overwrite
g_subprocess_launcher_setenv _obj' variable' value' overwrite'
touchManagedPtr _obj
freeMem variable'
freeMem value'
return ()
-- method SubprocessLauncher::spawnv
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "argv", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "argv", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Subprocess"
-- throws : True
-- Skip return : False
foreign import ccall "g_subprocess_launcher_spawnv" g_subprocess_launcher_spawnv ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
Ptr CString -> -- argv : TCArray True (-1) (-1) (TBasicType TUTF8)
Ptr (Ptr GError) -> -- error
IO (Ptr Subprocess)
subprocessLauncherSpawnv ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
[T.Text] -> -- argv
m Subprocess
subprocessLauncherSpawnv _obj argv = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
argv' <- packZeroTerminatedUTF8CArray argv
onException (do
result <- propagateGError $ g_subprocess_launcher_spawnv _obj' argv'
checkUnexpectedReturnNULL "g_subprocess_launcher_spawnv" result
result' <- (wrapObject Subprocess) result
touchManagedPtr _obj
mapZeroTerminatedCArray freeMem argv'
freeMem argv'
return result'
) (do
mapZeroTerminatedCArray freeMem argv'
freeMem argv'
)
-- method SubprocessLauncher::take_fd
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source_fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "source_fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target_fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_take_fd" g_subprocess_launcher_take_fd ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
Int32 -> -- source_fd : TBasicType TInt32
Int32 -> -- target_fd : TBasicType TInt32
IO ()
subprocessLauncherTakeFd ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
Int32 -> -- source_fd
Int32 -> -- target_fd
m ()
subprocessLauncherTakeFd _obj source_fd target_fd = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
g_subprocess_launcher_take_fd _obj' source_fd target_fd
touchManagedPtr _obj
return ()
-- method SubprocessLauncher::take_stderr_fd
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_take_stderr_fd" g_subprocess_launcher_take_stderr_fd ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
Int32 -> -- fd : TBasicType TInt32
IO ()
subprocessLauncherTakeStderrFd ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
Int32 -> -- fd
m ()
subprocessLauncherTakeStderrFd _obj fd = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
g_subprocess_launcher_take_stderr_fd _obj' fd
touchManagedPtr _obj
return ()
-- method SubprocessLauncher::take_stdin_fd
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_take_stdin_fd" g_subprocess_launcher_take_stdin_fd ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
Int32 -> -- fd : TBasicType TInt32
IO ()
subprocessLauncherTakeStdinFd ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
Int32 -> -- fd
m ()
subprocessLauncherTakeStdinFd _obj fd = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
g_subprocess_launcher_take_stdin_fd _obj' fd
touchManagedPtr _obj
return ()
-- method SubprocessLauncher::take_stdout_fd
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_take_stdout_fd" g_subprocess_launcher_take_stdout_fd ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
Int32 -> -- fd : TBasicType TInt32
IO ()
subprocessLauncherTakeStdoutFd ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
Int32 -> -- fd
m ()
subprocessLauncherTakeStdoutFd _obj fd = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
g_subprocess_launcher_take_stdout_fd _obj' fd
touchManagedPtr _obj
return ()
-- method SubprocessLauncher::unsetenv
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SubprocessLauncher", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "variable", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_subprocess_launcher_unsetenv" g_subprocess_launcher_unsetenv ::
Ptr SubprocessLauncher -> -- _obj : TInterface "Gio" "SubprocessLauncher"
CString -> -- variable : TBasicType TUTF8
IO ()
subprocessLauncherUnsetenv ::
(MonadIO m, SubprocessLauncherK a) =>
a -> -- _obj
T.Text -> -- variable
m ()
subprocessLauncherUnsetenv _obj variable = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
variable' <- textToCString variable
g_subprocess_launcher_unsetenv _obj' variable'
touchManagedPtr _obj
freeMem variable'
return ()