+ first version of header file
This commit is contained in:
parent
63498cc986
commit
f0f0d4ae63
74
src/vkvm.h
Normal file
74
src/vkvm.h
Normal file
@ -0,0 +1,74 @@
|
||||
#ifndef LIBRARY_VKVM_H
|
||||
#define LIBRARY_VKVM_H
|
||||
|
||||
typedef int type_todo;
|
||||
|
||||
private struct interruptVector {
|
||||
int pid;
|
||||
int signal;
|
||||
};
|
||||
|
||||
//enum config file defaults {
|
||||
const int max_width_pixels = 800;
|
||||
const int max_height_pixels = 600;
|
||||
const int max_textMode_width;
|
||||
const int max_textMode_height;
|
||||
// TODO: add ControlRegisters members here
|
||||
//TODO: add get/set methods
|
||||
//};
|
||||
|
||||
|
||||
enum GraphicMode {
|
||||
Text,
|
||||
BlackWhite,
|
||||
Gray_256,
|
||||
TrueColor;
|
||||
};
|
||||
|
||||
private struct controlRegisters {
|
||||
int layout_version
|
||||
int trigger_reset;
|
||||
int width_pixels;
|
||||
int height_pixels;
|
||||
GraphicMode graphicMode;
|
||||
int autoRedrawInterval;
|
||||
int timerInterruptInterval;
|
||||
type_todo bw_background_color;
|
||||
type_todo bw_foreground_color;
|
||||
int textMode_width;
|
||||
int textMode_height;
|
||||
int textMode_font;
|
||||
int textMode_font_width;
|
||||
int textMode_font_height;
|
||||
int mouse_pos_x;
|
||||
int mouse_pos_y;
|
||||
char keyboardBuffer[16];
|
||||
int keyboardBuffer_index_w;
|
||||
int keyboardBuffer_index_r;
|
||||
};
|
||||
|
||||
//TODO: add init
|
||||
//TODO: add methods for a event handling approach
|
||||
//TODO: add methods for a pooling approach
|
||||
|
||||
// interrupts
|
||||
/*
|
||||
1 timer
|
||||
2 mouse move
|
||||
mouse button
|
||||
key down
|
||||
key up
|
||||
reread ControlRegisters
|
||||
redraw GUI // opposite direction (i.e. client to GUI)!
|
||||
render Text // text mode client -> text rendering process -> redraw GUI
|
||||
*/
|
||||
|
||||
// Shared Memory Layout
|
||||
// --------------------------------------------------------------------
|
||||
// struct ControlRegisters
|
||||
// char reserved[1024]
|
||||
// Interrupt Vector Table [64]
|
||||
// text area [max_textMode_width * max_textMode_height]
|
||||
// pixel area [max_height_pixels * max_height_pixels * sizeof(uint_32)]
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user