#ifndef display_h
#define display_h

#include "inttypes.h"
#include "ka_vinfo.h"
#include "player.h"

// reasons for restore_desktop and init_display
#define INIT_DISPLAY  0 // Init display on first video image
#define ZOOM_CHANGE   1 // Zoom change
#define FRAC_CHANGE   2 // Window size change
#define MODE_CHANGE   3 // Desktop screen mode change
#define SCREEN_CHANGE 4 // Switch to a new KA_MODE_xxx
#define REDIM_CHANGE  5 // New resize mode (pan&scan, ...) and/or resize to options
#define FINAL_RESTORE 6 // Exit player

// for use in 8bpp modes
extern uint8_t *colour_table2;

void display_swapBanks(player_t* player);
void display_waitsync(player_t* player);
uint8_t* display_getDriverScreenBank(void);
const _kernel_oserror* display_getDriverOverlayBank(player_t* player, const gvoverlayplane_t** planes);

void display_init(player_t* player);
void display_final(player_t* player);
void display_paintbanner(player_t* player);
void display_showCursors(int on);
void display_showPointer(int on);
void display_restoreDesktop(player_t* player, int mode, int reason);
void display_setup(player_t* player, const ka_vinfo_t* sequence, int reason);
void display_fracChange(player_t* player);
// Used by OSD
int display_brightness(player_t* player, int br);
int display_contrast(player_t* player, int cn);
int display_colour(player_t* player, int cl);

#endif
