luxos/SysCore/video/vga.h

37 lines
1.4 KiB
C

#ifndef __VGA__H__
#define __VGA__H__
typedef struct {
enum MODE_TYPES {
TextMode = 0,
GraphicsMode = 1
};
/**Defines the mode returned by BIOS int 0x10, ah = 0xF*/
unsigned char Mode;
/**Text mode or Graphic mode (defined in MODE_TYPES enumeration)*/
unsigned char ModeType;
/**Screen size (characters in text modes, pixels in graphic modes)*/
unsigned Width, Height;
/**Bits per pixel*/
unsigned bpp;
/**Pointer to a function that sets the cursor position*/
void (*SetCursor) (int wherex, int wherey);
/**Pointer to a function that prints an ascii character in a specified position*/
void (*PutChar) (int wherex, int wherey, unsigned char character);
/**Pointer to a function that returns the ascii character in the specified position*/
unsigned char (*GetChar) (int wherex, int wherey);
/**Pointer to a function which plots a pixel on the screen. Should be set NULL in text modes.
\nColor is a void pointer, to ensure compatibility with different colors.*/
void (*PutPixel) (int wherex, int wherey, void* color);
/**Pointer to a function which returns the color of a pixel on the screen. Should be set NULL in text modes.
\nReturn is a void pointer, to ensure compatibility with different colors.*/
void* (*GetPixel) (int wherex, int wherey);
} VideoMode;
#endif