]> Git Repo - qemu.git/blame - include/ui/sdl2.h
console: add dpy_ui_info_supported
[qemu.git] / include / ui / sdl2.h
CommitLineData
5d0fe650
GH
1#ifndef SDL2_H
2#define SDL2_H
3
19dadfcc
GH
4/* Avoid compiler warning because macro is redefined in SDL_syswm.h. */
5#undef WIN32_LEAN_AND_MEAN
6
7#include <SDL.h>
8#include <SDL_syswm.h>
9
5d0fe650
GH
10struct sdl2_console {
11 DisplayChangeListener dcl;
12 DisplaySurface *surface;
13 SDL_Texture *texture;
14 SDL_Window *real_window;
15 SDL_Renderer *real_renderer;
16 int idx;
17 int last_vm_running; /* per console for caption reasons */
18 int x, y;
19 int hidden;
0b71a5d5
GH
20 int opengl;
21 int updates;
22 SDL_GLContext winctx;
23 ConsoleGLState *gls;
5d0fe650
GH
24};
25
2c3056f1
GH
26void sdl2_window_create(struct sdl2_console *scon);
27void sdl2_window_destroy(struct sdl2_console *scon);
28void sdl2_window_resize(struct sdl2_console *scon);
63ed4907 29void sdl2_poll_events(struct sdl2_console *scon);
2c3056f1 30
8fc1a3f5
GH
31void sdl2_reset_keys(struct sdl2_console *scon);
32void sdl2_process_key(struct sdl2_console *scon,
33 SDL_KeyboardEvent *ev);
34
f1ddebd8
GH
35void sdl2_2d_update(DisplayChangeListener *dcl,
36 int x, int y, int w, int h);
2c3056f1
GH
37void sdl2_2d_switch(DisplayChangeListener *dcl,
38 DisplaySurface *new_surface);
62959ffe 39void sdl2_2d_refresh(DisplayChangeListener *dcl);
0d01b7ce 40void sdl2_2d_redraw(struct sdl2_console *scon);
877417d9
GH
41bool sdl2_2d_check_format(DisplayChangeListener *dcl,
42 pixman_format_code_t format);
f1ddebd8 43
0b71a5d5
GH
44void sdl2_gl_update(DisplayChangeListener *dcl,
45 int x, int y, int w, int h);
46void sdl2_gl_switch(DisplayChangeListener *dcl,
47 DisplaySurface *new_surface);
48void sdl2_gl_refresh(DisplayChangeListener *dcl);
49void sdl2_gl_redraw(struct sdl2_console *scon);
50
5d0fe650 51#endif /* SDL2_H */
This page took 0.043195 seconds and 4 git commands to generate.