gtk2/gdk
Tor Lillqvist 63f745738d gdk/win32/gdkprivate-win32.h New flags _gdk_input_locale_is_ime and
2003-07-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: New flags _gdk_input_locale_is_ime
	and _gdk_keyboard_has_altgr.

	* gdk/win32/gdkevents-win32.c: Lots of changes. Most important
	ones detailled here.

	Code that has been ifdeffed out for a long time removed. Remove
	some really old doc comments that were left behind for some public
	functions, the official ones are in the X11 backend anyway. Change
	GDK_WINDOW_OBJECT() calls to GdkWindowObject casts. Reformat
	multi-line boolean expressions to have the operators at ends of
	lines.

	As mouse capture with SetCapture() indeed seems to work OK, no
	need to have the correspoinding macro USE_SETCAPTURE and ifdefs.

	Ifdef out the gdk-ping-msg stuff. I don't remember why it was
	needed at some time, and things seem to work fine now without
	(knock on wood).

	Ifdef out the search for some Latin locale keyboard layout being
	loaded. Not used currently, but might be needed after all, if we
	decide that we want to be able to generate ASCII control character
	events with a non-Latin keyboard.

	(assign_object): New helper function, handles the g_object_ref()
	and unref() calls when assigning GObject pointers.

	(generate_crossing_events): Also generate the GDK_NOTIFY_INTERIOR
	enter event when the pointer has moved to an ancestor window. Was
	left out by mistake.

	(gdk_window_is_ancestor): Renamed from gdk_window_is_child().

	(gdk_pointer_grab, gdk_pointer_ungrab): Implement the confine_to
	functionality, using ClipCursor().

	(find_window_for_mouse_event): Splice part of code into new
	function find_real_window_for_grabbed_mouse_event().

	(fixup_event, append_event, apply_filters): New functions, code
	refactored out from elsewhere.

	(synthesize_enter_or_leave_event, synthesize_leave_event,
	synthesize_enter_event,
	synthesize_leave_events,synthesize_enter_events): Also take a
	GdkCrossingMode parameter, in preparation to generating
	GDK_CROSSING_GRAB and GDK_CROSSING_UNGRAB events.

	(fixup_event, append_event, fill_key_event_string): New functions,
	code refactoring.

	(vk_from_char, build_keypress_event, build_keyrelease_event):
	Removed as part of dropping WM_CHAR handling.

	(build_key_event_state,gdk_event_translate): Call
	GetKeyboardState(), once, for each keyboard message, instead of
	several calls to GetKeyState() here and there.

	(gdk_event_translate): Fix bugs #104516, #104662, #115902. While
	at it, do some major refactoring, and some fixes for potential
	problems noticed while going through the code.

	Don't handle WM_CHAR at all. Only handle WM_KEYDOWN and
	WM_KEYUP. Don't need the state variables related to whether to
	wait for WM_CHAR or not, and whether the current key is
	AltGr. Remove lots of complexity. Thus don't need the
	use_ime_composition flag.

	Not handling WM_CHAR means dead key handling will have to be taken
	care of by GTK, but that seems to work fine, so no worry.

	Another side-effect is that Alt+keypad digits don't work any
	longer, but it's better to learn to use GTK's ISO14755 support is
	anyway.

	Be more careful in checking whether AltGr is involved. Only
	attempt to handle it if the keyboard actually has it. And
	explicitly check for *left* Control plus *right* Alt being
	pressed. Still, allow (left) Alt and/or (right) Control with AltGr
	chars.

	Handle keys using similar code as in the X11 backend. As we have
	built a keymap in gdkkeys-win32.c anyway, use it by calling
	gdk_keymap_translate_keyboard_state() to look up the keysym from
	the virtual key code and keyboard state. Build the key event
	string in exactly the same way as the X11 backend.

	If an IME is being used, don't generate GDK events for keys
	between receiving WM_IME_STARTCOMPOSITION and
	WM_IME_ENDCOMPOSITION, as those keys are for the IME.

	For WM_IME_COMPOSITION, handle all the Unicode chars returned from
	the IME, not just the first one.

	gdk_event_translate() is still quite complex, could split the
	message handler cases out into separate functions.

	On mouse events, when the mouse is grabbed, use
	find_real_window_for_grabbed_mouse_event() in order to be able to
	generate correct crossing events.

	No longer take a pre-allocated GdkEvent as parameter. Instead,
	allocate events as needed and append them to the queue. (This is
	different from how gdk_event_translate() in the X11 backend
	works.) This change made the code much clearer, especially in the
	cases where we have to generate several GDK events for one Windows
	message.  Return FALSE if DefWindowProc() should be called, TRUE
	if not. If DefWindowProc() should not be called, also return the
	value to be returned from the window procedure.

	(Previously, the interaction with gdk_event_translate()'s caller
	was much more complex, when we had to indicate whether the
	already-queued event should be left in the queue or removed, and
	in addition also had to indicate whether to call DefWindowProc()
	or not, and what value to return from the window procedure if
	not.)

	Don't use a separate "private" variable required to be pointing to
	the GdkWindowObject of the "window" variable at all times. Just
	use casts, even if looks a bit uglier.

	Notice destroyed windows as early as possible, and break out of
	the messsage switch.

	Use _gdk_pointer_root as current_window when the pointer is
	outside GDK's top-level windows.

	On WM_INPUTLANGCHANGE, set _gdk_input_locale_is_ime as
	appropriate, based on ImmIsIME().

	(gdk_event_translate, gdk_event_send_client_message_for_display,
	gdk_screen_broadcast_client_message): Implement client messages.
	Use a registered Windows message to pass GDK client messages. Note
	that the amount of user data is restricted to four bytes, as it is
	carried in the LPARAM. (The WPARAM is used for the message type
	"atom".)

	(real_window_procedure): Adapt for new gdk_event_translate()
	interface.

	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Set
	_gdk_input_locale_is_ime initially.

	* gdk/win32/gdkwindow-win32.c: Use g_object_ref()/unref() instead
	of g_colormap_ref()/unref().

	(gdk_window_new): Made code a bit more like the X11 one, pretend
	to handle screens (although we just have one for now).

	* gdk/x11/gdkevents-x11.c
	(gdk_event_send_client_message_for_display,
	gdk_screen_broadcast_client_message): Document the user data
	limitation on Win32.

	* gdk/win32/gdkevents-win32.c (print_event): More complete enter
	and leave notify detail output.

	* gdk/win32/gdkkeys-win32.c (update_keymap): Make dead keys
	visible to GDK and GTK. Store the corresponding GDK_dead_* keysym
	for those, so that the GtkIMContextCimple compose tables will
	work. Deduce if the keyboard layout has the AltGr key, and set the
	above flag accordingly.
2003-07-26 01:54:59 +00:00
..
linux-fb Use asynchronously _gdk_x11_set_input_focus_safe to avoid having to trap 2003-07-05 01:54:05 +00:00
win32 gdk/win32/gdkprivate-win32.h New flags _gdk_input_locale_is_ime and 2003-07-26 01:54:59 +00:00
x11 gdk/win32/gdkprivate-win32.h New flags _gdk_input_locale_is_ime and 2003-07-26 01:54:59 +00:00
.cvsignore dear cvs, please SHUT UP love, -kris 2003-07-09 17:57:51 +00:00
COPYING [ Merges from gtk-1-2 ] 1999-09-28 20:19:13 +00:00
gdk.c Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
gdk.def new file to build it all ... added to EXTRA_DIST 2003-07-20 15:50:14 +00:00
gdk.h Deprecate gtk_paned_computed_position(). (#97077) 2003-01-31 00:08:35 +00:00
gdkcolor.c Add "Since" information. 2002-12-06 00:10:20 +00:00
gdkcolor.h add -DGDK_DISABLE_DEPRECATED 2002-11-17 22:04:03 +00:00
gdkconfig.h.win32 Massive changes. Too many to list here, but I'll try a summary: 2002-02-17 00:25:05 +00:00
gdkcursor.c Renames: 2002-06-20 23:59:27 +00:00
gdkcursor.h Check for Xcursor. 2003-06-30 22:30:54 +00:00
gdkdisplay.c Merge from stable. 2003-07-09 18:00:21 +00:00
gdkdisplay.h Use asynchronously _gdk_x11_set_input_focus_safe to avoid having to trap 2003-07-05 01:54:05 +00:00
gdkdisplaymanager.c Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
gdkdisplaymanager.h Renames: 2002-06-20 23:59:27 +00:00
gdkdnd.c Fix doc comment. 2002-10-25 00:01:15 +00:00
gdkdnd.h docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml 2002-11-08 19:41:50 +00:00
gdkdraw.c Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
gdkdrawable.h add -DGDK_DISABLE_DEPRECATED 2002-11-17 22:04:03 +00:00
gdkevents.c Fix for the case when gdk_event_copy() is called on a non-allocated event. 2003-04-18 21:24:43 +00:00
gdkevents.h Add a 'type' parameter, make public. 2002-10-03 20:53:30 +00:00
gdkfont.c Add "Since" information. 2002-12-06 00:10:20 +00:00
gdkfont.h add -DGDK_DISABLE_DEPRECATED 2002-11-17 22:04:03 +00:00
gdkgc.c add -DG_DISABLE_DEPRECATED and -DGDK_PIXBUF_DISABLE_DEPRECATED to compile 2002-09-25 07:23:55 +00:00
gdkgc.h Start of integration of Erwann Chenede's multihead work from the 2002-04-25 22:29:14 +00:00
gdkglobals.c Add a --screen option for setting the default screen. (Based on a patch 2002-10-31 21:12:23 +00:00
gdki18n.h Deprecate GtkPreviewType, GtkSignalRunType, GtkSideType, 2002-01-30 02:01:10 +00:00
gdkimage.c add -DG_DISABLE_DEPRECATED and -DGDK_PIXBUF_DISABLE_DEPRECATED to compile 2002-09-25 07:23:55 +00:00
gdkimage.h Fix docs. (#66383) 2001-12-06 21:38:12 +00:00
gdkinput.h docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml 2002-11-08 19:41:50 +00:00
gdkinternals.h Add a --screen option for setting the default screen. (Based on a patch 2002-10-31 21:12:23 +00:00
gdkintl.h Add a singleton object that we can use to get notification when displays 2002-06-20 23:29:19 +00:00
gdkkeynames.c Patch from Vasilis Vasaitis to fix Greek_IOTAdi[a]eresis inconsistency and 2003-05-14 21:46:59 +00:00
gdkkeys.c Associate the keys_changed virtual function with the keys_changed signal. 2003-02-19 19:32:10 +00:00
gdkkeys.h Add a keys_changed signal emitted when the keymap changes. (#72148) 2002-09-23 21:35:00 +00:00
gdkkeysyms.h Patch from Vasilis Vasaitis to fix Greek_IOTAdi[a]eresis inconsistency and 2003-05-14 21:46:59 +00:00
gdkkeyuni.c Patch from Vasilis Vasaitis to fix Greek_IOTAdi[a]eresis inconsistency and 2003-05-14 21:46:59 +00:00
gdkmarshalers.list New demo for window migration between different displays and screens. 2002-08-01 23:43:13 +00:00
gdkpango.c When drawing underlines, join up adjacent runs where possible, so we don't 2003-06-04 23:47:23 +00:00
gdkpango.h Start of integration of Erwann Chenede's multihead work from the 2002-04-25 22:29:14 +00:00
gdkpixbuf-drawable.c swap G and B. Fixes (#114669) 2003-06-08 16:15:16 +00:00
gdkpixbuf-render.c Deprecate. (#60582) 2003-01-31 00:37:38 +00:00
gdkpixbuf.h Deprecate. (#60582) 2003-01-31 00:37:38 +00:00
gdkpixmap.c update to allow a GdkDrawable instead of a GdkWindow. 2002-12-09 23:34:49 +00:00
gdkpixmap.h update to allow a GdkDrawable instead of a GdkWindow. 2002-12-09 23:34:49 +00:00
gdkpoly-generic.h Merge no-flicker branch into HEAD 2000-03-28 01:24:44 +00:00
gdkpolyreg-generic.c Fix some reported (but not significant) UMR's from purify. (#73160, Morten 2002-03-01 22:01:51 +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 Start of integration of Erwann Chenede's multihead work from the 2002-04-25 22:29:14 +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 ----:---F1 gdkregion-generic.c (CGTK CVS:1.11 Abbrev)--L1696--96%---------Fri Aug 2 16:38:34 2002 Owen Taylor <otaylor@redhat.com> 2002-08-02 20:39:40 +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 added a missing cast. 2003-06-02 14:14:41 +00:00
gdkrgb.h Start of integration of Erwann Chenede's multihead work from the 2002-04-25 22:29:14 +00:00
gdkscreen.c gdk/gdkscreen.c (gdk_screen_get_monitor_at_point) Provide a useful 2002-12-14 05:27:23 +00:00
gdkscreen.h Add a --screen option for setting the default screen. (Based on a patch 2002-10-31 21:12:23 +00:00
gdkselection.c Start implementing display/screen closing scheme; keep a flag for whether 2002-08-01 15:28:40 +00:00
gdkselection.h docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml 2002-11-08 19:41:50 +00:00
gdktypes.h Start of integration of Erwann Chenede's multihead work from the 2002-04-25 22:29:14 +00:00
gdkvisual.c Renames: 2002-06-20 23:59:27 +00:00
gdkvisual.h Changes multihead reorganizing code for win32 support, mostly from a patch 2002-06-06 00:26:42 +00:00
gdkwindow.c Merge from stable. 2003-07-09 18:00:21 +00:00
gdkwindow.h add -DGDK_DISABLE_DEPRECATED 2002-11-17 22:04:03 +00:00
makeenums.pl Add GdkEventSetting event for notification of changes to system settings, 2001-04-02 23:33:47 +00:00
Makefile.am Only include the Default and Emacs themes' gtkrc files. Include 2003-05-27 18:36:19 +00:00
makefile.msc new file to build it all ... added to EXTRA_DIST 2003-07-20 15:50:14 +00:00
testgdk.c Update. 2000-10-09 19:49:42 +00:00