I saw what you guys have for wm's and then i saw that i can't get futher then a square with a border being moved by a mouse...
So i was wondering how those great gui's work...
There's little documentation about it.
How do your gui's work???
I've seen many ways, i tried a array containing the window data, but that won't work...
Share the inner secrets of your gui's with us!
Although the wm is nowhere nere complete,
I do have a very fast, double bufferd VGA-driver (it has an system to make sure it only writes the bytes from buffer to vidmem which changed):
Eg.
Code: Select all
unsigned char vidmem[320][200]; //lets say this is our vidmem, i know the real mem work diffrent but this is easyer to read, the real driver has this corrected
unsigned char buffer[320][200]; //buffer[x][y]
unsigned char bufferb[320][200]; //the secret weapon, it keeps track of the last buffer so only the changed pixels are written, although more cpu and less mem, cpu is faster than mem, speeding the proces and being improved upon double buffering
void updatevga() //syncs buffer with vidmem
{
for (int x = 0; x < 320; x++)
for (int y = 0; y < 200; y++)
{
if (buffer[x][y] != bufferb[x][y])
{
vidmem[x][y] = buffer[x][y];
bufferb[x][y] = buffer[x][y]; //just as the vidmem, only changed pixels are updated
}
}
}
void initvga() //inits driver
{
for (int x = 0; x < 320; x++)
for (int y = 0; y < 200; y++)
{
buffer[x][y] = 0x00;
bufferb[x][y] = 0x00;
}
//...init the vga driver, this can be found online
}
Short: I want to know how you think a wm should look/be programmed.