mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
refs #403 add BlackInput shared library build
This commit is contained in:
@@ -19,7 +19,7 @@ precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
|||||||
DEFINES += USING_PCH
|
DEFINES += USING_PCH
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINES += LOG_IN_FILE
|
DEFINES += LOG_IN_FILE BUILD_BLACKINPUT_LIB
|
||||||
|
|
||||||
HEADERS += *.h
|
HEADERS += *.h
|
||||||
SOURCES += *.cpp
|
SOURCES += *.cpp
|
||||||
@@ -27,6 +27,8 @@ SOURCES += *.cpp
|
|||||||
win32 {
|
win32 {
|
||||||
HEADERS += $$PWD/win/*.h
|
HEADERS += $$PWD/win/*.h
|
||||||
SOURCES += $$PWD/win/*.cpp
|
SOURCES += $$PWD/win/*.cpp
|
||||||
|
|
||||||
|
LIBS *= -ldxguid -lole32 -ldinput8 -lUser32
|
||||||
}
|
}
|
||||||
|
|
||||||
unix:!macx {
|
unix:!macx {
|
||||||
|
|||||||
27
src/blackinput/blackinputexport.h
Normal file
27
src/blackinput/blackinputexport.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/* Copyright (C) 2015
|
||||||
|
* swift project Community / Contributors
|
||||||
|
*
|
||||||
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||||
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||||
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||||
|
* contained in the LICENSE file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
|
#ifndef BLACKINPUT_MACROS_H
|
||||||
|
#define BLACKINPUT_MACROS_H
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#ifndef WITH_STATIC
|
||||||
|
# if defined(BUILD_BLACKINPUT_LIB)
|
||||||
|
# define BLACKINPUT_EXPORT Q_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define BLACKINPUT_EXPORT Q_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define BLACKINPUT_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BLACKINPUT_MACROS_H
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifndef BLACKINPUT_JOYSTICK_H
|
#ifndef BLACKINPUT_JOYSTICK_H
|
||||||
#define BLACKINPUT_JOYSTICK_H
|
#define BLACKINPUT_JOYSTICK_H
|
||||||
|
|
||||||
|
#include "blackinputexport.h"
|
||||||
#include "blackmisc/hardware/joystickbutton.h"
|
#include "blackmisc/hardware/joystickbutton.h"
|
||||||
#include <QMultiMap>
|
#include <QMultiMap>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
@@ -24,7 +25,7 @@ namespace BlackInput
|
|||||||
* \brief Abstract interface for native joystick handling.
|
* \brief Abstract interface for native joystick handling.
|
||||||
* \todo Add implementation for Linux and OSX.
|
* \todo Add implementation for Linux and OSX.
|
||||||
*/
|
*/
|
||||||
class IJoystick : public QObject
|
class BLACKINPUT_EXPORT IJoystick : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifndef BLACKINPUT_KEYBOARD_H
|
#ifndef BLACKINPUT_KEYBOARD_H
|
||||||
#define BLACKINPUT_KEYBOARD_H
|
#define BLACKINPUT_KEYBOARD_H
|
||||||
|
|
||||||
|
#include "blackinputexport.h"
|
||||||
#include "blackmisc/hardware/keyboardkeylist.h"
|
#include "blackmisc/hardware/keyboardkeylist.h"
|
||||||
#include <QMultiMap>
|
#include <QMultiMap>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
@@ -22,7 +23,7 @@ namespace BlackInput
|
|||||||
* Abstract interface for native keyboard handling.
|
* Abstract interface for native keyboard handling.
|
||||||
* \todo Add implementation for Linux and OSX.
|
* \todo Add implementation for Linux and OSX.
|
||||||
*/
|
*/
|
||||||
class IKeyboard : public QObject
|
class BLACKINPUT_EXPORT IKeyboard : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
//! \file
|
//! \file
|
||||||
|
|
||||||
|
#include "blackinput/blackinputexport.h"
|
||||||
#include "blackinput/joystick.h"
|
#include "blackinput/joystick.h"
|
||||||
#include "blackmisc/hardware/joystickbutton.h"
|
#include "blackmisc/hardware/joystickbutton.h"
|
||||||
#include "blackmisc/collection.h"
|
#include "blackmisc/collection.h"
|
||||||
@@ -46,7 +47,7 @@ namespace BlackInput
|
|||||||
bool operator == (CJoystickDeviceData const &lhs, CJoystickDeviceData const &rhs);
|
bool operator == (CJoystickDeviceData const &lhs, CJoystickDeviceData const &rhs);
|
||||||
|
|
||||||
//! Windows implemenation of IJoystick with DirectInput
|
//! Windows implemenation of IJoystick with DirectInput
|
||||||
class CJoystickWindows : public IJoystick
|
class BLACKINPUT_EXPORT CJoystickWindows : public IJoystick
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#ifndef BLACKINPUT_KEYBOARD_WINDOWS_H
|
#ifndef BLACKINPUT_KEYBOARD_WINDOWS_H
|
||||||
#define BLACKINPUT_KEYBOARD_WINDOWS_H
|
#define BLACKINPUT_KEYBOARD_WINDOWS_H
|
||||||
|
|
||||||
|
#include "blackinput/blackinputexport.h"
|
||||||
#include "blackinput/keyboard.h"
|
#include "blackinput/keyboard.h"
|
||||||
#include "blackmisc/hardware/keyboardkey.h"
|
#include "blackmisc/hardware/keyboardkey.h"
|
||||||
#include "blackmisc/hardware/keyboardkeylist.h"
|
#include "blackmisc/hardware/keyboardkeylist.h"
|
||||||
@@ -23,7 +24,7 @@ namespace BlackInput
|
|||||||
{
|
{
|
||||||
//! \brief Windows implemenation of IKeyboard using hook procedure
|
//! \brief Windows implemenation of IKeyboard using hook procedure
|
||||||
//! \todo Change QHash to a CCollection object
|
//! \todo Change QHash to a CCollection object
|
||||||
class CKeyboardWindows : public IKeyboard
|
class BLACKINPUT_EXPORT CKeyboardWindows : public IKeyboard
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#ifndef BLACKINPUT_KEYMAPPING_WINDOWS_H
|
#ifndef BLACKINPUT_KEYMAPPING_WINDOWS_H
|
||||||
#define BLACKINPUT_KEYMAPPING_WINDOWS_H
|
#define BLACKINPUT_KEYMAPPING_WINDOWS_H
|
||||||
|
|
||||||
|
#include "blackinput/blackinputexport.h"
|
||||||
#include "blackmisc/hardware/keyboardkey.h"
|
#include "blackmisc/hardware/keyboardkey.h"
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
namespace BlackInput
|
namespace BlackInput
|
||||||
{
|
{
|
||||||
//! \brief This class provides methods to map between windows virtual keys and CKeyboardKey
|
//! \brief This class provides methods to map between windows virtual keys and CKeyboardKey
|
||||||
class CKeyMappingWindows
|
class BLACKINPUT_EXPORT CKeyMappingWindows
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Reference in New Issue
Block a user