Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions | Variables
osd.h File Reference

Go to the source code of this file.

Macros

#define OSD_STATIC   0x1000
 
#define OSD_FADE_START   300
 
#define OSD_FADE_DEC_VAL   5
 
#define OSD_FADE_END_VAL   0x20
 
#define OSD_TEXTURE_X_SIZE   640
 
#define OSD_TEXTURE_Y_SIZE   200
 
#define OSD(x, y, ...)
 

Functions

int osd_init (int xsize, int ysize, const Uint8 *palette, int palette_entries, int fade_dec, int fade_end)
 
int osd_init_with_defaults (void)
 
void osd_clear (void)
 
void osd_clear_with_colour (const int index)
 
void osd_texture_update (const SDL_Rect *rect)
 
void osd_on (int value)
 
void osd_off (void)
 
void osd_global_enable (int status)
 
void osd_set_colours (int fg_index, int bg_index)
 
void osd_write_char (int x, int y, char ch)
 
void osd_write_string (int x, int y, const char *s)
 
void osd_hijack (void(*updater)(void), int *xsize_ptr, int *ysize_ptr, Uint32 **pixel_ptr)
 

Variables

int osd_status
 
void(* osd_update_callback )(void)
 
int osd_notifications_enabled
 

Macro Definition Documentation

◆ OSD

#define OSD (   x,
  y,
  ... 
)
Value:
do { \
char _buf_for_msg_[4096]; \
CHECK_SNPRINTF(snprintf(_buf_for_msg_, sizeof _buf_for_msg_, __VA_ARGS__), sizeof _buf_for_msg_); \
fprintf(stderr, "OSD: %s" NL, _buf_for_msg_); \
osd_clear(); \
osd_write_string(x, y, _buf_for_msg_); \
osd_texture_update(NULL); \
osd_on(OSD_FADE_START); \
} \
} while(0)

Definition at line 53 of file osd.h.

◆ OSD_FADE_DEC_VAL

#define OSD_FADE_DEC_VAL   5

Definition at line 46 of file osd.h.

◆ OSD_FADE_END_VAL

#define OSD_FADE_END_VAL   0x20

Definition at line 47 of file osd.h.

◆ OSD_FADE_START

#define OSD_FADE_START   300

Definition at line 45 of file osd.h.

◆ OSD_STATIC

#define OSD_STATIC   0x1000

Definition at line 44 of file osd.h.

◆ OSD_TEXTURE_X_SIZE

#define OSD_TEXTURE_X_SIZE   640

Definition at line 49 of file osd.h.

◆ OSD_TEXTURE_Y_SIZE

#define OSD_TEXTURE_Y_SIZE   200

Definition at line 50 of file osd.h.

Function Documentation

◆ osd_clear()

void osd_clear ( void  )

Definition at line 72 of file screen.c.

Here is the caller graph for this function:

◆ osd_clear_with_colour()

void osd_clear_with_colour ( const int  index)

Definition at line 68 of file osd.c.

◆ osd_global_enable()

void osd_global_enable ( int  status)

Definition at line 166 of file osd.c.

◆ osd_hijack()

void osd_hijack ( void(*)(void)  updater,
int *  xsize_ptr,
int *  ysize_ptr,
Uint32 **  pixel_ptr 
)

Definition at line 234 of file osd.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ osd_init()

int osd_init ( int  xsize,
int  ysize,
const Uint8 palette,
int  palette_entries,
int  fade_dec,
int  fade_end 
)

Definition at line 96 of file osd.c.

◆ osd_init_with_defaults()

int osd_init_with_defaults ( void  )

Definition at line 131 of file osd.c.

◆ osd_off()

void osd_off ( void  )

Definition at line 159 of file osd.c.

◆ osd_on()

void osd_on ( int  value)

Definition at line 149 of file osd.c.

Here is the caller graph for this function:

◆ osd_set_colours()

void osd_set_colours ( int  fg_index,
int  bg_index 
)

Definition at line 175 of file osd.c.

◆ osd_texture_update()

void osd_texture_update ( const SDL_Rect *  rect)

Definition at line 87 of file osd.c.

◆ osd_write_char()

void osd_write_char ( int  x,
int  y,
char  ch 
)

Definition at line 92 of file screen.c.

Here is the caller graph for this function:

◆ osd_write_string()

void osd_write_string ( int  x,
int  y,
const char *  s 
)

Definition at line 109 of file screen.c.

Here is the call graph for this function:

Variable Documentation

◆ osd_notifications_enabled

int osd_notifications_enabled

Definition at line 24 of file osd.c.

◆ osd_status

int osd_status

Definition at line 23 of file osd.c.

◆ osd_update_callback

void(* osd_update_callback) (void)

Definition at line 25 of file osd.c.

x
int x
Definition: console.c:27
NL
#define NL
Definition: fat32.c:37
osd_notifications_enabled
int osd_notifications_enabled
Definition: osd.c:24
y
int y
Definition: console.c:27
OSD_FADE_START
#define OSD_FADE_START
Definition: osd.h:45