#ifndef keyboard_h
#define keyboard_h

#include "player.h"
#include "wimp.h"

// leave positve numbers for keys
#define CMD_REPLAY_TOGGLE    -02
#define CMD_REPLAY_STOP      -03
#define CMD_REPLAY_STEP      -04
#define CMD_REPLAY_RESTART   -05
#define CMD_SCREEN_CLICK     -10 // toggle pause
#define CMD_SCREEN_DBL_CLICK -11 // toggle screen and pause (cf. single click)
#define CMD_SCREEN_TOGGLE    -12
#define CMD_SCREEN_MULTITASK -13
#define CMD_SCREEN_DESKTOP   -14
#define CMD_SCREEN_AUTO      -15
#define CMD_SCREEN_MANUAL    -16
#define CMD_ZOOM_IN          -20
#define CMD_ZOOM_OUT         -21
#define CMD_AUDIO_ON_OFF     -25
#define CMD_LOOP_TOGGLE      -26
#define CMD_AUTOEXIT_TOGGLE  -27
#define CMD_COLOR_TOGGLE     -28
#define CMD_VOLUME_UP        -30
#define CMD_VOLUME_DOWN      -31
#define CMD_OSD_VALUE_UP     -32
#define CMD_OSD_VALUE_DOWN   -33
#define CMD_REPLAY_REWIND    -40
#define CMD_REPLAY_FORWARD   -41
#define CMD_REPLAY_PREVIOUS  -42
#define CMD_REPLAY_NEXT      -43
#define CMD_REPLAY_RND_PREV  -44
#define CMD_REPLAY_RND_NEXT  -45

void keyboard_init(void);
int  keyboard_key(void);
void keyboard_final(void);
void set_zoom(player_t* player, int zoom, int inc);
void update_playinfo(player_t* player);
void update_controls(player_t* player);
void open_controls(player_t* player, const window_open_t* w, int action);
int do_command(player_t* player, int cmd);
void drag_return(void);
void mouse_get(player_t* player, wimp_mouse_t* m);
void mouse_action(player_t* player, const wimp_mouse_t* m);
void saveas_init(player_t* player);
void savename_set(const char* text);

// actions for open_controls
#define PANEL_CLOSE 0
#define PANEL_TRACK 1
#define PANEL_DRAG  2
#define PANEL_OPEN  3

#endif
