Page 1 of 1

GUI Development

Posted: Thu Oct 12, 2006 4:08 am
by Jeko
I'm developing a Graphical User Interface for my OS, and I have some questions about GUI development.
1 In your opinion, I must save a bitmap in memory for each window? (same as http://www.osdever.net/tutorials/GUI_tut.php?the_id=62)
2 Which is better between a library, from which apps gets functions for handling GUi, and an application? (same as X)

Posted: Thu Oct 12, 2006 11:16 am
by jvff
1) I don't think you're required to save the bitmap for every window. You could just call the window owner's redraw function, but I think it might be better to save the window bitmap in case the application stops responding.
2) I didn't quite understand this question.

Hope this helps,

JVFF

Re: GUI Development

Posted: Thu Oct 12, 2006 11:32 am
by Daedalus
MarkOS wrote:2 Which is better between a library, from which apps gets functions for handling GUi, and an application? (same as X)
Do you mean to ask:
Is it better to write a library that applications use for GUI functions (as in Windows) or leave it up to each program to do it themselves (as in X.)

I would suggest making a library. You should define how the GUI works, and how it communicates with your OS, as you would know the best way to do it (since you wrote the OS.)

X Windows programs suffer from lack of a standard that makes it hard for different programs to communicate well together, and makes it hard for people to start writing graphical applications since there are so many "standards."

Write your own, save others the trouble, I say.

Posted: Thu Oct 12, 2006 11:44 am
by gaf
I must save a bitmap in memory for each window ?
With a local copy of all windows some operations (moving, minimizing, possibly resizing) can be handled by the GUI internally. This would mean that applications don't have to be called that often to update their windows, which could in turn lead to an increased performance.
Which is better between a library, from which apps gets functions for handling GUI, and an application? (same as X)
Whether you should implement your GUI as a server or as a kernel module depends on your overall system design. A library will be needed in both cases to provide a more convenient way of accessing the functionality.

regards,
gaf

Posted: Mon Oct 16, 2006 6:57 am
by Jeko
For library I intended kernel module :D .
I choosed it because it is faster.

Posted: Mon Oct 16, 2006 9:17 am
by Dex
Also remember to design from the start if you want skin able windows, that way something as small as this http://www.dex4u.com/images/skin.bmp
Can be made into this http://www.dex4u.com/images/DexGui.jpg
But i decided to be differant and go for the menu type GUI.
http://www.dex4u.com/images/Dash4u.jpg
So you do not need to copy other GUI, if you think you have a better way.