AntiMicroX
winvmultieventhandler.h
Go to the documentation of this file.
1 /* antimicro Gamepad to KB+M event mapper
2  * Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13 
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef WINVMULTIEVENTHANDLER_H
19 #define WINVMULTIEVENTHANDLER_H
20 
21 #include <QObject>
22 #include <QVector>
23 
24 #include "baseeventhandler.h"
25 
26 #include <joybuttonslot.h>
27 
28 #include <vmulticlient.h>
29 
31 #include <antkeymapper.h>
32 
34 {
35  Q_OBJECT
36  public:
37  explicit WinVMultiEventHandler(QObject *parent = 0);
39 
40  virtual bool init();
41  virtual bool cleanup();
42  virtual void sendKeyboardEvent(JoyButtonSlot *slot, bool pressed);
43  virtual void sendMouseButtonEvent(JoyButtonSlot *slot, bool pressed);
44  virtual void sendMouseEvent(int xDis, int yDis);
45  virtual void sendMouseAbsEvent(int xDis, int yDis, int screen);
46  virtual void sendMouseSpringEvent(unsigned int xDis, unsigned int yDis, unsigned int width, unsigned int height);
47 
48  // TODO: Implement text event using information from QtWinKeyMapper.
49  virtual void sendTextEntryEvent(QString maintext);
50 
51  virtual QString getName();
52  virtual QString getIdentifier();
53 
54  protected:
55  pvmulti_client vmulti;
57  BYTE shiftKeys;
58  BYTE multiKeys;
59  BYTE extraKeys;
60  QVector<BYTE> keyboardKeys;
63 
64  signals:
65 
66  public slots:
67 };
68 
69 #endif // WINVMULTIEVENTHANDLER_H
WinVMultiEventHandler::nativeKeyMapper
QtKeyMapperBase * nativeKeyMapper
Definition: winvmultieventhandler.h:62
WinVMultiEventHandler::getName
virtual QString getName()
Definition: winvmultieventhandler.cpp:369
WinSendInputEventHandler::sendMouseButtonEvent
virtual void sendMouseButtonEvent(JoyButtonSlot *slot, bool pressed) override
Definition: winsendinputeventhandler.cpp:55
code
the intent is to exercise the right to control the distribution of derivative or collective works based on the Library In mere aggregation of another work not based on the Library with the you must alter all the notices that refer to this so that they refer to the ordinary GNU General Public instead of to this it is irreversible for that so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy This option is useful when you wish to copy part of the code of the Library into a program that is not a library You may copy and distribute the which must be distributed under the terms of Sections and above on a medium customarily used for software interchange If distribution of object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code
Definition: lgpl-2.1.txt:237
WinVMultiEventHandler::getIdentifier
virtual QString getIdentifier()
Definition: winvmultieventhandler.cpp:371
WinSendInputEventHandler::sendTextEntryEvent
virtual void sendTextEntryEvent(QString maintext) override
Definition: winsendinputeventhandler.cpp:131
winvmultieventhandler.h
WinSendInputEventHandler
Input event handler class for Windows.
Definition: winsendinputeventhandler.h:33
antkeymapper.h
WinVMultiEventHandler::sendMouseAbsEvent
virtual void sendMouseAbsEvent(int xDis, int yDis, int screen)
Move cursor to selected absolute location (x, y) on selected display.
Definition: winvmultieventhandler.cpp:357
WinVMultiEventHandler::cleanup
virtual bool cleanup()
Definition: winvmultieventhandler.cpp:75
winextras.h
WinVMultiEventHandler::WinVMultiEventHandler
WinVMultiEventHandler(QObject *parent=0)
Definition: winvmultieventhandler.cpp:27
WinVMultiEventHandler::sendInputHandler
WinSendInputEventHandler sendInputHandler
Definition: winvmultieventhandler.h:61
WinVMultiEventHandler::vmulti
pvmulti_client vmulti
Definition: winvmultieventhandler.h:55
WinVMultiEventHandler::init
virtual bool init()
Definition: winvmultieventhandler.cpp:45
joybuttonslot.h
JoyButtonSlot
Represents action which can be performed after pressing button.
Definition: joybuttonslot.h:37
BaseEventHandler
Base class for input event handlers.
Definition: baseeventhandler.h:32
WinVMultiEventHandler::keyboardKeys
QVector< BYTE > keyboardKeys
Definition: winvmultieventhandler.h:60
WinVMultiEventHandler::~WinVMultiEventHandler
~WinVMultiEventHandler()
Definition: winvmultieventhandler.cpp:43
WinVMultiEventHandler::shiftKeys
BYTE shiftKeys
Definition: winvmultieventhandler.h:57
WinVMultiEventHandler::extraKeys
BYTE extraKeys
Definition: winvmultieventhandler.h:59
AntKeyMapper::getInstance
static AntKeyMapper * getInstance(QString handler="")
Definition: antkeymapper.cpp:80
QtKeyMapperBase::returnVirtualKey
virtual int returnVirtualKey(int qkey)
Definition: qtkeymapperbase.cpp:39
WinVMultiEventHandler::sendMouseButtonEvent
virtual void sendMouseButtonEvent(JoyButtonSlot *slot, bool pressed)
Definition: winvmultieventhandler.cpp:277
JoyButtonSlot::getSlotCode
int getSlotCode() const
Definition: joybuttonslot.cpp:110
WinVMultiEventHandler::sendMouseSpringEvent
virtual void sendMouseSpringEvent(unsigned int xDis, unsigned int yDis, unsigned int width, unsigned int height)
Definition: winvmultieventhandler.cpp:346
QtKeyMapperBase
Definition: qtkeymapperbase.h:25
WinVMultiEventHandler::sendKeyboardEvent
virtual void sendKeyboardEvent(JoyButtonSlot *slot, bool pressed)
Definition: winvmultieventhandler.cpp:92
baseeventhandler.h
WinVMultiEventHandler::multiKeys
BYTE multiKeys
Definition: winvmultieventhandler.h:58
WinVMultiEventHandler::sendTextEntryEvent
virtual void sendTextEntryEvent(QString maintext)
Definition: winvmultieventhandler.cpp:367
JoyButtonSlot::setSlotCode
void setSlotCode(int code)
Definition: joybuttonslot.cpp:86
WinVMultiEventHandler
Definition: winvmultieventhandler.h:33
WinSendInputEventHandler::sendKeyboardEvent
virtual void sendKeyboardEvent(JoyButtonSlot *slot, bool pressed) override
Definition: winsendinputeventhandler.cpp:35
qtvmultikeymapper.h
JoyButtonSlot::getSlotCodeAlias
int getSlotCodeAlias() const
Definition: joybuttonslot.cpp:108
WinVMultiEventHandler::mouseButtons
BYTE mouseButtons
Definition: winvmultieventhandler.h:56
WinVMultiEventHandler::sendMouseEvent
virtual void sendMouseEvent(int xDis, int yDis)
Move cursor to selected relative location (deltax delaty)
Definition: winvmultieventhandler.cpp:341
winsendinputeventhandler.h
AntKeyMapper::getNativeKeyMapper
QtKeyMapperBase * getNativeKeyMapper() const
Definition: antkeymapper.cpp:108
QtVMultiKeyMapper::consumerUsagePagePrefix
static const int consumerUsagePagePrefix
Definition: qtvmultikeymapper.h:30