4 /* Avoid compiler warning because macro is redefined in SDL_syswm.h. */
5 #undef WIN32_LEAN_AND_MEAN
9 #ifdef CONFIG_SDL_IMAGE
10 # include <SDL_image.h>
13 #include "ui/kbd-state.h"
15 # include "ui/egl-helpers.h"
19 DisplayChangeListener dcl
;
20 DisplaySurface
*surface
;
23 SDL_Window
*real_window
;
24 SDL_Renderer
*real_renderer
;
26 int last_vm_running
; /* per console for caption reasons */
44 void sdl2_window_create(struct sdl2_console
*scon
);
45 void sdl2_window_destroy(struct sdl2_console
*scon
);
46 void sdl2_window_resize(struct sdl2_console
*scon
);
47 void sdl2_poll_events(struct sdl2_console
*scon
);
49 void sdl2_process_key(struct sdl2_console
*scon
,
50 SDL_KeyboardEvent
*ev
);
52 void sdl2_2d_update(DisplayChangeListener
*dcl
,
53 int x
, int y
, int w
, int h
);
54 void sdl2_2d_switch(DisplayChangeListener
*dcl
,
55 DisplaySurface
*new_surface
);
56 void sdl2_2d_refresh(DisplayChangeListener
*dcl
);
57 void sdl2_2d_redraw(struct sdl2_console
*scon
);
58 bool sdl2_2d_check_format(DisplayChangeListener
*dcl
,
59 pixman_format_code_t format
);
61 void sdl2_gl_update(DisplayChangeListener
*dcl
,
62 int x
, int y
, int w
, int h
);
63 void sdl2_gl_switch(DisplayChangeListener
*dcl
,
64 DisplaySurface
*new_surface
);
65 void sdl2_gl_refresh(DisplayChangeListener
*dcl
);
66 void sdl2_gl_redraw(struct sdl2_console
*scon
);
68 QEMUGLContext
sdl2_gl_create_context(DisplayChangeListener
*dcl
,
69 QEMUGLParams
*params
);
70 void sdl2_gl_destroy_context(DisplayChangeListener
*dcl
, QEMUGLContext ctx
);
71 int sdl2_gl_make_context_current(DisplayChangeListener
*dcl
,
73 QEMUGLContext
sdl2_gl_get_current_context(DisplayChangeListener
*dcl
);
75 void sdl2_gl_scanout_disable(DisplayChangeListener
*dcl
);
76 void sdl2_gl_scanout_texture(DisplayChangeListener
*dcl
,
79 uint32_t backing_width
,
80 uint32_t backing_height
,
81 uint32_t x
, uint32_t y
,
82 uint32_t w
, uint32_t h
);
83 void sdl2_gl_scanout_flush(DisplayChangeListener
*dcl
,
84 uint32_t x
, uint32_t y
, uint32_t w
, uint32_t h
);