Create GUI

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
Guest

Create GUI

Post by Guest »

How to create Graphical User Interface to my own OS ?
Tim

Re:Create GUI

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Create GUI

Post 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.
Guest

Re:Create GUI

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Create GUI

Post by Pype.Clicker »

You should find that kind of things in OSRC and Bona Fide websites ...
Schol-R-LEA

Re:Create GUI

Post 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.
mr. xsism

Re:Create GUI

Post 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
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Create GUI

Post 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 ...
Post Reply