gtk/gdk
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
..
linux-fb gdk/linux-fb/gdkdrawable-fb2.c update to latest Pango API 2001-11-24 21:52:50 +00:00
nanox Make gdkx.h the only installed header from gdk/x11. All structures in 2001-09-07 21:50:20 +00:00
win32 Apply the same fixes and improvements as to the gtk-1-3-win32-production 2002-01-10 00:53:39 +00:00
x11 Check for RENDER before trying to use it... XRenderFindFormat() prints 2002-01-09 15:23:30 +00:00
.cvsignore shut up CVS 2001-04-03 23:11:15 +00:00
COPYING [ Merges from gtk-1-2 ] 1999-09-28 20:19:13 +00:00
gdk.c *** empty log message *** 2001-12-11 01:08:33 +00:00
gdk.def use g_strcasecmp(), some poor platforms don't have strcasecmp() 2001-11-09 21:52:52 +00:00
gdk.h Add a function, gdk_threads_init() that must be explicitely called to 2001-10-22 12:59:21 +00:00
gdkcolor.c 1.3.12, interface, binary age 0. 2001-12-23 22:59:30 +00:00
gdkcolor.h Deprecate. (#65851) 2001-12-05 00:06:40 +00:00
gdkconfig.h.win32 Fix typo. 1999-11-21 21:21:58 +00:00
gdkcursor.c Update to use the new g_boxed_type_register_static API. 2001-09-10 16:54:07 +00:00
gdkcursor.h Directly include the contents of gdkcursors.h in the GdkCursorType enum. 2001-11-28 18:38:43 +00:00
gdkdnd.h Deprecate. 2001-11-30 22:55:28 +00:00
gdkdraw.c need to cast image->mem away from void* to avoid 'error C2036: 'void *' : 2002-01-05 19:07:13 +00:00
gdkdrawable.h Private function to tell if we have RENDER extension. 2002-01-04 05:58:01 +00:00
gdkevents.c Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy 2001-12-04 17:12:35 +00:00
gdkevents.h !GTK_OBJECT_DESTROYED() -> GTK_WIDGET_REALIZE() for resize queueing. 2001-06-28 22:49:20 +00:00
gdkfont.c Forget gdkfont 2001-09-10 16:57:38 +00:00
gdkfont.h added all exports required to link PyGtk 0.7.1 2001-04-16 12:46:02 +00:00
gdkgc.c 1.3.12, interface, binary age 0. 2001-12-23 22:59:30 +00:00
gdkgc.h Explicitely deprecate gdk_gc_set_font() (reported by Jeff Franks.) 2001-12-18 21:17:49 +00:00
gdkglobals.c Updates. 2001-10-29 07:06:37 +00:00
gdki18n.h applied patch from Andreas Persenius <ndap@swipnet.se> that updates the 2000-07-26 11:33:08 +00:00
gdkimage.c Private function to tell if we have RENDER extension. 2002-01-04 05:58:01 +00:00
gdkimage.h Fix docs. (#66383) 2001-12-06 21:38:12 +00:00
gdkinput.h Make gdkx.h the only installed header from gdk/x11. All structures in 2001-09-07 21:50:20 +00:00
gdkinternals.h Private function to tell if we have RENDER extension. 2002-01-04 05:58:01 +00:00
gdkkeys.c Throughout: assorted docs 2001-10-03 18:19:48 +00:00
gdkkeys.h Fix prototype for direction_changed. (Reported by Jeff Franks.) 2001-12-18 21:10:04 +00:00
gdkkeysyms.h Directly include the contents of gdkcursors.h in the GdkCursorType enum. 2001-11-28 18:38:43 +00:00
gdkkeyuni.c Handle numeric keypad keysyms; bug #50201 2001-04-18 20:33:26 +00:00
gdkpango.c Patch from Hidetoshi Tajima to fix bad match error when target drawable is 2001-11-30 21:14:07 +00:00
gdkpango.h Doc fixes 2001-03-04 00:12:55 +00:00
gdkpixbuf-drawable.c need to cast image->mem away from void* to avoid 'error C2036: 'void *' : 2002-01-05 19:07:13 +00:00
gdkpixbuf-render.c need to cast image->mem away from void* to avoid 'error C2036: 'void *' : 2002-01-05 19:07:13 +00:00
gdkpixbuf.h Deprecate gdk_set/get_use_xshm, make gdk_set_use_xshm a noop. Remove 2001-09-07 22:33:09 +00:00
gdkpixmap.c Private function to tell if we have RENDER extension. 2002-01-04 05:58:01 +00:00
gdkpixmap.h Add gdk_window_lookup, gdk_window_foreign_new, gdk_pixmap_lookup and 2001-10-18 20:23:17 +00:00
gdkpoly-generic.h Merge no-flicker branch into HEAD 2000-03-28 01:24:44 +00:00
gdkpolyreg-generic.c Merge no-flicker branch into HEAD 2000-03-28 01:24:44 +00:00
gdkprivate.h Make gdkx.h the only installed header from gdk/x11. All structures in 2001-09-07 21:50:20 +00:00
gdkproperty.h Use $PKG_CONFIG, not pkg-config. (#51032) 2001-05-29 21:42:20 +00:00
gdkrectangle.c Update to use the new g_boxed_type_register_static API. 2001-09-10 16:54:07 +00:00
gdkregion-generic.c use _gdk_region_get_xrectangles() 2001-03-02 20:02:17 +00:00
gdkregion-generic.h (Part 2) Remove gdk_*_lookup() defines, since they are defined by the 2000-07-24 16:19:00 +00:00
gdkregion.h use _gdk_region_get_xrectangles() 2001-03-02 20:02:17 +00:00
gdkrgb.c Private function to tell if we have RENDER extension. 2002-01-04 05:58:01 +00:00
gdkrgb.h [ Patch from Sebastian Wilhelmi, 52790 ] 2001-08-23 15:26:49 +00:00
gdkselection.h these should be 31, not 3. Hooray for Xatoms (and not using the XA_* 2001-10-31 21:52:29 +00:00
gdktypes.h Deprecate. (#65851) 2001-12-05 00:06:40 +00:00
gdkvisual.h Deprecate. 2001-11-30 22:55:28 +00:00
gdkwindow.c Private function to tell if we have RENDER extension. 2002-01-04 05:58:01 +00:00
gdkwindow.h Fix docs. (#66383) 2001-12-06 21:38:12 +00:00
makeenums.pl Add GdkEventSetting event for notification of changes to system settings, 2001-04-02 23:33:47 +00:00
Makefile.am Remove reference to gdkcursors.h. 2001-11-28 19:32:18 +00:00
makefile.mingw.in Updates. 2001-10-29 07:06:37 +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
testgdk.c Update. 2000-10-09 19:49:42 +00:00
TODO Make gdkx.h the only installed header from gdk/x11. All structures in 2001-09-07 21:50:20 +00:00