File: input.h

package info (click to toggle)
wine 0.0.20000109-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 22,652 kB
  • ctags: 59,973
  • sloc: ansic: 342,054; perl: 3,697; yacc: 3,059; tcl: 2,647; makefile: 2,466; lex: 1,494; sh: 394
file content (30 lines) | stat: -rw-r--r-- 801 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * USER input header file
 * Copyright 1997 David Faure
 *
 */

#ifndef __WINE_INPUT_H
#define __WINE_INPUT_H

#include "windef.h"

extern BOOL MouseButtonsStates[3];
extern BOOL AsyncMouseButtonsStates[3];
extern BYTE InputKeyStateTable[256];
extern BYTE QueueKeyStateTable[256];
extern BYTE AsyncKeyStateTable[256];
extern DWORD PosX, PosY;

extern BOOL SwappedButtons;

#define GET_KEYSTATE()							\
     ((MouseButtonsStates[SwappedButtons ? 2 : 0]  ? MK_LBUTTON : 0) |	\
      (MouseButtonsStates[1]                       ? MK_RBUTTON : 0) |	\
      (MouseButtonsStates[SwappedButtons ? 0 : 2]  ? MK_MBUTTON : 0) |	\
      (InputKeyStateTable[VK_SHIFT]   & 0x80       ? MK_SHIFT   : 0) |	\
      (InputKeyStateTable[VK_CONTROL] & 0x80       ? MK_CONTROL : 0))


#endif  /* __WINE_INPUT_H */