mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55: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
|
equals(WORD_SIZE,32): EXTERNALSDIR = $$EXTERNALSROOT/$$basename(QMAKESPEC)/lib32
|
||||||
|
|
||||||
LIBS *= -L$$EXTERNALSDIR
|
LIBS *= -L$$EXTERNALSDIR
|
||||||
|
macx: LIBS *= -F$$EXTERNALSDIR
|
||||||
win32: LIBS *= -luser32
|
win32: LIBS *= -luser32
|
||||||
|
|
||||||
INCLUDEPATH *= $$EXTERNALDIR/common/include
|
INCLUDEPATH *= $$EXTERNALDIR/common/include
|
||||||
|
|||||||
@@ -14,16 +14,9 @@
|
|||||||
|
|
||||||
#include "blackinput/keyboard.h"
|
#include "blackinput/keyboard.h"
|
||||||
#include "blackmisc/input/hotkeycombination.h"
|
#include "blackmisc/input/hotkeycombination.h"
|
||||||
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#include <QHash>
|
#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
|
namespace BlackInput
|
||||||
{
|
{
|
||||||
//! Mac OSX implemenation of IKeyboard using hook procedure
|
//! Mac OSX implemenation of IKeyboard using hook procedure
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
|
||||||
#include <AppKit/NSEvent.h>
|
#include <AppKit/NSEvent.h>
|
||||||
#include <AppKit/NSAlert.h>
|
#include <AppKit/NSAlert.h>
|
||||||
#include <Foundation/NSString.h>
|
#include <Foundation/NSString.h>
|
||||||
@@ -110,7 +109,7 @@ namespace BlackInput
|
|||||||
CGEventMask eventMask = ((1 << kCGEventKeyDown) | (1 << kCGEventKeyUp) | (1 << kCGEventFlagsChanged));
|
CGEventMask eventMask = ((1 << kCGEventKeyDown) | (1 << kCGEventKeyUp) | (1 << kCGEventFlagsChanged));
|
||||||
|
|
||||||
// try creating an event tap just for keypresses. if it fails, we need Universal Access.
|
// 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);
|
eventMask, myCGEventCallback, this);
|
||||||
|
|
||||||
CFRunLoopSourceRef source = CFMachPortCreateRunLoopSource(kCFAllocatorDefault,
|
CFRunLoopSourceRef source = CFMachPortCreateRunLoopSource(kCFAllocatorDefault,
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user