library/src/vkvm.h

74 lines
1.6 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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