source: trunk/src/input/keyboard.cpp @ 2815

Last change on this file since 2815 was 2815, checked in by lolbot, 8 years ago

fixed 542 files out of 2754:

  • removed 0 CR characters
  • removed 0 trailing whitespaces
  • replaced 0 tabs with spaces
  • fixed 542 svn:eol-style properties
  • Property svn:eol-style set to CR
  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1// // Lol Engine // // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net> //   This program is free software; you can redistribute it and/or //   modify it under the terms of the Do What The Fuck You Want To //   Public License, Version 2, as published by Sam Hocevar. See //   http://www.wtfpl.net/ for more details. // #ifndef LOL_INPUT_V2 #if defined HAVE_CONFIG_H #   include "config.h" #endif #include <cstdlib> #include "core.h" namespace lol { /*  * Keyboard implementation class  */ static class KeyboardData {     friend class Keyboard; public:     KeyboardData() { } private:     Array<uint32_t> m_chars; } keyboarddata; /*  * Public Keyboard class  */ Keyboard::Keyboard()   : m_data(new KeyboardData()) { } Keyboard::~Keyboard() {     delete m_data; } void Keyboard::PushChar(uint32_t ch) {     m_data->m_chars.Push(ch); } uint32_t Keyboard::PopChar() {     if (!m_data->m_chars.Count())         return 0;     uint32_t ret = m_data->m_chars[0];     m_data->m_chars.Remove(0);     return ret; } } /* namespace lol */ #endif // !LOL_INPUT_V2
Note: See TracBrowser for help on using the repository browser.