/usr/include/BALL/VIEW/INPUT/buttonEvent.h is in libballview1.4-dev 1.4.3~beta1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #ifndef BUTTONEVENT_H
#define BUTTONEVENT_H
#include <BALL/VIEW/KERNEL/common.h>
#include <BALL/VIEW/INPUT/deviceEvent.h>
#include <QtCore/QEvent>
namespace BALL
{
namespace VIEW
{
enum InputDeviceButton {
BUTTON1 = 1 << 0,
BUTTON2 = 1 << 1,
BUTTON3 = 1 << 2,
BUTTON4 = 1 << 3,
BUTTON5 = 1 << 4,
BUTTON6 = 1 << 5,
BUTTON7 = 1 << 6,
BUTTON8 = 1 << 7,
BUTTON9 = 1 << 8,
BUTTON10 = 1 << 9,
BUTTON11 = 1 << 10,
BUTTON12 = 1 << 11
};
typedef QFlags<InputDeviceButton> InputDeviceButtons;
/**
* This event encodes button states of a custom input device.
* It is emitted when a button is either pressed or released.
*/
class ButtonEvent : public DeviceEvent
{
public:
ButtonEvent(EventsIDs type, InputDeviceDriver* dev, InputDeviceButton cause);
ButtonEvent(EventsIDs type, InputDeviceDriver* dev, InputDeviceButton cause, InputDeviceButtons buttons);
/**
* Return the button that caused the event.
*/
InputDeviceButton button() const { return cause_; }
/**
* Returns the state of the devices buttons when the event was emitted.
*/
InputDeviceButtons buttons() const { return buttons_; }
private:
InputDeviceButton cause_;
InputDeviceButtons buttons_;
};
}
}
#endif //BUTTONEVENT_H
|