Mercurial > repos > blastem
annotate bindings.h @ 1587:ea687ca7d845
Fix missing include in bindings.c
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 19 Jun 2018 23:47:36 -0700 |
parents | 430dd12e4010 |
children | 18a946ec74c8 |
rev | line source |
---|---|
1583
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #ifndef BINDINGS_H_ |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 #define BINDINGS_H_ |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 #include <stdint.h> |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 typedef enum { |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 MOUSE_NONE, //mouse is ignored |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 MOUSE_ABSOLUTE, //really only useful for menu ROM |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 MOUSE_RELATIVE, //for full screen |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 MOUSE_CAPTURE //for windowed mode |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 } mouse_modes; |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 void set_bindings(void); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 void bindings_set_mouse_mode(uint8_t mode); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 void handle_keydown(int keycode, uint8_t scancode); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 void handle_keyup(int keycode, uint8_t scancode); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 void handle_joydown(int joystick, int button); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 void handle_joyup(int joystick, int button); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 void handle_joy_dpad(int joystick, int dpad, uint8_t state); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 void handle_joy_axis(int joystick, int axis, int16_t value); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 void handle_joy_added(int joystick); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
21 void handle_mouse_moved(int mouse, uint16_t x, uint16_t y, int16_t deltax, int16_t deltay); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 void handle_mousedown(int mouse, int button); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
23 void handle_mouseup(int mouse, int button); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
24 |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
25 void bindings_release_capture(void); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 void bindings_reacquire_capture(void); |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
27 |
430dd12e4010
Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 #endif //BINDINGS_H_ |