GUI Development

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
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

GUI Development

Post 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)
jvff
Member
Member
Posts: 46
Joined: Sun Oct 24, 2004 11:00 pm

Post 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
User avatar
Daedalus
Member
Member
Posts: 74
Joined: Sun Oct 16, 2005 11:00 pm
Location: Australia
Contact:

Re: GUI Development

Post 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.
User avatar
gaf
Member
Member
Posts: 349
Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany

Post 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
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Post by Jeko »

For library I intended kernel module :D .
I choosed it because it is faster.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

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