summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyEvent.c
diff options
context:
space:
mode:
authordas <das>2006-07-20 06:25:18 (GMT)
committerdas <das>2006-07-20 06:25:18 (GMT)
commit472701c8e65c0becd4620bce71070564d0569287 (patch)
tree908cf8a88b6a313743cec6481241735b0ff1f9d2 /macosx/tkMacOSXKeyEvent.c
parent516d2a2413bfa3330b641f88c3a940a54f790a60 (diff)
downloadtk-472701c8e65c0becd4620bce71070564d0569287.zip
tk-472701c8e65c0becd4620bce71070564d0569287.tar.gz
tk-472701c8e65c0becd4620bce71070564d0569287.tar.bz2
* macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support
* unix/tkUnixSend.c (Tk_GetUserInactiveTime): for weakly importing symbols not available on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run on earlier ones. * macosx/Wish.xcodeproj/project.pbxproj: enable weak-linking; turn on extra warnings. * macosx/README: document how to enable weak-linking; cleanup. * unix/configure.in: add check on Darwin-X11 for ld support of -weak-l * unix/tcl.m4: flag and weak-link libXss if possible as it is not available before OSX 10.4; enforce requirement of OSX 10.2 for TkAqua; move Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; cleanup quoting and help messages. * unix/configure: autoconf-2.59 * unix/tkConfig.h.in: autoheader-2.59 * macosx/GNUmakefile: enable xft for TkX11 build. * macosx/tkMacOSXFont.c (TkMacOSXQuarzStartDraw, TkMacOSXQuarzEndDraw): verify validity of context returned from QDBeginCGContext() before use. * macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr. * macosx/tkMacOSXEvent.h: standardize MAC_OS_X_VERSION_MAX_ALLOWED * macosx/tkMacOSXMenu.c: checks per QA1316, ensure define can be * macosx/tkMacOSXMenubutton.c: overriden on command line (from default * macosx/tkMacOSXMenus.c: of current OS version). * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXFont.c (TkpMeasureCharsInContext): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
Diffstat (limited to 'macosx/tkMacOSXKeyEvent.c')
-rw-r--r--macosx/tkMacOSXKeyEvent.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 0201054..070c3d4 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -54,12 +54,18 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.15 2006/05/12 18:17:48 das Exp $
+ * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.16 2006/07/20 06:25:19 das Exp $
*/
#include "tkMacOSXInt.h"
#include "tkMacOSXEvent.h"
+/*
+#ifdef TK_MAC_DEBUG
+#define TK_MAC_DEBUG_KEYBOARD
+#endif
+*/
+
typedef struct {
WindowRef whichWindow;
int global_x, global_y;
@@ -563,8 +569,7 @@ InitKeyEvent(
* duplicate enums and typedefs would give errrors.
*/
-#if !defined(MAC_OS_X_VERSION_10_2) || \
- (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2)
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1020
#define KeyboardLayoutRef Ptr
#define KeyboardLayoutPropertyTag UInt32
#define kKLKCHRData 0
@@ -643,7 +648,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr)
if ((lastLayout != currentLayout)
|| (lastLayoutId != currentLayoutId)) {
-#ifdef TK_MAC_DEBUG
+#ifdef TK_MAC_DEBUG_KEYBOARD
fprintf (stderr, "GetKeyboardLayout(): Use KLS\n");
#endif
@@ -684,7 +689,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr)
if ((lastLayout == NULL) || (lastLayoutId != currentLayoutId)) {
-#ifdef TK_MAC_DEBUG
+#ifdef TK_MAC_DEBUG_KEYBOARD
fprintf (stderr, "GetKeyboardLayout(): Use GetResource()\n");
#endif
@@ -719,7 +724,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr)
if (hasLayoutChanged) {
-#ifdef TK_MAC_DEBUG
+#ifdef TK_MAC_DEBUG_KEYBOARD
if (KCHR != NULL) {
fprintf (stderr, "GetKeyboardLayout(): New 'KCHR' layout %d\n",
(int) (short) currentLayoutId);
@@ -747,7 +752,7 @@ GetKeyboardLayout (Ptr * resourcePtr, TextEncoding * encodingPtr)
if (KCHR != NULL) {
lastEncoding = GetKCHREncoding(currentKeyScript, currentLayoutId);
-#ifdef TK_MAC_DEBUG
+#ifdef TK_MAC_DEBUG_KEYBOARD
fprintf (stderr, "GetKeyboardLayout(): New 'KCHR' encoding %lu "
"(%lu + 0x%lX)\n",
lastEncoding, lastEncoding & 0xFFFFL,