Page 1 of 1
Is gui based in the kernel?
Posted: Sun Oct 22, 2006 11:23 am
by Touch
Hey,
I'm currently building a kernel for my OS, and after reading about GUI and how to make it etc, I was wandering, do you make it in the kernel?
I guess that your "desktop" or whatever, as the kernel, would have it. And any programs would just be programmed with an inside kernel.
Touch
Posted: Sun Oct 22, 2006 11:48 am
by Dex
There are many ideas where a kernel starts and ends etc, but i would say it should not be part of the kernel.
Posted: Sun Oct 22, 2006 11:54 am
by Touch
So your saying that, that the GUI, should be loaded through the kernel, as a sort of shell?
Posted: Sun Oct 22, 2006 12:03 pm
by Pype.Clicker
it's extremely rare to have the GUI as part of the kernel. Typically, the kernel just expose the video memory to user space -- sometimes with access restricted to a single process (the GUI manager / video server / whatever) together with a library containing code to render the "system" widgets.
Posted: Sun Oct 22, 2006 12:06 pm
by Touch
So the GUI is almost a complete shell of the OS.
Posted: Sun Oct 22, 2006 2:03 pm
by bluecode
What has a shell to do with a GUI? The first is a CLI (Command Line Interface). And the GUI is _much_ bigger than just a CLI.
Posted: Mon Oct 23, 2006 2:07 am
by Touch
I dont mean it how you think.
Look:
Code: Select all
<CLI> (This is the first part of the kernel)
<CLI><GUI> (This sits on top of the CLI)
Thats what I mean.
Posted: Mon Oct 23, 2006 3:09 am
by bluecode
They have nothing to do with each other. A GUI is independent of a CLI. These are just two different interface methods an OS can present to the user. And sure, you can also combine these two.
Posted: Mon Oct 23, 2006 1:00 pm
by Touch
So if I was to make the CLI and the GUI seperate, it might be easier, but if I did them together, it would be better?
Posted: Mon Oct 23, 2006 10:30 pm
by Brendan
Hi,
Write a kernel that's capable of running applications. Then write an application called "CLI" that's capable of starting other applications. Then write another application called "GUI" that's also capable of starting other applications.
Now boot your OS and start the CLI. From the CLI type "GUI" and start the GUI, and then exit the CLI. Next, click on something in the GUI to start the CLI again in a window.
To make this work, implement "virtual terminals" so the user can press alt+F1 to alt+F12 to select which virtual terminal to look at, where each virtual terminal can have a CLI, a GUI or any other (full screen) application.
Next, write 2 more CLI's (call one BASH and the other CSH) and 2 more GUIs (one that uses 3D effects like shadows, alpha blending, etc, and the other that is very "minimal"). Now have 3 completely different CLIs running on alt+F1, alt+F2 and alt+F3, and have 3 completely different GUIs running on alt+F4, alt+F5 and alt+F6.
Now consider what happens when the user starts one "GUI application" in a window of another GUI. Does the OS allow this? If not, why not?
BTW it'd also be a good idea to allow applications (and CLIs, GUIs) to be transferred from one place to another. That way the user can shift applications/CLIs/GUIs from one virtual terminal to any other unused virtual terminal, and could also shift applications/CLIs/GUIs between virtual terminals and GUI windows.
Cheers,
Brendan
Posted: Tue Oct 24, 2006 2:37 am
by Touch
Right. So heres what I gotta do:
- Make Kernel, capable of running apps
- Make GUI, can run apps by graphics
Just a quick question, has anyone got a simple CLI?