events.h 700 B

123456789101112131415161718192021222324
  1. #ifndef _events_h
  2. #define _events_h
  3. #include "config.h"
  4. // General event structure
  5. typedef struct {
  6. Bit16u type;
  7. Bit8u flags1; // Bios data flags
  8. Bit8u flags2;
  9. Bit8u flags3;
  10. Bit8u leds;
  11. Bit8u flags; // Extra flags bit 0: extended key, bit 1: Windows key down
  12. Bit8u scancode; // Hardware specific scancode
  13. Bit8u virtKey; // Windows virtual key
  14. Bit16u unicode; // Translated character
  15. Bit16u x, y; // The X/Y coordinates of the mouse (at press time)
  16. } userAction;
  17. // Polls for currently pending events, and returns true if there are any pending
  18. extern bool vPollEvent(userAction *uAct);
  19. #endif