diff options
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r-- | cocoa/PlatCocoa.mm | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index ca24c4b47..49be5ed69 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -12,6 +12,8 @@ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). */ +#import <ScintillaView.h> + #include "PlatCocoa.h" #include <cstring> @@ -25,8 +27,6 @@ #import <Foundation/NSGeometry.h> -#import <ScintillaView.h> - #import <Carbon/Carbon.h> // Temporary using namespace Scintilla; @@ -221,7 +221,6 @@ void SurfaceImpl::Release() bitmapHeight = 0; x = 0; y = 0; - //inited = false; } //-------------------------------------------------------------------------------------------------- @@ -1955,6 +1954,8 @@ unsigned int Platform::DoubleClickTime() { float threshold = [[NSUserDefaults standardUserDefaults] floatForKey: @"com.apple.mouse.doubleClickThreshold"]; + if (threshold == 0) + threshold = 0.5; return static_cast<unsigned int>(threshold / kEventDurationMillisecond); } @@ -1967,29 +1968,6 @@ bool Platform::MouseButtonBounce() //-------------------------------------------------------------------------------------------------- -bool Platform::IsKeyDown(int keyCode) -{ - return false; - // TODO: Map Scintilla/Windows key codes to Mac OS X key codes - // TODO: Do I need this? - /* - // Inspired by code at: http://www.sover.net/~jams/Morgan/docs/GameInputMethods.txt - - // Get the keys - KeyMap keys; - GetKeys( keys ); - - // Calculate the key map index - long keyMapIndex = keys[keyCode/8]; - // Calculate the individual bit to check - short bitToCheck = keyCode % 8; - // Check the status of the key - return ( keyMapIndex >> bitToCheck ) & 0x01; - */ -} - -//-------------------------------------------------------------------------------------------------- - /** * Helper method for the backend to reach through to the scintiall window. */ |