home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / win32 / Input.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-13  |  1.6 KB  |  56 lines

  1. // -*- C++ -*-
  2. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
  3. // Copyright (C) 1999-2003 Forgotten
  4. // Copyright (C) 2004 Forgotten and the VBA development team
  5.  
  6. // This program is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // the Free Software Foundation; either version 2, or(at your option)
  9. // any later version.
  10. //
  11. // This program is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with this program; if not, write to the Free Software Foundation,
  18. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  
  20. #ifndef VBA_WIN32_INPUT_H
  21. #define VBA_WIN32_INPUT_H
  22. #include "../System.h"
  23.  
  24. #define JOYCONFIG_MESSAGE (WM_USER + 1000)
  25.  
  26. enum {
  27.   KEY_LEFT, KEY_RIGHT,
  28.   KEY_UP, KEY_DOWN,
  29.   KEY_BUTTON_A, KEY_BUTTON_B,
  30.   KEY_BUTTON_START, KEY_BUTTON_SELECT,
  31.   KEY_BUTTON_L, KEY_BUTTON_R,
  32.   KEY_BUTTON_SPEED, KEY_BUTTON_CAPTURE,
  33.   KEY_BUTTON_GS
  34. };
  35.  
  36. class Input {
  37.  
  38.  public:
  39.   Input() {};
  40.   virtual ~Input() {};
  41.   
  42.   virtual bool initialize() = 0;
  43.  
  44.   virtual bool readDevices() = 0;
  45.   virtual u32 readDevice(int which) = 0;
  46.   virtual CString getKeyName(int key) = 0;
  47.   virtual void checkKeys() = 0;
  48.   virtual void checkMotionKeys() = 0;
  49.   virtual void checkDevices() = 0;
  50.   virtual void activate() = 0;
  51.   virtual void loadSettings() = 0;
  52.   virtual void saveSettings() = 0;
  53. };
  54.  
  55. #endif
  56.