-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux_platform.h
More file actions
52 lines (44 loc) · 922 Bytes
/
linux_platform.h
File metadata and controls
52 lines (44 loc) · 922 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Created by doug on 4/16/15.
//
#ifndef PHYSICA_LINUX_PLATFORM_H
#define PHYSICA_LINUX_PLATFORM_H
enum gamepad_buttons {
BUTTON_A = 0,
BUTTON_B = 1,
BUTTON_X = 2,
BUTTON_Y = 3,
BUTTON_L_BUMPER = 4,
BUTTON_R_BUMPER = 5,
BUTTON_L_STICK = 9,
BUTTON_R_STICK = 10,
};
enum gamepad_axes {
L_STICK_X = 0,
L_STICK_Y = 1,
L_TRIGGER = 2,
R_STICK_X = 3,
R_STICK_Y = 4,
R_TRIGGER = 5
};
struct offscreen_buffer_
{
xcb_image_ *xcb_image;
xcb_pixmap_ xcb_pixmap_id;
xcb_gcontext_ xcb_gcontext_id;
void *memory;
int width;
int height;
int pitch;
int bytes_per_pixel;
};
struct platform_context {
const xcb_setup_ *setup;
xcb_format_ *fmt;
xcb_connection_ *connection;
xcb_window_ window;
xcb_key_symbols_* key_symbols;
xcb_atom_ wm_protocols;
xcb_atom_ wm_delete_window;
};
#endif //PHYSICA_LINUX_PLATFORM_H