Make a GUI

If you are new to development, plan on spending some time here before visiting the other forums.

Moderator:Moderators

Post Reply
Barrux
Posts:1
Joined:Thu Nov 03, 2011 6:23 pm
Make a GUI

Post by Barrux » Wed Nov 09, 2011 3:37 pm

Sorry for my bad english but it is not my language. First of all, great tutorial! :wink: I studied the tutorial with successfully. Now (I could not understand) I wanted create a simple interface with icons and mouse pointer, or load a image. I was wondering if you can tell me how to do it or if you can give me some links to show me how to do.
Thank you for any replies.

User avatar
Benjamin
Posts:10
Joined:Sat Apr 16, 2011 2:52 am

Re: Make a GUI

Post by Benjamin » Thu Nov 10, 2011 12:36 am

That kind of GUI is called a desktop environment. Before OS developers do anything nifty, we usually spend a lot of time working on the core of the operating system (mostly the kernel). Also, you'll need to settle a way for controlling the screen display, whether by oldschool VGA, graphics card utilization or whatever method is the most practical for your purposes and ability.

When you're ready, you can try following something like this tutorial:
http://www.brokenthorn.com/Resources/OSDevVga.html

Unless you're stubborn and the "elite-breed", you'll remain simple and cope with the limitations of old video modes until you gain the ability to control (atleast) your own graphics card model. The amount of complications involved with supporting more hardware (i.e the variety of graphics cards etc.) will get ugly.

Some day, you might be able to (after some challenge) create a low-color-depth desktop environment with support for little icons and stuff. The icons can be created with an image program which supports the kind of color depth you want. You can study these simple image formats (such as BMP, ICO, GIF etc.) and maybe implement them directly into your operating system, or you can make a program which converts them into a custom image format of your own design.
When life gives you lemmings, keep them safe.

User avatar
linuxfreak
Posts:52
Joined:Tue Jul 26, 2011 7:36 pm
Location:Paarl, Western Cape, South Africa

Re: Make a GUI

Post by linuxfreak » Sun Jan 01, 2012 9:36 pm

Hi:

Sorry for being late, but i can help: I do agree with Benjamin - you need to concentrate on the main part of the os, make it as good as you can before continuing.

First of all, u need to know how to get into a video mode and be able to plot a pixel in C. www.brackeen.com/vga/basics.html should provide a good start. Also check out the tutorial on this site.

Next u should be able to draw basic shapes, www.brackeen/vga/shapes.html should provide a good start.

If u want mouse and icon support, u should be able to load bitmaps, www.brackeen.com/vga/bitmaps.html is the way to go.

Then u should know about double buffering, www.brackeen.com/vga/unchain.html is a good tutorial.

Then there is mouse support, www.brackeen.com/vga/mouse.html is a good place to start.

And last but not least, www.osdever.net/tutorials/view/gui-development has a great tutorial on that.

It is highly recomended that u concentrate on the kernel and other parts of the os, and leave this for later. READ MY NEXT REPLY >>>
The Anti-Microsoft revolution has begun, and soon Apple will take over the universe. The world is primed for war - someone should just take the first blow.

User avatar
linuxfreak
Posts:52
Joined:Tue Jul 26, 2011 7:36 pm
Location:Paarl, Western Cape, South Africa

Re: Make a GUI

Post by linuxfreak » Sun Jan 01, 2012 9:49 pm

[continued]
U should create a seperate file that has all the new functions in it(eg. graphics.h - declares all the functions) and (eg. graphics.cpp - executes the functions when called from somewhere else) and then later include graphics.h in the kernel or the program that does the gui. But i am shure u know all of this.

And this is for everyone - posts like these are ment to fall under the "Advanced OS development" catagory, anything that mike's tutorials don't yet cover are considdered advanced - so please.

Hope these 2 posts help.

- Jean-Pierre:
The Anti-Microsoft revolution has begun, and soon Apple will take over the universe. The world is primed for war - someone should just take the first blow.

User avatar
linuxfreak
Posts:52
Joined:Tue Jul 26, 2011 7:36 pm
Location:Paarl, Western Cape, South Africa

Re: Make a GUI

Post by linuxfreak » Sun Jan 01, 2012 10:38 pm

Hello again.

Before u start, considder this - the demo's here are not suitably alone for gui development. U lack heap and multitasking support. Multitasking is very important - without it you can only run the gui alone, no other background services or programs. Once u need a program - u need to close the gui, run program from terminal and then open gui again.

Next, considder to implement a VM8086 monitor first, u need it to switch to graphics mode. Then i would suggest u port a standard c library like "libsuperc" to ease the development of gui.

Later u need to look at implementing a standard driver interface, project udi seems good(google project udi), but beware it takes a while to get it working properly. Then considder developing a driver fot your own graphics card(s).

For info on implement heap managment, check out - http://www.jamesmolloy.co.uk/tutorial_h ... 0Heap.html .

For info on multitasking, check out - http://www.jamesmolloy.co.uk/tutorial_h ... sking.html
The Anti-Microsoft revolution has begun, and soon Apple will take over the universe. The world is primed for war - someone should just take the first blow.

Post Reply