trolly | Q-Step OSAfter a long time of inactivity, i decided to comme back in gui developpement. But i decided to develop a totaly new os to avoid the DOS and quickbasic limitation.
The os itself is written in assembly (using the fasm assembler) and boot using grub. It's very minimalist, but modulable to extreme:
the kernel contains only a few set of features
manage the memory
manage the interrupts handler
outpout to textmode console
relocate ,initialize, the modules loaded by the bootloader
manage the functions exported by the modules
manage the list of block devices
the modules gives the "optional" features
keyboard driver
floppy driver
vfs driver
fat driver
vesa driver
etc...
the os is signle task. On top of the kernel, there is the shell , wich is the "GUI Manager", the gui manager do all the gui stuff, and it's designed in a OOP model in ASM, the manager can load multiple application, but only one is visible at the same time, when the user switch to another app, the manager switch the memory of the switched from/to application.
The gui application are fully event driven. It mean, that there is no main loop for the application. Instead, there is 4 functions : Init, End,Update,Redraw
Init : when the application is launched, the application define the gui initialize the gui element
End : cleanup task
Update : to update the state of the application
Redaw : to redraw the contents (not the gui elements, wich are managed by the gui manager)
To handle the events (by example a click on a buton) the app defin the function to be executed when a click occurs, the manager will call it when a click on the button is detected
Finaly, i created a cross platform compiler environment for fbc to develop applicaton in freebasic. Not all functions is wrapped. But i can already have an application with a button , and a label
[caption id="attachment_950" align="alignnone" width="300"] Caputre of the sample application[/caption]
[caption id="attachment_951" align="alignnone" width="181"] code of the sample application, written in freebasic[/caption]
the manager's main loop, call the code to manage the gui elements, then, call the update function of the current runing app, then he redraw the gui , and call the app's redraw functions.
when a modal dialog is shown, the manager doesent draw the app's gui, and does'nt manage it while the modal dialog is visible. instead it draw & manage the modal dialog only | 2013-10-12 | 3:37 PM |