Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
screen.h
Go to the documentation of this file.
1 /* Xep128: Minimalistic Enterprise-128 emulator with focus on "exotic" hardware
2  Copyright (C)2015,2016 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
3  http://xep128.lgb.hu/
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
18 
19 #ifndef __XEP128_SCREEN_H_INCLUDED
20 #define __XEP128_SCREEN_H_INCLUDED
21 
22 #include <SDL_video.h>
23 #ifdef XEP128_NEED_SDL_WMINFO
24 # include <SDL_syswm.h>
25 #endif
26 
27 #define SCREEN_WIDTH 736
28 #define SCREEN_HEIGHT 288
29 #ifdef __EMSCRIPTEN__
30 //#define SCREEN_FORMAT SDL_PIXELFORMAT_ABGR8888
31 #define SCREEN_FORMAT SDL_PIXELFORMAT_ARGB8888
32 #else
33 #define SCREEN_FORMAT SDL_PIXELFORMAT_ARGB8888
34 #endif
35 
36 #define OSD_FADE_START 300
37 #define OSD_FADE_STOP 0x80
38 #define OSD_FADE_DEC 3
39 
41 extern SDL_Window *sdl_win;
42 extern SDL_PixelFormat *sdl_pixel_format;
43 #ifdef XEP128_NEED_SDL_WMINFO
44 extern SDL_SysWMinfo sdl_wminfo;
45 #endif
46 extern Uint32 sdl_winid;
47 
48 extern int _sdl_emu_secured_message_box_ ( Uint32 sdlflag, const char *msg );
49 extern int _sdl_emu_secured_modal_box_ ( const char *items_in, const char *msg );
50 
51 extern void screen_grab ( SDL_bool state );
52 extern void screen_window_resized ( int new_xsize, int new_ysize );
53 extern void screen_set_fullscreen ( int state );
54 extern void screen_present_frame (Uint32 *ep_pixels);
55 extern int screen_shot ( Uint32 *ep_pixels, const char *directory, const char *filename );
56 extern int screen_init ( void );
57 
58 extern void sdl_burn_events ( void );
59 
60 extern void osd_disable ( void );
61 extern void osd_clear ( void );
62 extern void osd_update ( void );
63 extern void osd_write_char ( int x, int y, char ch );
64 extern void osd_write_string ( int x, int y, const char *s );
65 extern void osd_write_string_centered ( int y, const char *s );
66 extern void osd_notification ( const char *s );
67 extern void osd_replay ( int fade );
68 
69 #endif
screen_window_resized
void screen_window_resized(int new_xsize, int new_ysize)
Definition: screen.c:172
sdl_pixel_format
SDL_PixelFormat * sdl_pixel_format
Definition: screen.c:45
sdl_win
SDL_Window * sdl_win
Definition: screen.c:43
_sdl_emu_secured_message_box_
int _sdl_emu_secured_message_box_(Uint32 sdlflag, const char *msg)
Definition: screen.c:448
sdl_winid
Uint32 sdl_winid
Definition: screen.c:49
warn_for_mouse_grab
int warn_for_mouse_grab
Definition: screen.h:40
sdl_burn_events
void sdl_burn_events(void)
Definition: screen.c:434
screen_present_frame
void screen_present_frame(Uint32 *ep_pixels)
Definition: screen.c:227
osd_clear
void osd_clear(void)
Definition: screen.c:72
osd_write_string_centered
void osd_write_string_centered(int y, const char *s)
Definition: screen.c:119
is_fullscreen
int is_fullscreen
Definition: screen.c:42
Uint32
uint32_t Uint32
Definition: fat32.c:49
screen_set_fullscreen
void screen_set_fullscreen(int state)
Definition: screen.c:204
osd_disable
void osd_disable(void)
Definition: screen.c:66
x
int x
Definition: console.c:27
sdl_wminfo
SDL_SysWMinfo sdl_wminfo
Definition: screen.c:44
osd_notification
void osd_notification(const char *s)
Definition: screen.c:136
_sdl_emu_secured_modal_box_
int _sdl_emu_secured_modal_box_(const char *items_in, const char *msg)
Definition: screen.c:469
osd_write_char
void osd_write_char(int x, int y, char ch)
Definition: screen.c:92
osd_write_string
void osd_write_string(int x, int y, const char *s)
Definition: screen.c:109
osd_replay
void osd_replay(int fade)
Definition: screen.c:146
y
int y
Definition: console.c:27
screen_shot
int screen_shot(Uint32 *ep_pixels, const char *directory, const char *filename)
Definition: screen.c:263
osd_update
void osd_update(void)
Definition: screen.c:78
screen_init
int screen_init(void)
Definition: screen.c:357
screen_grab
void screen_grab(SDL_bool state)
Definition: screen.c:156