]>
Commit | Line | Data |
---|---|---|
5d0fe650 GH |
1 | #ifndef SDL2_H |
2 | #define SDL2_H | |
3 | ||
4 | struct sdl2_console { | |
5 | DisplayChangeListener dcl; | |
6 | DisplaySurface *surface; | |
7 | SDL_Texture *texture; | |
8 | SDL_Window *real_window; | |
9 | SDL_Renderer *real_renderer; | |
10 | int idx; | |
11 | int last_vm_running; /* per console for caption reasons */ | |
12 | int x, y; | |
13 | int hidden; | |
14 | }; | |
15 | ||
2c3056f1 GH |
16 | void sdl2_window_create(struct sdl2_console *scon); |
17 | void sdl2_window_destroy(struct sdl2_console *scon); | |
18 | void sdl2_window_resize(struct sdl2_console *scon); | |
63ed4907 | 19 | void sdl2_poll_events(struct sdl2_console *scon); |
2c3056f1 | 20 | |
8fc1a3f5 GH |
21 | void sdl2_reset_keys(struct sdl2_console *scon); |
22 | void sdl2_process_key(struct sdl2_console *scon, | |
23 | SDL_KeyboardEvent *ev); | |
24 | ||
f1ddebd8 GH |
25 | void sdl2_2d_update(DisplayChangeListener *dcl, |
26 | int x, int y, int w, int h); | |
2c3056f1 GH |
27 | void sdl2_2d_switch(DisplayChangeListener *dcl, |
28 | DisplaySurface *new_surface); | |
62959ffe | 29 | void sdl2_2d_refresh(DisplayChangeListener *dcl); |
0d01b7ce | 30 | void sdl2_2d_redraw(struct sdl2_console *scon); |
877417d9 GH |
31 | bool sdl2_2d_check_format(DisplayChangeListener *dcl, |
32 | pixman_format_code_t format); | |
f1ddebd8 | 33 | |
5d0fe650 | 34 | #endif /* SDL2_H */ |