summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEntry.c
diff options
context:
space:
mode:
authordas <das>2007-06-06 09:55:52 (GMT)
committerdas <das>2007-06-06 09:55:52 (GMT)
commitadc0bc4faa9cf2596b856fd534befb42fab5d366 (patch)
tree480bc4a2a26bcba12a790acc330f4781adc0e2e5 /macosx/tkMacOSXEntry.c
parent9f684a33310103c2c81b8afa31efbf646c5354ee (diff)
downloadtk-adc0bc4faa9cf2596b856fd534befb42fab5d366.zip
tk-adc0bc4faa9cf2596b856fd534befb42fab5d366.tar.gz
tk-adc0bc4faa9cf2596b856fd534befb42fab5d366.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. * macosx/Wish.xcodeproj/project.pbxproj: add settings for Fix&Continue.
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 5d19ca3..38c35f4 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.9 2007/06/03 13:44:40 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.10 2007/06/06 09:55:52 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;
}
/*