mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Major libk restructuring, also rewrote drivers/serial.h
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef SCREEN_GFXMODE_H
|
||||
#define SCREEN_GFXMODE_H
|
||||
#ifndef _SCREEN_GFXMODE_H
|
||||
#define _SCREEN_GFXMODE_H
|
||||
|
||||
#include <memory/addresses.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef SCREEN_GRAPHICS_H
|
||||
#define SCREEN_GRAPHICS_H
|
||||
#ifndef _SCREEN_GRAPHICS_H
|
||||
#define _SCREEN_GRAPHICS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define rgb(r,g,b) ( ((r) << 16 | (g) << 8 | (b)) & 0x00ffffff )
|
||||
#define rgb(_r,_g,_b) ( ((_r) << 16 | (_g) << 8 | (_b)) & 0x00ffffff )
|
||||
|
||||
void drawPixel(int32_t x, int32_t y, uint32_t color);
|
||||
void drawLine(int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint32_t color);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef SCREEN_TEXT_H
|
||||
#define SCREEN_TEXT_H
|
||||
#ifndef _SCREEN_TEXT_H
|
||||
#define _SCREEN_TEXT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef _SCREEN_TTY_H
|
||||
#define _SCREEN_TTY_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t x; // X Position of cursor in characters
|
||||
uint32_t y; // Y Position of cursor in characters
|
||||
uint32_t bg; // Printed character background
|
||||
uint32_t fg; // Printed character foreground
|
||||
uint32_t width; // Width in characters
|
||||
uint32_t height; // Height in characters
|
||||
char cursorChar; // Character to use as a cursor
|
||||
bool hideCursor; // Should we display the cursor
|
||||
} console_t;
|
||||
|
||||
extern console_t* console;
|
||||
|
||||
int32_t consoleWrite(const void* buf, uint32_t len);
|
||||
void toggleCursor();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user