Fix build on Mac OS X El Capitan (10.11)

This commit is contained in:
Roland Winklmeier
2016-02-21 22:57:02 +01:00
parent 61e68860f8
commit f82895501f
4 changed files with 4 additions and 10 deletions

View File

@@ -134,6 +134,7 @@ equals(WORD_SIZE,64): EXTERNALSDIR = $$EXTERNALSROOT/$$basename(QMAKESPEC)/lib64
equals(WORD_SIZE,32): EXTERNALSDIR = $$EXTERNALSROOT/$$basename(QMAKESPEC)/lib32
LIBS *= -L$$EXTERNALSDIR
macx: LIBS *= -F$$EXTERNALSDIR
win32: LIBS *= -luser32
INCLUDEPATH *= $$EXTERNALDIR/common/include

View File

@@ -14,16 +14,9 @@
#include "blackinput/keyboard.h"
#include "blackmisc/input/hotkeycombination.h"
#include <ApplicationServices/ApplicationServices.h>
#include <QHash>
class __CGEvent;
typedef __CGEvent* CGEventRef; //!< Mac event definition
typedef unsigned int CGEventType; //!< Max event type definition
class __CGEventTapProxy;
typedef __CGEventTapProxy* CGEventTapProxy; //!< Max event proxy definition
namespace BlackInput
{
//! Mac OSX implemenation of IKeyboard using hook procedure

View File

@@ -11,7 +11,6 @@
#include <QHash>
#include <QtWidgets/QMessageBox>
#include <CoreFoundation/CoreFoundation.h>
#include <ApplicationServices/ApplicationServices.h>
#include <AppKit/NSEvent.h>
#include <AppKit/NSAlert.h>
#include <Foundation/NSString.h>
@@ -110,7 +109,7 @@ namespace BlackInput
CGEventMask eventMask = ((1 << kCGEventKeyDown) | (1 << kCGEventKeyUp) | (1 << kCGEventFlagsChanged));
// try creating an event tap just for keypresses. if it fails, we need Universal Access.
CFMachPortRef eventTap = CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, 0,
CFMachPortRef eventTap = CGEventTapCreate(kCGHIDEventTap, kCGHeadInsertEventTap, kCGEventTapOptionDefault,
eventMask, myCGEventCallback, this);
CFRunLoopSourceRef source = CFMachPortCreateRunLoopSource(kCFAllocatorDefault,

View File

@@ -12,6 +12,7 @@
#include <QTime>
#include <algorithm>
#include <cmath>
#include <cstdlib>
namespace BlackMisc
{