2021-09-17 14:36:25 +02:00
|
|
|
/**
|
|
|
|
|
* Copyright 2021 Johannes Marbach
|
2024-01-12 09:51:43 +01:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2021-09-17 14:36:25 +02:00
|
|
|
*/
|
|
|
|
|
|
2024-01-12 10:00:05 +01:00
|
|
|
|
2021-09-17 14:36:25 +02:00
|
|
|
#ifndef BB_TERMINAL_H
|
|
|
|
|
#define BB_TERMINAL_H
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2025-07-03 14:19:10 +00:00
|
|
|
#include <stdint.h>
|
2021-09-17 14:36:25 +02:00
|
|
|
|
|
|
|
|
/**
|
2025-07-03 14:19:10 +00:00
|
|
|
* Prepare for resizing terminals.
|
2021-09-17 14:36:25 +02:00
|
|
|
*
|
2025-07-03 14:19:10 +00:00
|
|
|
* @param tty_size vertical size of the tty area in pixels
|
|
|
|
|
* @param h_display_size horizontal resolution of the display in pixels
|
|
|
|
|
* @param v_display_size vertical resolution of the display in pixels
|
2021-09-17 14:36:25 +02:00
|
|
|
*/
|
2025-07-03 14:19:10 +00:00
|
|
|
void bb_terminal_init(int32_t tty_size, int32_t h_display_size, int32_t v_display_size);
|
2021-09-17 14:36:25 +02:00
|
|
|
|
|
|
|
|
/**
|
2025-07-03 14:19:10 +00:00
|
|
|
* Shrink the height of the active terminal.
|
2021-09-17 14:36:25 +02:00
|
|
|
*/
|
2025-07-03 14:19:10 +00:00
|
|
|
void bb_terminal_shrink_current();
|
2021-09-17 14:36:25 +02:00
|
|
|
|
|
|
|
|
/**
|
2025-07-03 14:19:10 +00:00
|
|
|
* Re-maximise the size of all active terminals.
|
2021-09-17 14:36:25 +02:00
|
|
|
*/
|
2025-07-03 14:19:10 +00:00
|
|
|
void bb_terminal_reset_all();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check whether the terminal is opened by some process
|
|
|
|
|
*/
|
|
|
|
|
bool bb_terminal_is_busy(unsigned int tty);
|
2021-09-17 14:36:25 +02:00
|
|
|
|
|
|
|
|
#endif /* BB_TERMINAL_H */
|