gtk2/gdk
Руслан Ижбулатов 5e6c1928b4 W32: Prefer the deadkey combinations that the OS uses
Pick the W32 API for possible deadkey+<something> combinations
and prefer these to other sources of deadkey combos.
Specifically, if W32 API supports at least one combo for a particular
deadkey, only use that data and do not attempt to do other, unsupported
combinations, even if they make sense otherwise.
This is needed to, for example, correctly support US-International
keyboard layout, which produces a combined character for <' + a>
combo, but not for <' + s>, for example.

This is achieved by stashing all the deadkeys that we find in
an array, then doing extra loop through all virtual key codes and
trying to combine them with each of these deadkeys. Any combinations
that produce a single character are cached for later use.

In GTK Simple IM context, call a new GDK W32 function to do a lookup
on that cached combination table early on, among the "special cases"
(which are now partially obsolete).

A limitation of this code is that combinations with more than
one deadkey are not supported, except for combinations that consist
entirely of 2 known deadkeys. The upshot is that lookups should
be relatively fast, as deadkey array stays small and the combination
tree stays shallow.

Note that the use of ToUnicodeEx() seems suboptimal, as it should
be possible to just load a keyboard library (KBD*.DLL) manually
and obtain and use its key table directly. However, that is much more
complicated and would result in a significant rewrite of gdkkeys-win32.
The code from this commit, though hacky, is a direct addition to
existing code and should cover vast majority of the use-cases.

https://bugzilla.gnome.org/show_bug.cgi?id=569581
2016-08-04 16:37:19 +00:00
..
broadway Opt in to structured logging 2016-07-22 23:13:20 -04:00
deprecated gdkcolor.h: Use GDK_DEPRECATED_IN_3_14_FOR() throughout 2015-04-17 11:16:30 -05:00
mir Opt in to structured logging 2016-07-22 23:13:20 -04:00
quartz Opt in to structured logging 2016-07-22 23:13:20 -04:00
resources/glsl gl: Use a uniform to flip R and B colors on GLES 2016-04-25 14:33:36 +01:00
wayland Don't apply GDK_HINT_RESIZE_INC to GDK_WINDOW_STATE_TILED windows 2016-07-25 09:00:01 -04:00
win32 W32: Prefer the deadkey combinations that the OS uses 2016-08-04 16:37:19 +00:00
x11 Avoid a division by zero 2016-07-25 08:32:24 -04:00
COPYING
fallback-c89.c
gdk-autocleanup.h gdk: Add support for g_autoptr() 2015-02-02 09:28:22 +01:00
gdk-private.c gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdk-private.h gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdk.c gdk: actually fix the previous commit 2016-06-29 15:10:39 +02:00
gdk.h Add GdkDrawingContext 2016-06-09 17:45:40 +01:00
gdkapplaunchcontext.c
gdkapplaunchcontext.h
gdkapplaunchcontextprivate.h
gdkcairo.c gdkcairo: Bail if surface is in error 2015-02-25 01:55:28 +01:00
gdkcairo.h gdk: Deprecate gdk_cairo_create() 2016-06-09 17:45:40 +01:00
gdkconfig.h.win32
gdkconfig.h.win32_broadway
gdkcursor.c Update cursor docs 2016-05-17 14:16:39 -04:00
gdkcursor.h Update docs 2015-05-08 13:34:25 -04:00
gdkcursorprivate.h
gdkdeprecated.c
gdkdevice.c gdk: Add a private getter for GdkDevice::input-mode 2016-04-30 20:52:23 -04:00
gdkdevice.h gdk: Add GDK_SOURCE_TRACKPOINT 2016-06-01 09:31:17 -04:00
gdkdevicemanager.c Move GdkDeviceManager to deprecated section 2016-04-03 23:41:20 -04:00
gdkdevicemanager.h gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab() 2015-12-15 00:40:21 +01:00
gdkdevicemanagerprivate.h
gdkdeviceprivate.h gdk: Add a private getter for GdkDevice::input-mode 2016-04-30 20:52:23 -04:00
gdkdevicetool.c Move GdkDeviceTool into its own files 2016-04-09 15:48:34 -04:00
gdkdevicetool.h Move GdkDeviceTool into its own files 2016-04-09 15:48:34 -04:00
gdkdevicetoolprivate.h Move GdkDeviceTool into its own files 2016-04-09 15:48:34 -04:00
gdkdisplay.c Silence a compiler warning 2016-05-26 12:46:54 +01:00
gdkdisplay.h gdk: Fix parameter name mismatch 2016-05-08 15:34:28 +02:00
gdkdisplaymanager.c gdk: Add a way to show included backends 2016-02-18 22:03:12 -05:00
gdkdisplaymanager.h
gdkdisplaymanagerprivate.h
gdkdisplayprivate.h display: Add vfunc for get_monitor_at_window 2016-05-18 19:07:27 +02:00
gdkdnd.c gdk/dnd: Don't use default display when getting cursor 2016-04-26 23:03:24 +08:00
gdkdnd.h gdk: Add GdkDragCancelReason enum as argument to GdkDragContext::cancel 2016-02-15 18:35:51 +01:00
gdkdndprivate.h gdk/dnd: Don't use default display when getting cursor 2016-04-26 23:03:24 +08:00
gdkdrawingcontext.c gdk: Unset the DrawingContext <-> cairo_t link on dispose 2016-06-12 18:55:34 +01:00
gdkdrawingcontext.h Add GdkDrawingContext 2016-06-09 17:45:40 +01:00
gdkdrawingcontextprivate.h Add GdkDrawingContext 2016-06-09 17:45:40 +01:00
gdkenumtypes.c.template
gdkenumtypes.h.template Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkevents.c Forgotten rename 2016-05-10 15:32:25 -04:00
gdkevents.h Make gdk_event_get_pointer_emulated public 2016-05-10 15:16:45 -04:00
gdkframeclock.c Trivial whitespace fix 2016-04-30 21:06:38 -04:00
gdkframeclock.h Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkframeclockidle.c frame-clock: avoid g_signal_emit_by_name() 2016-04-18 15:33:53 -07:00
gdkframeclockidle.h
gdkframeclockprivate.h frametimings: reuse previous frame timing in common case 2016-04-26 09:06:07 -04:00
gdkframetimings.c frametimings: reuse previous frame timing in common case 2016-04-26 09:06:07 -04:00
gdkframetimings.h Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkgl.c gl: Use a uniform to flip R and B colors on GLES 2016-04-25 14:33:36 +01:00
gdkglcontext.c gl: Add a realize() fallback 2016-05-23 08:34:17 +01:00
gdkglcontext.h gl: Add 'use-es' flag 2016-04-25 12:29:36 +01:00
gdkglcontextprivate.h gl: Use a uniform to flip R and B colors on GLES 2016-04-25 14:33:36 +01:00
gdkglobals.c Add GDK_GL env var and GdkGLFlags 2014-11-06 12:24:43 +01:00
gdkinternals.h gdkwindow: store transient_for window 2016-07-19 09:38:54 -04:00
gdkintl.h
gdkkeynames.c
gdkkeys.c Clarify docs a bit 2016-04-15 22:22:48 -04:00
gdkkeys.h gdkkeys: Add support to _get_scroll_lock_state() 2015-04-27 20:07:52 -03:00
gdkkeysprivate.h gdkkeys: Add support to _get_scroll_lock_state() 2015-04-27 20:07:52 -03:00
gdkkeysyms-compat.h
gdkkeysyms-update.pl
gdkkeysyms.h
gdkkeyuni.c GDK W32: Cache multiple keyboard layouts simultaneously 2016-08-04 16:37:18 +00:00
gdkmain.h Make global GDK libgtk_only functions more private 2014-11-08 00:20:15 -05:00
gdkmarshalers.list gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdkmonitor.c GdkMonitor: Fix refresh-rate property 2016-05-02 12:42:13 -04:00
gdkmonitor.h gdk: Fix parameter name mismatch 2016-05-08 15:34:28 +02:00
gdkmonitorprivate.h Add GdkMonitor 2016-04-27 23:18:16 -04:00
gdkoffscreenwindow.c gdkoffscreenwindow: use embedder to derive surfaces & scale factor 2015-12-03 21:47:29 +00:00
gdkpango.c Add docs for new API 2016-04-18 11:46:58 -04:00
gdkpango.h Add gdk_pango_context_get_for_display 2016-04-18 07:04:44 -04:00
gdkpixbuf-drawable.c Fix the fix to the last commit 2015-12-16 12:42:27 +00:00
gdkpixbuf.h
gdkprivate.h Make gdk_event_get_pointer_emulated public 2016-05-10 15:16:45 -04:00
gdkproperty.c
gdkproperty.h
gdkrectangle.c Clarify docs for gdk_rectangle_union 2016-01-20 13:44:34 -05:00
gdkrectangle.h gdk: Add gdk_rectangle_equal() 2015-10-03 22:26:27 -04:00
gdkrgba.c Revert "Add missing (out) annotation to gdk_rgba_parse" 2016-02-02 15:08:10 +00:00
gdkrgba.h
gdkscreen.c screen: Implement old monitor apis generically 2016-04-27 23:18:16 -04:00
gdkscreen.h
gdkscreenprivate.h
gdkseat.c gdk: Add GdkSeat::tool-added/removed signals 2016-04-06 15:43:29 +02:00
gdkseat.h GdkSeat: Add G_BEGIN_DECLS and G_END_DECLS 2015-12-22 10:33:41 +01:00
gdkseatdefault.c Move GdkDeviceTool into its own files 2016-04-09 15:48:34 -04:00
gdkseatdefaultprivate.h GdkSeatDefault: Add functions to add/remove tools 2016-04-06 15:43:29 +02:00
gdkseatprivate.h gdk: Add GdkSeat::tool-added/removed signals 2016-04-06 15:43:29 +02:00
gdkselection.c
gdkselection.h
gdktestutils.h
gdkthreads.h
gdktypes.h gdktypes: Update docs for GDK_GRAB_FAILED 2016-06-03 00:44:45 -04:00
gdkversionmacros.h.in Add version macros for 3.22 2016-03-26 14:08:10 -04:00
gdkvisual.c Deprecate gdk_visual_get_colormap_size 2016-03-26 15:15:28 -04:00
gdkvisual.h Deprecate gdk_visual_get_colormap_size 2016-03-26 15:15:28 -04:00
gdkvisualprivate.h gdk: calculate pixel color shift and precision lazily 2016-02-27 12:27:54 +01:00
gdkwindow.c gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdkwindow.h gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdkwindowimpl.c gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdkwindowimpl.h gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdkx.h
gen-keyname-table.pl
keyname-table.h
keynames-translate.txt
keynames.txt
Makefile.am Opt in to structured logging 2016-07-22 23:13:20 -04:00
makefile.msc