mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Fix build on Mac OS X El Capitan (10.11)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <QTime>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user