Reformat all the things. Have fun with merge conflicts.

This commit is contained in:
Pierre Bourdon
2016-06-24 10:43:46 +02:00
parent 2115e8a4a6
commit 3570c7f03a
1116 changed files with 187405 additions and 180344 deletions

View File

@ -12,67 +12,71 @@ namespace ciface
{
namespace OSX
{
class Keyboard : public Core::Device
{
private:
class Key : public Input
{
public:
Key(IOHIDElementRef element, IOHIDDeviceRef device);
std::string GetName() const override;
ControlState GetState() const override;
private:
const IOHIDElementRef m_element;
const IOHIDDeviceRef m_device;
std::string m_name;
};
class Key : public Input
{
public:
Key(IOHIDElementRef element, IOHIDDeviceRef device);
std::string GetName() const override;
ControlState GetState() const override;
class Cursor : public Input
{
public:
Cursor(u8 index, const float& axis, const bool positive) : m_axis(axis), m_index(index), m_positive(positive) {}
std::string GetName() const override;
bool IsDetectable() override { return false; }
ControlState GetState() const override;
private:
const float& m_axis;
const u8 m_index;
const bool m_positive;
};
private:
const IOHIDElementRef m_element;
const IOHIDDeviceRef m_device;
std::string m_name;
};
class Button : public Input
{
public:
Button(u8 index, const unsigned char& button) : m_button(button), m_index(index) {}
std::string GetName() const override;
ControlState GetState() const override;
private:
const unsigned char& m_button;
const u8 m_index;
};
class Cursor : public Input
{
public:
Cursor(u8 index, const float& axis, const bool positive)
: m_axis(axis), m_index(index), m_positive(positive)
{
}
std::string GetName() const override;
bool IsDetectable() override { return false; }
ControlState GetState() const override;
private:
const float& m_axis;
const u8 m_index;
const bool m_positive;
};
class Button : public Input
{
public:
Button(u8 index, const unsigned char& button) : m_button(button), m_index(index) {}
std::string GetName() const override;
ControlState GetState() const override;
private:
const unsigned char& m_button;
const u8 m_index;
};
public:
void UpdateInput() override;
void UpdateInput() override;
Keyboard(IOHIDDeviceRef device, std::string name, int index, void *window);
Keyboard(IOHIDDeviceRef device, std::string name, int index, void* window);
std::string GetName() const override;
std::string GetSource() const override;
int GetId() const override;
std::string GetName() const override;
std::string GetSource() const override;
int GetId() const override;
private:
struct
{
float x, y;
} m_cursor;
struct
{
float x, y;
} m_cursor;
const IOHIDDeviceRef m_device;
const std::string m_device_name;
int m_index;
uint32_t m_windowid;
unsigned char m_mousebuttons[3];
const IOHIDDeviceRef m_device;
const std::string m_device_name;
int m_index;
uint32_t m_windowid;
unsigned char m_mousebuttons[3];
};
}
}