Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Successful in 6s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Successful in 7s
30 lines
850 B
C
30 lines
850 B
C
#ifndef TERMINAL_H
|
|
#define TERMINAL_H
|
|
|
|
#include <signal.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <sys/ioctl.h>
|
|
#include <sys/types.h>
|
|
|
|
struct terminal_session {
|
|
int master_pty;
|
|
int slave_pty;
|
|
pid_t child_pid;
|
|
bool active;
|
|
};
|
|
|
|
// Функции для работы с терминалом
|
|
int create_terminal_session(struct terminal_session *session,
|
|
const char *shell);
|
|
void destroy_terminal_session(struct terminal_session *session);
|
|
ssize_t read_from_terminal(struct terminal_session *session, char *buffer,
|
|
size_t size);
|
|
ssize_t write_to_terminal(struct terminal_session *session, const char *data,
|
|
size_t size);
|
|
int resize_terminal(struct terminal_session *session, uint16_t rows,
|
|
uint16_t cols);
|
|
|
|
#endif
|