gtk2/gdk/win32
Tor Lillqvist 1b7cff4755 Apply the same fixes and improvements as to the gtk-1-3-win32-production
2002-01-10  Tor Lillqvist  <tml@iki.fi>

	Apply the same fixes and improvements as to the
	gtk-1-3-win32-production branch: Bug fixes and cleanup of
	selection and DND functionality. Still doesn't work as well as the
	win32-production branch, though, but getting closer.

	After this, need to add Archaeopteryx Software's OLE2 DND support.

	* gdk/win32/gdkselection-win32.c (gdk_selection_owner_set,
	gdk_selection_send_notify, generate_selection_notify): Don't use
	SendMessage() to generate events for the same app, instead use
	gdk_event_put().

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkevents-win32.c: Thus, remove declaration, definition,
	initialisation and handling of gdk_selection_notify_msg,
	gdk_selection_request_msg and gdk_selection_clear_msg.

	* gdk/win32/gdkselection-win32.c (gdk_text_property_to_text_list,
	gdk_free_text_list, gdk_string_to_compound_text,
	gdk_free_compound_text): Implement trivially, witrh a text_list
	always having a single element, and a compound text always
	consisting of just a single (UTF-8!) string. Let's see how well
	this works.

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Fix
	non-ASCII paste from the clipboard: Try getting the same formats
	from the Windows clipboard that gdk_property_change() puts there:
	CF_UNICODETEXT, UTF8_STRING or CF_TEXT+CF_LOCALE.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): When
	storing text on the clipboard, handle non-ASCII text
	correctly. The logic is as follows:

	If we have only ASCII characters, use CF_TEXT.

	Else, if we are on NT, use CF_UNICODETEXT.

	Else (we are on Win9x), if all the characters are present in the
	code page of some installed locale, use CF_TEXT and also set
	CF_LOCALE to that locale.

	Else (still on Win9x) store as RTF. We use a very simple RTF
	string, just the text, no fonts or other crap, with the non-ASCII
	characters as Unicode \uN keywords. Additionally, also store the
	UTF-8 string as such, under the format "UTF8_STRING", so that GDK
	can also paste from the Clipboard what it has copied there. (Thus
	no need to implement any RTF parser.)

	(find_common_locale): New function, implements the search for a
	locale for case 3 above.

	* gdk/win32/gdkglobals-win32.c: New global variables
	compound_text, text_uri_list, utf8_string, cf_rtf and
	cf_utf8_string.

	* gdk/win32/gdkim-win32.c (_gdk_ucs2_to_utf8): New function,
	converts from a wchar_t string to UTF-8.
	(_gdk_utf8_to_ucs2): Rename from _gdk_win32_nmbstowchar_ts.
	(_gdk_utf8_to_wcs): Rename from gdk_nmbstowchar_ts.

	* gdk/win32/gdkevents-win32.c (build_keypress_event): Use
	_gdk_ucs2_to_utf8().

	* gdk/win32/gdkselection-win32.c: Remove some unnecessary logging.

	* gdk/win32/gdkdnd-win32.c: Plug memory leaks, the
	gdk_drag_context_ref() was called unnecessarily in a couple of
	places, meaning drag contexts were never freed. The same memory
	leaks seem to be present in gdk/linux-fb/gdkselection-fb.c, BTW.

	(gdk_drop_reply): For WIN32_DROPFILES drops, free the temporarily
	stored file list.

	* gdk/win32/gdkselection-win32.c: Clarify the use of the
	sel_prop_table. Now it is used only for storing the GDK_SELECTION
	"properties".

	The file names dropped with WM_DROPFILES -style DND is stored
	temporarily (between the drop and the target picking them up) in a
	separate place.

	Have a separate hash table to map selection atoms to owner
	windows. This used to be quite mixed up.

	(_gdk_dropfiles_store): New function, to store the dropped file
	list for the drop target to possibly fetch, and clear it
	afterwards, from gdk_drop_reply().

	(gdk_selection_owner_get): Much simplified now.
2002-01-10 00:53:39 +00:00
..
rc New file, hand-written wrapper for the Wintab library. 2001-10-29 06:50:55 +00:00
.cvsignore Remove conftest* after use along the lines of AC_TRY_COMPILE. 2000-09-05 14:07:55 +00:00
bdfcursor.c Update. Mention the gtk-1-3-win32-production branch. 2001-02-23 03:51:41 +00:00
gdkcolor-win32.c Implement gdk_color_parse() in terms of pango_color_parse(). 2001-11-05 00:23:45 +00:00
gdkcursor-win32.c New file, hand-written wrapper for the Wintab library. 2001-10-29 06:50:55 +00:00
gdkdnd-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkdrawable-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkdrawable-win32.h New file, hand-written wrapper for the Wintab library. 2001-10-29 06:50:55 +00:00
gdkevents-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkfont-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkgc-win32.c Append EXEEXT to ../gdk-pixbuf/gdk-pixbuf-csource. 2002-01-01 22:17:09 +00:00
gdkgeometry-win32.c make it compile with msvc: !HAVE_UNISTD_H; no label without op, even if 2001-11-18 15:37:13 +00:00
gdkglobals-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkim-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkimage-win32.c need to cast image->mem away from void* to avoid 'error C2036: 'void *' : 2002-01-05 19:07:13 +00:00
gdkinput-win32.c Append EXEEXT to ../gdk-pixbuf/gdk-pixbuf-csource. 2002-01-01 22:17:09 +00:00
gdkinput-win32.h Make gdkx.h the only installed header from gdk/x11. All structures in 2001-09-07 21:50:20 +00:00
gdkinput.c Make gdkx.h the only installed header from gdk/x11. All structures in 2001-09-07 21:50:20 +00:00
gdkkeys-win32.c updated externals 2001-06-22 14:08:51 +00:00
gdkmain-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkpango-win32.c Add makefile.mingw.in to EXTRA_DIST. 2000-07-30 08:11:28 +00:00
gdkpixmap-win32.c need to cast image->mem away from void* to avoid 'error C2036: 'void *' : 2002-01-05 19:07:13 +00:00
gdkpixmap-win32.h static correct-ness, underscore prefixing of library internal functions 2001-10-28 21:28:51 +00:00
gdkprivate-win32.h Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkproperty-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkselection-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkvisual-win32.c use g_strcasecmp(), some poor platforms don't have strcasecmp() 2001-11-09 21:52:52 +00:00
gdkwin32.h New file, hand-written wrapper for the Wintab library. 2001-10-29 06:50:55 +00:00
gdkwin32id.c GCompareFunc -> GEqualFunc where applicable. 2000-11-13 13:15:41 +00:00
gdkwindow-win32.c Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
gdkwindow-win32.h static correct-ness, underscore prefixing of library internal functions 2001-10-28 21:28:51 +00:00
libie55uuid.la Add headers. Add section about ActiveIMM. 2001-11-08 20:57:18 +00:00
libwntab32x.la Add headers. Add section about ActiveIMM. 2001-11-08 20:57:18 +00:00
Makefile.am Add headers. Add section about ActiveIMM. 2001-11-08 20:57:18 +00:00
makefile.mingw.in New function, copied from X11 version. 2001-02-11 11:00:14 +00:00
makefile.msc need to cast image->mem away from void* to avoid 'error C2036: 'void *' : 2002-01-05 19:07:13 +00:00
xcursors.h Update. Mention the gtk-1-3-win32-production branch. 2001-02-23 03:51:41 +00:00