Page 1 of 1

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

Posted: Tue Feb 04, 2003 3:15 pm
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]

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

Posted: Tue Feb 04, 2003 3:43 pm
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

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

Posted: Fri Feb 07, 2003 4:03 pm
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