4 /* Avoid compiler warning because macro is redefined in SDL_syswm.h. */
5 #undef WIN32_LEAN_AND_MEAN
11 # include "ui/egl-helpers.h"
15 DisplayChangeListener dcl
;
16 DisplaySurface
*surface
;
19 SDL_Window
*real_window
;
20 SDL_Renderer
*real_renderer
;
22 int last_vm_running
; /* per console for caption reasons */
39 void sdl2_window_create(struct sdl2_console
*scon
);
40 void sdl2_window_destroy(struct sdl2_console
*scon
);
41 void sdl2_window_resize(struct sdl2_console
*scon
);
42 void sdl2_poll_events(struct sdl2_console
*scon
);
44 void sdl2_reset_keys(struct sdl2_console
*scon
);
45 void sdl2_process_key(struct sdl2_console
*scon
,
46 SDL_KeyboardEvent
*ev
);
48 void sdl2_2d_update(DisplayChangeListener
*dcl
,
49 int x
, int y
, int w
, int h
);
50 void sdl2_2d_switch(DisplayChangeListener
*dcl
,
51 DisplaySurface
*new_surface
);
52 void sdl2_2d_refresh(DisplayChangeListener
*dcl
);
53 void sdl2_2d_redraw(struct sdl2_console
*scon
);
54 bool sdl2_2d_check_format(DisplayChangeListener
*dcl
,
55 pixman_format_code_t format
);
57 void sdl2_gl_update(DisplayChangeListener
*dcl
,
58 int x
, int y
, int w
, int h
);
59 void sdl2_gl_switch(DisplayChangeListener
*dcl
,
60 DisplaySurface
*new_surface
);
61 void sdl2_gl_refresh(DisplayChangeListener
*dcl
);
62 void sdl2_gl_redraw(struct sdl2_console
*scon
);
64 QEMUGLContext
sdl2_gl_create_context(DisplayChangeListener
*dcl
,
65 QEMUGLParams
*params
);
66 void sdl2_gl_destroy_context(DisplayChangeListener
*dcl
, QEMUGLContext ctx
);
67 int sdl2_gl_make_context_current(DisplayChangeListener
*dcl
,
69 QEMUGLContext
sdl2_gl_get_current_context(DisplayChangeListener
*dcl
);
71 void sdl2_gl_scanout_disable(DisplayChangeListener
*dcl
);
72 void sdl2_gl_scanout_texture(DisplayChangeListener
*dcl
,
75 uint32_t backing_width
,
76 uint32_t backing_height
,
77 uint32_t x
, uint32_t y
,
78 uint32_t w
, uint32_t h
);
79 void sdl2_gl_scanout_flush(DisplayChangeListener
*dcl
,
80 uint32_t x
, uint32_t y
, uint32_t w
, uint32_t h
);