
#ifndef osd_h
#define osd_h

#include <stdarg.h>
#include "player.h"

// osd
typedef enum
{ OSD_NAV_NONE
, OSD_NAV_UP
, OSD_NAV_DOWN
, OSD_NAV_LEFT
, OSD_NAV_RIGHT
, OSD_NAV_PAUSE_ON
, OSD_NAV_PAUSE_OFF
, OSD_NAV_TIME_ON
, OSD_NAV_TIME_OFF
, OSD_NAV_UPDATE
, OSD_NAV_FRAME_STEP
, OSD_NAV_POS_ON
, OSD_NAV_POS_OFF
} osd_nav;

#define OSD_STATE_NAV 0x01
#define OSD_STATE_MSG 0x02
#define OSD_STATE_TC  0x04
#define OSD_STATE_POS 0x08

void osd_attach(player_t* player);
void osd_detach(player_t* player);
void osd_reset(player_t* player);
uint32_t osd_getState(player_t* player);
void osd_refresh(player_t* player);
void osd_draw(player_t* player);
void osd_navigate(player_t* player, osd_nav nav);
#ifdef __CC_NORCROFT
#pragma -v1 // hint to the compiler to check f/s/printf format
#endif
void osd_report(player_t* player, const char *format, ...);
#ifdef __CC_NORCROFT
#pragma -v0 // return to default
#endif
void osd_vreport(player_t* player, const char *format, va_list arg);
int osd_mouseAction(player_t* player, const wimp_mouse_t* m);

#endif
