(Maybe) better console subsystem
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include "sys/types.h"
|
||||
|
||||
struct chrdev;
|
||||
extern struct chrdev *g_keyboard_tty;
|
||||
struct console;
|
||||
extern struct console *g_keyboard_console;
|
||||
|
||||
#define INPUT_MOD_CONTROL (1 << 0)
|
||||
#define INPUT_MOD_SHIFT (1 << 1)
|
||||
|
||||
+10
-3
@@ -1,14 +1,19 @@
|
||||
#pragma once
|
||||
#include "sys/types.h"
|
||||
#include "sys/list.h"
|
||||
|
||||
struct chrdev;
|
||||
struct console;
|
||||
struct console_buffer;
|
||||
|
||||
struct tty_data {
|
||||
// Process group ID of the foreground group (session leader)
|
||||
pid_t fg_pgid;
|
||||
// Output device info
|
||||
void *out_dev;
|
||||
int (*out_putc) (void *dev, char c);
|
||||
// Console to which the TTY is attached
|
||||
struct console *master;
|
||||
struct console_buffer *buffer;
|
||||
// List link of TTYs which share the same console
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
// From keyboard handlers and stuff
|
||||
@@ -19,4 +24,6 @@ void tty_data_write(struct chrdev *n, char c);
|
||||
void tty_puts(struct chrdev *n, const char *s);
|
||||
void tty_putc(struct chrdev *n, char c);
|
||||
|
||||
int tty_create(struct console *con);
|
||||
|
||||
void tty_init(void);
|
||||
|
||||
Reference in New Issue
Block a user