Page 1 of 1

Create GUI

Posted: Thu Nov 27, 2003 7:49 pm
by Guest
How to create Graphical User Interface to my own OS ?

Re:Create GUI

Posted: Fri Nov 28, 2003 5:31 am
by Tim
1. Write an OS
2. Write a GUI

By the time you are ready to write a GUI, you won't need to ask how.

Re:Create GUI

Posted: Fri Nov 28, 2003 7:27 am
by Pype.Clicker
i think we really need a sort of "The OS behind the Shell" tutorial stuff so that newbies finally understand that what they see when they open Windows is *NOT* an OS. They see a user program (the shell) that make polite queries to the Lord Of DPL0 Ring, asking to perform actions on objects (files, threads, message queues, whatever) that cannot get out of the Lord's Keep and then make use of a widgets library that knows how to tell the Video Driver to render things like buttons, etc.

Consider reading the How do i make an OS with a Start Menu thread by the Nuno-Silva.

This is one of the Frequently Asked - Unfrequently Answered Question about OS.

Re:Create GUI

Posted: Fri Nov 28, 2003 8:39 am
by Guest
Thats fine, but my OS cann't deal with VGA and Mouse right now.
Can anyone give me the code for that plz.

Re:Create GUI

Posted: Fri Nov 28, 2003 9:00 am
by Pype.Clicker
You should find that kind of things in OSRC and Bona Fide websites ...

Re:Create GUI

Posted: Sat Nov 29, 2003 12:14 am
by Schol-R-LEA
Guest wrote: Thats fine, but my OS cann't deal with VGA and Mouse right now.
Can anyone give me the code for that plz.
Would you mind telling us what it does handle, by any chance? Trying to add a GUI too early in the design can be a serious mistake. Personally, I wouldn't even consider starting on the GUI until the system can:
  • boot and load the kernel
  • read the memory size and other information that depends on real-mode interrupt functions to get
  • Save the IVT and BDA for later use
  • set the A20 address line
  • set up the starting p-mode system tables (GDT, IDT, etc.)
  • switch into p-mode

    If you are using a multiboot loader like GRUB, then this first group of operations will be done for you by the loader. The rest are all things you'll have to do yourself:
  • program the PIT and set up the default interrupt and exception handlers
  • manage memory mapping, allocation and deallocation
  • spawn, schedule and synchronize processes
  • drive both floppy and hard disks
  • support a file system
  • initialize loadable drivers, if any
  • run a basic text-mode shell
Others may disagree, but I would consider those to be prerequisites to creating a GUI (if anyone can think of any others, I'll gladly add them). Being able to spawn a v86 mode process is likely to be necessary, too, unless you are only going to support the very latest VBE 3.0 compatible video cards.

As for 'giving you the code for it', that's simply not possible; driver code is very specific to the operating system it works under, and without more information on the OS, there's no way to provide code that will work for your OS.

I strongly recommend reading the .:Quicklinks:. thread and the "How to Ask Questions" essay before going any further, as they should help you with getting answers more effectively. Signing in might be a good idea, too, if mean to post here often, though it's certainly not necessary.

Re:Create GUI

Posted: Mon Dec 01, 2003 11:58 pm
by mr. xsism
Pype.Clicker wrote: i think we really need a sort of "The OS behind the Shell" tutorial stuff so that newbies finally understand that what they see when they open Windows is *NOT* an OS. They see a user program (the shell) that make polite queries to the Lord Of DPL0 Ring, asking to perform actions on objects (files, threads, message queues, whatever) that cannot get out of the Lord's Keep and then make use of a widgets library that knows how to tell the Video Driver to render things like buttons, etc.
it would be awesome if we could make an illustrated OS guide,lol. But seriously pype, would you mind if i used that lord of the ring0 illustration in a graphic guide??

mr. xsism

Re:Create GUI

Posted: Tue Dec 02, 2003 3:05 am
by Pype.Clicker
mr. xsism wrote:
it would be awesome if we could make an illustrated OS guide,lol. But seriously pype, would you mind if i used that lord of the ring0 illustration in a graphic guide??

mr. xsism
n.p. that's a free to use joke :-p ...