From fec7dcdee3b93c18b494f2749b7a4775fb1d7587 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sun, 13 Jan 2013 10:59:42 -0800 Subject: [PATCH] Added missing file. --- examples/common/entry.h | 134 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 examples/common/entry.h diff --git a/examples/common/entry.h b/examples/common/entry.h new file mode 100644 index 000000000..9845e90fc --- /dev/null +++ b/examples/common/entry.h @@ -0,0 +1,134 @@ +/* + * Copyright 2011-2013 Branimir Karadzic. All rights reserved. + * License: http://www.opensource.org/licenses/BSD-2-Clause + */ + +#ifndef __ENTRY_H__ +#define __ENTRY_H__ + +namespace entry +{ + struct MouseButton + { + enum Enum + { + Left, + Middle, + Right, + + Count + }; + }; + + struct Modifier + { + enum Enum + { + None = 0, + LeftAlt = 0x01, + RightAlt = 0x02, + LeftCtrl = 0x04, + RightCtrl = 0x08, + LeftShift = 0x10, + RightShift = 0x20, + LeftMeta = 0x40, + RightMeta = 0x80, + }; + }; + + struct Key + { + enum Enum + { + Unknown = 0, + Esc, + Return, + Tab, + Space, + Backspace, + Up, + Down, + Left, + Right, + PageUp, + PageDown, + Home, + End, + Print, + Plus, + Minus, + F1, + F2, + F3, + F4, + F5, + F6, + F7, + F8, + F9, + F10, + F11, + F12, + NumPad0, + NumPad1, + NumPad2, + NumPad3, + NumPad4, + NumPad5, + NumPad6, + NumPad7, + NumPad8, + NumPad9, + Key0, + Key1, + Key2, + Key3, + Key4, + Key5, + Key6, + Key7, + Key8, + Key9, + KeyA, + KeyB, + KeyC, + KeyD, + KeyE, + KeyF, + KeyG, + KeyH, + KeyI, + KeyJ, + KeyK, + KeyL, + KeyM, + KeyN, + KeyO, + KeyP, + KeyQ, + KeyR, + KeyS, + KeyT, + KeyU, + KeyV, + KeyW, + KeyX, + KeyY, + KeyZ, + }; + }; + + struct Event + { + enum Enum + { + Nop, + Exit, + }; + }; + + Event::Enum poll(); + +} // namespace entry + +#endif // __ENTRY_H__