Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Vte.Objects.Pty
Description
No description available in the introspection data.
Synopsis
- newtype Pty = Pty (ManagedPtr Pty)
- class (GObject o, IsDescendantOf Pty o) => IsPty o
- toPty :: (MonadIO m, IsPty o) => o -> m Pty
- noPty :: Maybe Pty
- ptyChildSetup :: (HasCallStack, MonadIO m, IsPty a) => a -> m ()
- ptyClose :: (HasCallStack, MonadIO m, IsPty a) => a -> m ()
- ptyGetFd :: (HasCallStack, MonadIO m, IsPty a) => a -> m Int32
- ptyGetSize :: (HasCallStack, MonadIO m, IsPty a) => a -> m (Int32, Int32)
- ptyNewForeignSync :: (HasCallStack, MonadIO m, IsCancellable a) => Int32 -> Maybe a -> m Pty
- ptyNewSync :: (HasCallStack, MonadIO m, IsCancellable a) => [PtyFlags] -> Maybe a -> m Pty
- ptySetSize :: (HasCallStack, MonadIO m, IsPty a) => a -> Int32 -> Int32 -> m ()
- ptySetUtf8 :: (HasCallStack, MonadIO m, IsPty a) => a -> Bool -> m ()
- ptySpawnFinish :: (HasCallStack, MonadIO m, IsPty a, IsAsyncResult b) => a -> b -> m Int32
- constructPtyFd :: (IsPty o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getPtyFd :: (MonadIO m, IsPty o) => o -> m Int32
- constructPtyFlags :: (IsPty o, MonadIO m) => [PtyFlags] -> m (GValueConstruct o)
- getPtyFlags :: (MonadIO m, IsPty o) => o -> m [PtyFlags]
Exported types
Memory-managed wrapper type.
Constructors
Pty (ManagedPtr Pty) |
Instances
Eq Pty Source # | |
IsGValue Pty Source # | Convert |
GObject Pty Source # | |
Defined in GI.Vte.Objects.Pty Methods gobjectType :: IO GType Source # | |
HasParentTypes Pty Source # | |
Defined in GI.Vte.Objects.Pty | |
type ParentTypes Pty Source # | |
Defined in GI.Vte.Objects.Pty |
class (GObject o, IsDescendantOf Pty o) => IsPty o Source #
Instances
(GObject o, IsDescendantOf Pty o) => IsPty o Source # | |
Defined in GI.Vte.Objects.Pty |
Methods
Overloaded methods
childSetup
Arguments
:: (HasCallStack, MonadIO m, IsPty a) | |
=> a |
|
-> m () |
FIXMEchpe
close
Arguments
:: (HasCallStack, MonadIO m, IsPty a) | |
=> a |
|
-> m () |
Deprecated: (Since version 0.42)
Since 0.42 this is a no-op.
getFd
Arguments
:: (HasCallStack, MonadIO m, IsPty a) | |
=> a |
|
-> m Int32 | Returns: the file descriptor of the PTY master in |
No description available in the introspection data.
getSize
Reads the pseudo terminal's window size.
If getting the window size failed, error
will be set to a IOError
.
newForeignSync
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Int32 |
|
-> Maybe a |
|
-> m Pty | Returns: a new |
newSync
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> [PtyFlags] |
|
-> Maybe a |
|
-> m Pty | Returns: a new |
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 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
Arguments
:: (HasCallStack, MonadIO m, IsPty a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () | (Can throw |
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
Arguments
:: (HasCallStack, MonadIO m, IsPty a) | |
=> a |
|
-> Bool |
|
-> m () | (Can throw |
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.
spawnFinish
Arguments
:: (HasCallStack, MonadIO m, IsPty a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m Int32 | (Can throw |
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