1 #ifndef _plat_sdl__paint__hpp__included__
2 #define _plat_sdl__paint__hpp__included__
9 struct sdlw_display_parameters
11 //Fill this structure.
12 sdlw_display_parameters();
13 sdlw_display_parameters(uint32_t rscrw
, uint32_t rscrh
, bool cactive
);
14 //Real width of screen buffer.
15 uint32_t real_screen_w
;
16 //Real height of screen buffer.
17 uint32_t real_screen_h
;
18 //Fullscreen console active flag.
19 bool fullscreen_console
;
20 //Virtual width of screen area.
21 uint32_t virtual_screen_w
;
22 //Virtual height of screen area.
23 uint32_t virtual_screen_h
;
28 //Screen area left edge x.
29 uint32_t screenarea_x
;
30 //Screen area top edge y.
31 uint32_t screenarea_y
;
33 uint32_t screenarea_w
;
35 uint32_t screenarea_h
;
36 //Status area left edge x.
37 uint32_t statusarea_x
;
38 //Status area top edge y.
39 uint32_t statusarea_y
;
41 uint32_t statusarea_w
;
43 uint32_t statusarea_h
;
45 uint32_t statusarea_lines
;
46 //Message area left edge x.
47 uint32_t messagearea_x
;
48 //Message area top edge y.
49 uint32_t messagearea_y
;
51 uint32_t messagearea_w
;
52 //Message area height.
53 uint32_t messagearea_h
;
55 uint32_t messagearea_lines
;
56 //Message area trailing blank top edge y.
57 uint32_t messagearea_trailing_y
;
58 //Message area trailing blank height.
59 uint32_t messagearea_trailing_h
;
60 //Command line left edge x.
62 //Command line top edge y.
76 //Query status of command line.
77 struct command_status
get_current_command();
79 //Draw outline box. The surface must be locked.
80 void draw_box(SDL_Surface
* surf
, uint32_t x
, uint32_t y
, uint32_t w
, uint32_t h
, uint32_t color
);
81 //Draw main screen. The surface must be locked.
82 bool paint_screen(SDL_Surface
* surf
, const sdlw_display_parameters
& p
, bool full
);
83 //Draw status area. The surface must be locked.
84 bool paint_status(SDL_Surface
* surf
, const sdlw_display_parameters
& p
, bool full
);
85 //Draw messages. The surface must be locked.
86 bool paint_messages(SDL_Surface
* surf
, const sdlw_display_parameters
& p
, bool full
);
87 //Draw command. The surface must be locked.
88 bool paint_command(SDL_Surface
* surf
, const sdlw_display_parameters
& p
, bool full
);
89 //Draw a modal dialog. The surface must be locked.
90 void paint_modal_dialog(SDL_Surface
* surf
, const std::string
& text
, bool confirm
);
92 void sdlw_paint_modal_dialog(const std::string
& text
, bool confirm
);
93 void sdlw_clear_modal_dialog();
94 void sdlw_screen_paintable();
95 void sdlw_command_updated();
96 void sdlw_fullscreen_console(bool enable
);
97 void sdlw_force_paint();
98 std::string
sdlw_decode_string(std::string e
);