gi-vte-2.91.28: Vte bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Vte.Objects.Pty

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Pty Source #

Memory-managed wrapper type.

Constructors

Pty (ManagedPtr Pty) 

Instances

Instances details
Eq Pty Source # 
Instance details

Defined in GI.Vte.Objects.Pty

Methods

(==) :: Pty -> Pty -> Bool #

(/=) :: Pty -> Pty -> Bool #

GObject Pty Source # 
Instance details

Defined in GI.Vte.Objects.Pty

ManagedPtrNewtype Pty Source # 
Instance details

Defined in GI.Vte.Objects.Pty

Methods

toManagedPtr :: Pty -> ManagedPtr Pty

TypedObject Pty Source # 
Instance details

Defined in GI.Vte.Objects.Pty

Methods

glibType :: IO GType

HasParentTypes Pty Source # 
Instance details

Defined in GI.Vte.Objects.Pty

IsGValue (Maybe Pty) Source #

Convert Pty to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Vte.Objects.Pty

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Pty -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Pty)

type ParentTypes Pty Source # 
Instance details

Defined in GI.Vte.Objects.Pty

type ParentTypes Pty = '[Object, Initable]

class (GObject o, IsDescendantOf Pty o) => IsPty o Source #

Type class for types which can be safely cast to Pty, for instance with toPty.

Instances

Instances details
(GObject o, IsDescendantOf Pty o) => IsPty o Source # 
Instance details

Defined in GI.Vte.Objects.Pty

toPty :: (MonadIO m, IsPty o) => o -> m Pty Source #

Cast to Pty, for types for which this is known to be safe. For general casts, use castTo.

Methods

childSetup

ptyChildSetup Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a) 
=> a

pty: a Pty

-> m () 

No description available in the introspection data.

close

ptyClose Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a) 
=> a

pty: a Pty

-> m () 

Deprecated: (Since version 0.42)

Since 0.42 this is a no-op.

getFd

ptyGetFd Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a) 
=> a

pty: a Pty

-> m Int32

Returns: the file descriptor of the PTY master in pty. The file descriptor belongs to pty and must not be closed or have its flags changed

No description available in the introspection data.

getSize

ptyGetSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a) 
=> a

pty: a Pty

-> m (Int32, Int32)

(Can throw GError)

Reads the pseudo terminal's window size.

If getting the window size failed, error will be set to a IOError.

newForeignSync

ptyNewForeignSync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Int32

fd: a file descriptor to the PTY

-> Maybe a

cancellable: a Cancellable, or Nothing

-> m Pty

Returns: a new Pty for fd, or Nothing on error with error filled in (Can throw GError)

Creates a new Pty for the PTY master fd.

No entry will be made in the lastlog, utmp or wtmp system files.

Note that the newly created Pty will take ownership of fd and close it on finalize.

newSync

ptyNewSync Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> [PtyFlags]

flags: flags from PtyFlags

-> Maybe a

cancellable: a Cancellable, or Nothing

-> m Pty

Returns: a new Pty, or Nothing on error with error filled in (Can throw GError)

Allocates a new pseudo-terminal.

You can later use fork() or the spawnAsync family of functions to start a process on the PTY.

If using fork(), you MUST call ptyChildSetup in the child.

If using spawnAsync and friends, you MUST either use ptyChildSetup directly as the child setup function, or call ptyChildSetup from your own child setup function supplied.

When using terminalSpawnSync with a custom child setup function, ptyChildSetup will be called before the supplied function; you must not call it again.

Also, you MUST pass the SpawnFlagsDoNotReapChild flag.

Note also that SpawnFlagsStdoutToDevNull, SpawnFlagsStderrToDevNull, and SpawnFlagsChildInheritsStdin are not supported, since stdin, stdout and stderr of the child process will always be connected to the PTY.

Note that you should set the PTY's size using ptySetSize before spawning the child process, so that the child process has the correct size from the start instead of starting with a default size and then shortly afterwards receiving a SIGWINCH signal. You should prefer using terminalPtyNewSync which does this automatically.

setSize

ptySetSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a) 
=> a

pty: a Pty

-> Int32

rows: the desired number of rows

-> Int32

columns: the desired number of columns

-> m ()

(Can throw GError)

Attempts to resize the pseudo terminal's window size. If successful, the OS kernel will send SIGWINCH to the child process group.

If setting the window size failed, error will be set to a IOError.

setUtf8

ptySetUtf8 Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a) 
=> a

pty: a Pty

-> Bool

utf8: whether or not the pty is in UTF-8 mode

-> m ()

(Can throw GError)

Tells the kernel whether the terminal is UTF-8 or not, in case it can make use of the info. Linux 2.6.5 or so defines IUTF8 to make the line discipline do multibyte backspace correctly.

spawnAsync

ptySpawnAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a, IsCancellable b) 
=> a

pty: a Pty

-> Maybe Text

workingDirectory: the name of a directory the command should start in, or Nothing to use the current working directory

-> [[Char]]

argv: child's argument vector

-> Maybe [[Char]]

envv: a list of environment variables to be added to the environment before starting the process, or Nothing

-> [SpawnFlags]

spawnFlags: flags from SpawnFlags

-> Maybe SpawnChildSetupFunc

childSetup: an extra child setup function to run in the child just before exec(), or Nothing

-> Int32

timeout: a timeout value in ms, -1 for the default timeout, or G_MAXINT to wait indefinitely

-> Maybe b

cancellable: a Cancellable, or Nothing

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback, or Nothing

-> m () 

Like ptySpawnWithFdsAsync, except that this function does not allow passing file descriptors to the child process. See ptySpawnWithFdsAsync for more information.

Since: 0.48

spawnFinish

ptySpawnFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsPty a, IsAsyncResult b) 
=> a

pty: a Pty

-> b

result: a AsyncResult

-> m Int32

(Can throw GError)

No description available in the introspection data.

Since: 0.48

Properties

fd

The file descriptor of the PTY master.

constructPtyFd :: (IsPty o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “fd” property. This is rarely needed directly, but it is used by new.

getPtyFd :: (MonadIO m, IsPty o) => o -> m Int32 Source #

Get the value of the “fd” property. When overloading is enabled, this is equivalent to

get pty #fd

flags

Flags.

constructPtyFlags :: (IsPty o, MonadIO m) => [PtyFlags] -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “flags” property. This is rarely needed directly, but it is used by new.

getPtyFlags :: (MonadIO m, IsPty o) => o -> m [PtyFlags] Source #

Get the value of the “flags” property. When overloading is enabled, this is equivalent to

get pty #flags