Retro Rocket Kernel
BASIC-Powered Operating System
video.h File Reference

Data Structures

struct  console
 

Macros

#define COLOUR_BLACK   0
 
#define COLOUR_DARKBLUE   1
 
#define COLOUR_DARKGREEN   2
 
#define COLOUR_DARKCYAN   3
 
#define COLOUR_DARKRED   4
 
#define COLOUR_DARKMAGENTA   5
 
#define COLOUR_ORANGE   6
 
#define COLOUR_WHITE   7
 
#define COLOUR_GREY   8
 
#define COLOUR_LIGHTBLUE   9
 
#define COLOUR_LIGHTGREEN   10
 
#define COLOUR_LIGHTCYAN   11
 
#define COLOUR_LIGHTRED   12
 
#define COLOUR_LIGHTMAGENTA   13
 
#define COLOUR_LIGHTYELLOW   14
 
#define COLOUR_LIGHTWHITE   15
 
#define DEFAULT_COLOUR   COLOUR_WHITE
 

Functions

void clearscreen (console *c)
 
void setcursor (console *c)
 
void putstring (console *c, const char *message)
 
void dputstring (const char *message)
 
void put (console *c, const char n)
 
void dput (const char n)
 
void init_console ()
 
void setbackground (console *c, unsigned char background)
 
void setforeground (console *c, unsigned char foreground)
 
int16_t screen_get_height ()
 
int16_t screen_get_width ()
 
void putpixel (int64_t x, int64_t y, uint32_t rgb)
 
uint32_t getpixel (int64_t x, int64_t y)
 
uint64_t framebuffer_address ()
 
uint64_t pixel_address (int64_t x, int64_t y)
 
uint64_t get_text_width ()
 
uint64_t get_text_height ()
 
void gotoxy (uint64_t x, uint64_t y)
 
void get_text_position (uint64_t *x, uint64_t *y)
 

Variables

consolecurrent_console
 

Detailed Description

Author
Craig Edwards (craig.nosp@m.edwa.nosp@m.rds@b.nosp@m.rain.nosp@m.box.c.nosp@m.c)

Macro Definition Documentation

◆ COLOUR_BLACK

#define COLOUR_BLACK   0

◆ COLOUR_DARKBLUE

#define COLOUR_DARKBLUE   1

◆ COLOUR_DARKCYAN

#define COLOUR_DARKCYAN   3

◆ COLOUR_DARKGREEN

#define COLOUR_DARKGREEN   2

◆ COLOUR_DARKMAGENTA

#define COLOUR_DARKMAGENTA   5

◆ COLOUR_DARKRED

#define COLOUR_DARKRED   4

◆ COLOUR_GREY

#define COLOUR_GREY   8

◆ COLOUR_LIGHTBLUE

#define COLOUR_LIGHTBLUE   9

◆ COLOUR_LIGHTCYAN

#define COLOUR_LIGHTCYAN   11

◆ COLOUR_LIGHTGREEN

#define COLOUR_LIGHTGREEN   10

◆ COLOUR_LIGHTMAGENTA

#define COLOUR_LIGHTMAGENTA   13

◆ COLOUR_LIGHTRED

#define COLOUR_LIGHTRED   12

◆ COLOUR_LIGHTWHITE

#define COLOUR_LIGHTWHITE   15

◆ COLOUR_LIGHTYELLOW

#define COLOUR_LIGHTYELLOW   14

◆ COLOUR_ORANGE

#define COLOUR_ORANGE   6

◆ COLOUR_WHITE

#define COLOUR_WHITE   7

◆ DEFAULT_COLOUR

#define DEFAULT_COLOUR   COLOUR_WHITE

Function Documentation

◆ clearscreen()

void clearscreen ( console c)

◆ dput()

void dput ( const char  n)

◆ dputstring()

void dputstring ( const char *  message)

◆ framebuffer_address()

uint64_t framebuffer_address ( )

◆ get_text_height()

uint64_t get_text_height ( )

◆ get_text_position()

void get_text_position ( uint64_t *  x,
uint64_t *  y 
)

◆ get_text_width()

uint64_t get_text_width ( )

◆ getpixel()

uint32_t getpixel ( int64_t  x,
int64_t  y 
)

◆ gotoxy()

void gotoxy ( uint64_t  x,
uint64_t  y 
)

◆ init_console()

void init_console ( )

◆ pixel_address()

uint64_t pixel_address ( int64_t  x,
int64_t  y 
)

◆ put()

void put ( console c,
const char  n 
)

◆ putpixel()

void putpixel ( int64_t  x,
int64_t  y,
uint32_t  rgb 
)

◆ putstring()

void putstring ( console c,
const char *  message 
)

◆ screen_get_height()

int16_t screen_get_height ( )

◆ screen_get_width()

int16_t screen_get_width ( )

◆ setbackground()

void setbackground ( console c,
unsigned char  background 
)

◆ setcursor()

void setcursor ( console c)

◆ setforeground()

void setforeground ( console c,
unsigned char  foreground 
)

Variable Documentation

◆ current_console

console* current_console
extern