How can I make a GUI in C for my OS?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Naszy

How can I make a GUI in C for my OS?

Post by Naszy »

HI!

1. How can I make a GUI in C for my OS? Do you have any examples with sources? (I have OS, but I don't know how to make GUI for it;) ).

2. How can I make a text editor (with save-to-file and read-from-file modules) for my OS, in TEXT INTERFACE OFCOURSE ;)?

For questions please contact me:
[email protected] OR [email protected]
chrisa128

Re:How can I make a GUI in C for my OS?

Post by chrisa128 »

You need to find out about VGA mode 13 (I think), this willl then allow you to draw to screen, pixel by pixel....

Text-Editor, first you need to have a System Call Interface, and then develop some I/O functions for Disk access and get a file system. And then it is basically the same as your console, you have to create a buffer for the file. And then just add it so that with certain keys it copies this buffer to disk or vice-versa
Warmaster199

Re:How can I make a GUI in C for my OS?

Post by Warmaster199 »

Mode 13 HEX...

Mode 13h is 320x200x256 color resolution. I have created a relatively basic GUI in this mode...

If you actually want a higher resolution, then I would recommend looking into VESA (http://www.vesa.org) or even video card drivers. VESA should allow between 640x400(and 640x480) - 1200x1024 in anywhere from 256 colors to 16.7million colors... beware, VESA takes a little more work than mode 13h. I recommend that you first develope the GUI in mode 13h (quick and easy)

VGA tutorials:
http://www.brackeen.com/home/vga
Post Reply