terminal: implement term_init() and term_destroy()

This commit is contained in:
Daniel Eklöf 2019-10-28 18:25:19 +01:00
parent 957fb25559
commit 0979a0e2e5
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 375 additions and 328 deletions

View file

@ -8,6 +8,8 @@
#include <threads.h>
#include <semaphore.h>
//#include "config.h"
#include "fdm.h"
#include "font.h"
#include "tllist.h"
#include "wayland.h"
@ -142,6 +144,8 @@ enum mouse_reporting {
enum cursor_style { CURSOR_BLOCK, CURSOR_UNDERLINE, CURSOR_BAR };
struct terminal {
struct fdm *fdm;
pid_t slave;
int ptmx;
bool quit;
@ -283,6 +287,12 @@ struct terminal {
} delayed_render_timer;
};
struct config;
struct terminal *term_init(
const struct config *conf, struct fdm *fdm, struct wayland *wayl,
int argc, char *const *argv);
int term_destroy(struct terminal *term);
void term_reset(struct terminal *term, bool hard);
void term_damage_rows(struct terminal *term, int start, int end);