Hello,
Here is my WindowManager(WM) proposal:
1) Each Window should have it's own surface
2) Each Window should have a property OPAQUE
3) The WM should mantain Windows in lists (vector), representing each
"layer". IE: We can have one "applets" layer.
4) The WM should handle the focus between windows
5) The WM should handle the events and give them to the focused window.
6) The WM and Windows should make extensive use of Rectangles to do
updates. That can be done like this:
6.1) When a Window want to have some of it's area blit on the
screen, it should create a list of rectangles to be updated and call
WM.update()
6.2) When WM.update() is called, it goes and make a "no update" list
of rectangles. This list will be created on this basis:
6.2.1) If there is an OPAQUE window, its geometry will be added
to the "no update" list. If that window has a list of update
rectangles, we will subtract them from the window geometry before add
to the "no update" list.
6.2.2) if a Window is not OPAQUE, we should redraw the whole
window, no matter if we only have a small part that should be updated.
(We should find a way to optimize this, find a way to know if something
under this window wants to be updated, if nothing was updated, so don't
update this window too)
Then we go for each Window and update the region "to update" -
"no update". Then the WM make the window's "to update" list = None.
The problem here is to make 6.2 efficient. Maybe we can make
WM.update() to receive one argument "layer", so the operation will be
made only on that layer.
If we have the WM to work right, we can change the (ugly) way we
handle things right now (based on menu stack). We could make some
changes in:
1) Main Menu: could be one Window (not OPAQUE) and (in Aubin's menu)
have another Window that display the icon. When we select the one item
from the main menu, the Main Menu window and the Icon window could be
hidden and we can unhide it when there is no other focused application.
We can make each window implement the hide() method, so when we call
mainmenu_window.hide(), it call the WM.hide_window(icon_window)
2) In menu's, we can have 3 windows: Info, View and Listing and have
the Listing one focused.
Comments?
Gustavo
_______________________________________________________________________
Busca Yahoo!
O servi�o de busca mais completo da Internet. O que voc� pensar o Yahoo! encontra.
http://br.busca.yahoo.com/
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel