summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEntry.c
diff options
context:
space:
mode:
authordas <das>2007-06-06 09:56:53 (GMT)
committerdas <das>2007-06-06 09:56:53 (GMT)
commitce5acb5ed756f94b279f428e363bb885ab971d01 (patch)
tree0f31e25d4ca595727ac6e0b38a271fa4d9ad77bb /macosx/tkMacOSXEntry.c
parent14f8f936349132e0f6dc66230d2378d47d0968d7 (diff)
downloadtk-ce5acb5ed756f94b279f428e363bb885ab971d01.zip
tk-ce5acb5ed756f94b279f428e363bb885ab971d01.tar.gz
tk-ce5acb5ed756f94b279f428e363bb885ab971d01.tar.bz2
* macosx/tkMacOSXMouseEvent.c (GenerateMouseWheelEvent): enable
processing of mousewheel events in background windows. * macosx/tkMacOSXScrlbr.c: modernize checks for active/front window. * macosx/tkMacOSXScale.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXColor.c: factor out verbose #ifdef checks of * macosx/tkMacOSXDraw.c: MAC_OS_X_VERSION_{MAX_ALLOWED,MIN_REQUIRED} * macosx/tkMacOSXEntry.c: and runtime checks of kHIToolboxVersion into * macosx/tkMacOSXEvent.c: new TK_{IF,ELSE,ENDIF}_MAC_OS_X macros. * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXDraw.c: factor out clip clearing in QD ports; * macosx/tkMacOSXEntry.c: formatting cleanup.
Diffstat (limited to 'macosx/tkMacOSXEntry.c')
-rw-r--r--macosx/tkMacOSXEntry.c51
1 files changed, 24 insertions, 27 deletions
diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c
index c412f31..8533932 100644
--- a/macosx/tkMacOSXEntry.c
+++ b/macosx/tkMacOSXEntry.c
@@ -53,7 +53,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.2.2.9 2007/06/04 09:28:44 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.2.2.10 2007/06/06 09:56:54 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -80,40 +80,37 @@ static ThemeButtonKind ComputeIncDecParameters (int height, int *width);
*--------------------------------------------------------------
*/
static ThemeButtonKind
-ComputeIncDecParameters (int height, int *width)
+ComputeIncDecParameters(int height, int *width)
{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- if (1
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1030
- && &kHIToolboxVersionNumber != NULL
- && kHIToolboxVersionNumber >= kHIToolboxVersionNumber10_3
-#endif
- ) {
+ ThemeButtonKind kind;
+
+ TK_IF_MAC_OS_X_HI_TOOLBOX (3,
if (height < 11 || height > 28) {
*width = 0;
- return (ThemeButtonKind) 0;
- }
-
- if (height >= 21) {
- *width = 13;
- return kThemeIncDecButton;
- } else if (height >= 18) {
- *width = 12;
- return kThemeIncDecButtonSmall;
+ kind = (ThemeButtonKind) 0;
} else {
- *width = 11;
- return kThemeIncDecButtonMini;
+ if (height >= 21) {
+ *width = 13;
+ kind = kThemeIncDecButton;
+ } else if (height >= 18) {
+ *width = 12;
+ kind = kThemeIncDecButtonSmall;
+ } else {
+ *width = 11;
+ kind = kThemeIncDecButtonMini;
+ }
}
- } else
-#endif
- {
+ ) TK_ELSE_MAC_OS_X (3,
if (height < 21 || height > 28) {
*width = 0;
- return (ThemeButtonKind) 0;
+ kind = (ThemeButtonKind) 0;
+ } else {
+ *width = 13;
+ kind = kThemeIncDecButton;
}
- *width = 13;
- return kThemeIncDecButton;
- }
+ ) TK_ENDIF_MAC_OS_X
+
+ return kind;
}
/*