WinTer 0.1.1
Windows Terminal Emulator
Loading...
Searching...
No Matches
pty.h
Go to the documentation of this file.
1
45
46#ifndef PTY_H
47#define PTY_H
48
49#include "base/base_macros.h"
50#include "base/base_types.h"
51
52#if OS_WINDOWS
53# include <windows.h>
54#endif
55
74
86typedef struct pty_state_t {
87 HPCON hPC;
88 HANDLE hInputWrite;
89 HANDLE hOutputRead;
90 HANDLE hProcess;
91 HANDLE hThread;
93
95
123pty_init(struct pty_state_t *state, u16 columns, u16 rows);
124
165pty_spawn(struct pty_state_t *state, LPCWSTR command_line);
166
183API_EXPORT void
184pty_cleanup(struct pty_state_t *state);
185
187 // end pty_module
189
190#endif // PTY_H
Compile-time context detection, compiler abstractions, math utilities, and intrusive data structure m...
Core type definitions and fixed-width aliases.
uint16_t u16
Definition base_types.h:23
#define API_EXPORT
Exports a symbol from a shared library (.dll / .so).
#define C_LINKAGE_END
Closes a C linkage block for C++ compilers (Empty in C).
#define C_LINKAGE_BEGIN
Opens a C linkage block for C++ compilers (Empty in C).
struct pty_state_t PTY_State
Encapsulates the OS-level state of an active Pseudo Console session.
b32 pty_init(struct pty_state_t *state, u16 columns, u16 rows)
Initializes a Pseudo Console and establishes bidirectional communication pipes.
Definition pty.c:50
void pty_cleanup(struct pty_state_t *state)
Terminates the Pseudo Console session and releases all active system handles.
Definition pty.c:260
b32 pty_spawn(struct pty_state_t *state, LPCWSTR command_line)
Spawns a shell process and attaches it to an initialized Pseudo Console.
Definition pty.c:116
int32_t b32
Definition base_types.h:75
Encapsulates the OS-level state of an active Pseudo Console session.
Definition pty.h:86
HPCON hPC
Definition pty.h:87
HANDLE hProcess
Definition pty.h:90
HANDLE hOutputRead
Definition pty.h:89
HANDLE hInputWrite
Definition pty.h:88
HANDLE hThread
Definition pty.h:91