Commit Graph

2 Commits

Author SHA1 Message Date
Tor Lillqvist
bc1ec5c14a Massive changes. Too many to list here, but I'll try a summary:
2002-02-17  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/*.c: Massive changes. Too many to list here, but I'll
	try a summary:

	1) Unify GdkPixmap and GdkImage implementation: For each
	GdkPixmap, allocate a GdkImage, and vice versa.
	GdkPixmapImplWin32Data has a pointer to the GdkImage.
	GdkImage::windowing_data is a pointer to the GdkPixmap.

	This simplifies many pixmap and image related functions a lot, and
	reduces duplicated code snippets. For instance, there is only one
	place in gdk/win32 where CreateDIBSection() is called, in the
	function _gdk_win32_new_pixmap(). Converting a bitmap (GdkPixmap)
	to a Windows region is almost trivial, with the bitmap bits being
	readily accessible in the associated GdkImage.

	All blitting between GdkPixmaps, GdkWindows and GdkImages goes
	through handled the _gdk_win32_blit() function, which calls
	different functions to handle the cases of blitting from pixmaps,
	inside windows (scrolling), or from windows, which all require
	somewhat different handling.

	2) Support 256-color mode. This has long been very broken, now it
	works more or less OK. Keep the logical palette for each colormap
	as small as possible while allocating and freeing colors. Select
	and realize the logical palette associated with a GdkColormap into
	a DC before drawing or blitting.

	When the display is in 256-color mode, make it possible for the
	user to override the size of the palette(s) used with either the
	GDK_WIN32_MAX_COLORS environment variable, or a -max-colors
	command line option. It is possible to reduce the palette size all
	the way down to using just the 16 static colors (which causes the
	system visual to be of type GDK_VISUAL_STATIC_COLOR. This could
	possibly be useful if one desperately wants to avoid color
	flashing. (Note that in order for this to work properly, an as of
	yet not commited fix to gdkrgb.c is needed.)

	Handle the palette messages. On WM_PALETTECHANGED, call
	UpdateColors() for the given window hierarchy. Do this only if a
	window in some other top-level window hierarchy caused the palette
	change (realized a palette). Do this max five times in a row (an
	arbitrarily chosen limit), though, otherwise redraw by generating
	expose events. On WM_QUERYNEWPALETTE, cause a redraw of the whole
	window hierarchy by generating GDK_EXPOSE events.

	3) Code cleanup in general. For instance, remove the "emulated"
	X11 structs ColormapStruct, Visual and XStandardColormap. Use the
	new GDK_DEBUG_* flags for debugging output in the relevant source
	files. Remove the unused colormap hash table in gdkcolor-win32.c

	4) Plug some resource leaks.

2002-02-14  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (gdk_dropfiles_filter): Use
	g_filename_to_uri() to actually create legal URIs in the
	text/uri-list data.
2002-02-17 00:25:05 +00:00
Tor Lillqvist
7944e647c6 Fix typo.
1999-11-21  Tor Lillqvist  <tml@iki.fi>

* gdk/gdk.c (gdk_keyval_convert_case): Fix typo.

* gdk/gdkconfig.h.win32: New file.

* gdk/win32/makefile.cygwin: Build just a static archive here.

* gdk/makefile.cygwin: New file. Get the win32-specific stuff
for the DLL from the static archive built above.

* gdk/gdk.def: Moved here from the win32 subdirectory.

* gdk/win32/*: Adapt for the changed private struct organisation.

* gtk/makefile.{cygwin,msc}: Get gdk library from ../gdk now.
1999-11-21 21:21:58 +00:00