multi head porting

The attached patch allows to compile gtk head on win32
again (not supporting multiple screens yet). 
It was done with the major goal to minimize the required 
changes on the backend code. With this goal in mind there 
are some places where it could get huge improvements if the
multi-head api isn't inscribed in stone yet :

Only the multi-head version needs to store a screen with
every colormap. Single Head version would return the 
default screen. [The GdkScreen* field from the GdkColormap 
struct could be removed and the multi-head version would
maintain it's own hashlist to remember the Colormap/Screen

Same logic as for gdk_colormap_get_screen(), removing
GdkScreen* from _GdkVisual struct, whiches content needs to be 
maintained by the backend.

gdk_event_* ()
Removing the display parameter from the gdk_event_* () function
again and determining it from the window given in _GdkEventAny
would allow for multple event queues but did not enforce
them. [They appear unnecessary on win32 even if it would support
multi-head. And they are obviously unnecessary for any gdk port
which is bound to single-head through real backend 'limitations'
(linux-fb, directfb ?).]

If we could agree on single-head being the common case (for which
to optimize) and multi-head being advanced where some extra
code doesn't matter that much, further improvements to the
backend independent code are possible, e.g. by allowing
display and screen to be NULL in the api and maybe totally 
eliminate the need to have GdkScreenSingle and 
GdkDisplaySingle classes ...

What do you think ?
And if you think all the above doenn't make much sense: Is
the patch in its current form ok to commit ?


2002-05-09  Hans Breuer  <hans breuer org>
	[allow to use gtk-multi-head with single-headed
	 win32 backend.]

	* gdkscreen.c : include "gdk.h" for 
	gdk_rectangle_intersect() and the rest

	* gdk/gdkscreen-single.[hc] gdk/gdkdisplay.c :
	Fallback classes for single-headed gtk environments.
	Mapping multi-head requests to older single head
	versions of the functions.

	* gdk/gdk.def : updated externals

	* gdk/win32/gdkcolor-win32.c
	  gdk/win32/gdkvisual-win32.c : maintain
	->screen member

	* gdk/win32/gdkdrawable-win32.c : implement
	drawable.get_screen() member function

	* gdk/win32/gdkevents-win32.c
	  gdk/win32/gdkinput-win32.c : gdk_event_*()
	added extra GdkDisplay* parameter

	* gdk/win32/gdkimage-win32.c (_gdk_image_new_fror_depth) :
	added GdkScreen* parameter

	* gdk/win32/gdkmain-win32.c : _gdk_windowing_init_check()
	doesn't take any parameters anymore

Description: Zip archive

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]