mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
add inputcommon and padsimpleEvnt to windows build. note: the plugin is disabled atm; it builds but isn't fit for general consumption. Also a bit of dolphin-style cleanup on inputcommon
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1768 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -38,112 +38,112 @@ namespace sf
|
||||
////////////////////////////////////////////////////////////
|
||||
namespace Key
|
||||
{
|
||||
enum Code
|
||||
{
|
||||
A = 'a',
|
||||
B = 'b',
|
||||
C = 'c',
|
||||
D = 'd',
|
||||
E = 'e',
|
||||
F = 'f',
|
||||
G = 'g',
|
||||
H = 'h',
|
||||
I = 'i',
|
||||
J = 'j',
|
||||
K = 'k',
|
||||
L = 'l',
|
||||
M = 'm',
|
||||
N = 'n',
|
||||
O = 'o',
|
||||
P = 'p',
|
||||
Q = 'q',
|
||||
R = 'r',
|
||||
S = 's',
|
||||
T = 't',
|
||||
U = 'u',
|
||||
V = 'v',
|
||||
W = 'w',
|
||||
X = 'x',
|
||||
Y = 'y',
|
||||
Z = 'z',
|
||||
Num0 = '0',
|
||||
Num1 = '1',
|
||||
Num2 = '2',
|
||||
Num3 = '3',
|
||||
Num4 = '4',
|
||||
Num5 = '5',
|
||||
Num6 = '6',
|
||||
Num7 = '7',
|
||||
Num8 = '8',
|
||||
Num9 = '9',
|
||||
Escape = 256,
|
||||
LControl,
|
||||
LShift,
|
||||
LAlt,
|
||||
LSystem, ///< OS specific key (left side) : windows (Win and Linux), apple (MacOS), ...
|
||||
RControl,
|
||||
RShift,
|
||||
RAlt,
|
||||
RSystem, ///< OS specific key (right side) : windows (Win and Linux), apple (MacOS), ...
|
||||
Menu,
|
||||
LBracket, ///< [
|
||||
RBracket, ///< ]
|
||||
SemiColon, ///< ;
|
||||
Comma, ///< ,
|
||||
Period, ///< .
|
||||
Quote, ///< '
|
||||
Slash, ///< /
|
||||
BackSlash,
|
||||
Tilde, ///< ~
|
||||
Equal, ///< =
|
||||
Dash, ///< -
|
||||
Space,
|
||||
Return,
|
||||
Back,
|
||||
Tab,
|
||||
PageUp,
|
||||
PageDown,
|
||||
End,
|
||||
Home,
|
||||
Insert,
|
||||
Delete,
|
||||
Add, ///< +
|
||||
Subtract, ///< -
|
||||
Multiply, ///< *
|
||||
Divide, ///< /
|
||||
Left, ///< Left arrow
|
||||
Right, ///< Right arrow
|
||||
Up, ///< Up arrow
|
||||
Down, ///< Down arrow
|
||||
Numpad0,
|
||||
Numpad1,
|
||||
Numpad2,
|
||||
Numpad3,
|
||||
Numpad4,
|
||||
Numpad5,
|
||||
Numpad6,
|
||||
Numpad7,
|
||||
Numpad8,
|
||||
Numpad9,
|
||||
F1,
|
||||
F2,
|
||||
F3,
|
||||
F4,
|
||||
F5,
|
||||
F6,
|
||||
F7,
|
||||
F8,
|
||||
F9,
|
||||
F10,
|
||||
F11,
|
||||
F12,
|
||||
F13,
|
||||
F14,
|
||||
F15,
|
||||
Pause,
|
||||
enum Code
|
||||
{
|
||||
A = 'a',
|
||||
B = 'b',
|
||||
C = 'c',
|
||||
D = 'd',
|
||||
E = 'e',
|
||||
F = 'f',
|
||||
G = 'g',
|
||||
H = 'h',
|
||||
I = 'i',
|
||||
J = 'j',
|
||||
K = 'k',
|
||||
L = 'l',
|
||||
M = 'm',
|
||||
N = 'n',
|
||||
O = 'o',
|
||||
P = 'p',
|
||||
Q = 'q',
|
||||
R = 'r',
|
||||
S = 's',
|
||||
T = 't',
|
||||
U = 'u',
|
||||
V = 'v',
|
||||
W = 'w',
|
||||
X = 'x',
|
||||
Y = 'y',
|
||||
Z = 'z',
|
||||
Num0 = '0',
|
||||
Num1 = '1',
|
||||
Num2 = '2',
|
||||
Num3 = '3',
|
||||
Num4 = '4',
|
||||
Num5 = '5',
|
||||
Num6 = '6',
|
||||
Num7 = '7',
|
||||
Num8 = '8',
|
||||
Num9 = '9',
|
||||
Escape = 256,
|
||||
LControl,
|
||||
LShift,
|
||||
LAlt,
|
||||
LSystem, ///< OS specific key (left side) : windows (Win and Linux), apple (MacOS), ...
|
||||
RControl,
|
||||
RShift,
|
||||
RAlt,
|
||||
RSystem, ///< OS specific key (right side) : windows (Win and Linux), apple (MacOS), ...
|
||||
Menu,
|
||||
LBracket, ///< [
|
||||
RBracket, ///< ]
|
||||
SemiColon, ///< ;
|
||||
Comma, ///< ,
|
||||
Period, ///< .
|
||||
Quote, ///< '
|
||||
Slash, ///< /
|
||||
BackSlash,
|
||||
Tilde, ///< ~
|
||||
Equal, ///< =
|
||||
Dash, ///< -
|
||||
Space,
|
||||
Return,
|
||||
Back,
|
||||
Tab,
|
||||
PageUp,
|
||||
PageDown,
|
||||
End,
|
||||
Home,
|
||||
Insert,
|
||||
Delete,
|
||||
Add, ///< +
|
||||
Subtract, ///< -
|
||||
Multiply, ///< *
|
||||
Divide, ///< /
|
||||
Left, ///< Left arrow
|
||||
Right, ///< Right arrow
|
||||
Up, ///< Up arrow
|
||||
Down, ///< Down arrow
|
||||
Numpad0,
|
||||
Numpad1,
|
||||
Numpad2,
|
||||
Numpad3,
|
||||
Numpad4,
|
||||
Numpad5,
|
||||
Numpad6,
|
||||
Numpad7,
|
||||
Numpad8,
|
||||
Numpad9,
|
||||
F1,
|
||||
F2,
|
||||
F3,
|
||||
F4,
|
||||
F5,
|
||||
F6,
|
||||
F7,
|
||||
F8,
|
||||
F9,
|
||||
F10,
|
||||
F11,
|
||||
F12,
|
||||
F13,
|
||||
F14,
|
||||
F15,
|
||||
Pause,
|
||||
|
||||
Count // For internal use
|
||||
};
|
||||
Count // For internal use
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -152,16 +152,16 @@ namespace Key
|
||||
////////////////////////////////////////////////////////////
|
||||
namespace Mouse
|
||||
{
|
||||
enum Button
|
||||
{
|
||||
Left,
|
||||
Right,
|
||||
Middle,
|
||||
XButton1,
|
||||
XButton2,
|
||||
enum Button
|
||||
{
|
||||
Left,
|
||||
Right,
|
||||
Middle,
|
||||
XButton1,
|
||||
XButton2,
|
||||
|
||||
Count // For internal use
|
||||
};
|
||||
Count // For internal use
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -170,18 +170,18 @@ namespace Mouse
|
||||
////////////////////////////////////////////////////////////
|
||||
namespace Joy
|
||||
{
|
||||
enum Axis
|
||||
{
|
||||
AxisX,
|
||||
AxisY,
|
||||
AxisZ,
|
||||
AxisR,
|
||||
AxisU,
|
||||
AxisV,
|
||||
AxisPOV,
|
||||
enum Axis
|
||||
{
|
||||
AxisX,
|
||||
AxisY,
|
||||
AxisZ,
|
||||
AxisR,
|
||||
AxisU,
|
||||
AxisV,
|
||||
AxisPOV,
|
||||
|
||||
Count // For internal use
|
||||
};
|
||||
Count // For internal use
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -192,115 +192,115 @@ class Event
|
||||
{
|
||||
public :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Keyboard event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct KeyEvent
|
||||
{
|
||||
Key::Code Code;
|
||||
bool Alt;
|
||||
bool Control;
|
||||
bool Shift;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Keyboard event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct KeyEvent
|
||||
{
|
||||
Key::Code Code;
|
||||
bool Alt;
|
||||
bool Control;
|
||||
bool Shift;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Text event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct TextEvent
|
||||
{
|
||||
unsigned short Unicode;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Text event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct TextEvent
|
||||
{
|
||||
unsigned short Unicode;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Mouse move event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct MouseMoveEvent
|
||||
{
|
||||
unsigned int X;
|
||||
unsigned int Y;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Mouse move event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct MouseMoveEvent
|
||||
{
|
||||
unsigned int X;
|
||||
unsigned int Y;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Mouse buttons events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct MouseButtonEvent
|
||||
{
|
||||
Mouse::Button Button;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Mouse buttons events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct MouseButtonEvent
|
||||
{
|
||||
Mouse::Button Button;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Mouse wheel events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct MouseWheelEvent
|
||||
{
|
||||
int Delta;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Mouse wheel events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct MouseWheelEvent
|
||||
{
|
||||
int Delta;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Joystick axis move event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct JoyMoveEvent
|
||||
{
|
||||
unsigned int JoystickId;
|
||||
Joy::Axis Axis;
|
||||
float Position;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Joystick axis move event parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct JoyMoveEvent
|
||||
{
|
||||
unsigned int JoystickId;
|
||||
Joy::Axis Axis;
|
||||
float Position;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Joystick buttons events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct JoyButtonEvent
|
||||
{
|
||||
unsigned int JoystickId;
|
||||
unsigned int Button;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Joystick buttons events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct JoyButtonEvent
|
||||
{
|
||||
unsigned int JoystickId;
|
||||
unsigned int Button;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Size events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct SizeEvent
|
||||
{
|
||||
unsigned int Width;
|
||||
unsigned int Height;
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Size events parameters
|
||||
////////////////////////////////////////////////////////////
|
||||
struct SizeEvent
|
||||
{
|
||||
unsigned int Width;
|
||||
unsigned int Height;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Enumeration of the different types of events
|
||||
////////////////////////////////////////////////////////////
|
||||
enum EventType
|
||||
{
|
||||
Closed,
|
||||
Resized,
|
||||
LostFocus,
|
||||
GainedFocus,
|
||||
TextEntered,
|
||||
KeyPressed,
|
||||
KeyReleased,
|
||||
MouseWheelMoved,
|
||||
MouseButtonPressed,
|
||||
MouseButtonReleased,
|
||||
MouseMoved,
|
||||
JoyButtonPressed,
|
||||
JoyButtonReleased,
|
||||
JoyMoved
|
||||
};
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Enumeration of the different types of events
|
||||
////////////////////////////////////////////////////////////
|
||||
enum EventType
|
||||
{
|
||||
Closed,
|
||||
Resized,
|
||||
LostFocus,
|
||||
GainedFocus,
|
||||
TextEntered,
|
||||
KeyPressed,
|
||||
KeyReleased,
|
||||
MouseWheelMoved,
|
||||
MouseButtonPressed,
|
||||
MouseButtonReleased,
|
||||
MouseMoved,
|
||||
JoyButtonPressed,
|
||||
JoyButtonReleased,
|
||||
JoyMoved
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Member data
|
||||
////////////////////////////////////////////////////////////
|
||||
EventType Type; ///< Type of the event
|
||||
////////////////////////////////////////////////////////////
|
||||
// Member data
|
||||
////////////////////////////////////////////////////////////
|
||||
EventType Type; ///< Type of the event
|
||||
|
||||
union
|
||||
{
|
||||
KeyEvent Key;
|
||||
TextEvent Text;
|
||||
MouseMoveEvent MouseMove;
|
||||
MouseButtonEvent MouseButton;
|
||||
MouseWheelEvent MouseWheel;
|
||||
JoyMoveEvent JoyMove;
|
||||
JoyButtonEvent JoyButton;
|
||||
SizeEvent Size;
|
||||
};
|
||||
union
|
||||
{
|
||||
KeyEvent Key;
|
||||
TextEvent Text;
|
||||
MouseMoveEvent MouseMove;
|
||||
MouseButtonEvent MouseButton;
|
||||
MouseWheelEvent MouseWheel;
|
||||
JoyMoveEvent JoyMove;
|
||||
JoyButtonEvent JoyButton;
|
||||
SizeEvent Size;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace sf
|
||||
|
Reference in New Issue
Block a user