/****************************************************************************
	Aplikace Plocha pro ovladani pocitace PC s operacnim systemem Windows

*****************************************************************************/

#ifndef DESKTOP_H
#define DESKTOP_H

/****************************************************************************
	Geometricke rozmery aplikace

*****************************************************************************/
#define DESKTOP_YA 21
#define DESKTOP_XA 0
#define DESKTOP_XC 479
#define DESKTOP_YC 271

#define DESKTOP_BUTTONS_WIDTH		30
#define DESKTOP_BUTTONS_TOP			DESKTOP_YA
#define DESKTOP_BUTTONS_LEFT		320
#define DESKTOP_BUTTONS_DISTANCE	5

#define DESKTOP_TOUCHPAD_OFFSET_X 60
#define DESKTOP_TOUCHPAD_OFFSET_Y 10
#define DESKTOP_BUTTON_OFFSET 8

#define DESKTOP_OFFSET_X 10

/****************************************************************************
	Tohle tu nemusi byt

*****************************************************************************/
typedef enum DESKTOP_MORE_STATE
{
	DESKTOP_KEYBOARD,
	DESKTOP_SPECIALS,
	DESKTOP_EXIT,
	DESKTOP_MORE_STATE_COUNT,
}DESKTOP_MORE_STATE;

/****************************************************************************
	Definice stavu aplikace

*****************************************************************************/
typedef enum DESKTOP_STATE
{
	DESKTOP_NOT_INITIALIZED = M_TASK_NOT_INITIALIZED,
	DESKTOP_INITIALIZE,
	DESKTOP_RESTART = M_TASK_RESTART,
	DESKTOP_DRAW,
	DESKTOP_ACTIVE = M_TASK_RUNNING,
	DESKTOP_WAITING = M_TASK_WAITING,
	DESKTOP_DIALOG_WAITING = M_TASK_DIALOG_WAITING,
	DESKTOP_READY = M_TASK_READY,
	DESKTOP_STOP,
	DESKTOP_ERROR = M_TASK_FAILED,
}DESKTOP_STATE;

/****************************************************************************
	Definice ID objektu

*****************************************************************************/
typedef enum DESKTOP_OBJECT
{
	DESKTOP_MAIN_SHAPE,
	DESKTOP_TOUCHPAD,
	DESKTOP_MOUSE_LEFT,
	DESKTOP_MOUSE_RIGHT,
	DESKTOP_KEYBOARD_BUTTON,
	DESKTOP_SPECIALS_BUTTON,
	DESKTOP_EXIT_BUTTON,
	DESKTOP_SCROLL_BUTTON,
	DESKTOP_OBJECT_COUNT,
}DESKTOP_OBJECT;


#define BUTTON_SAFE_TIMEOUT 500	//Ochranna lhuta pro klikani na tlacitka

/****************************************************************************
	Definice rezimu touchpadu

*****************************************************************************/
typedef enum TOUCHPAD_MODE
{
	TOUCHPAD,
	ARRAYS,
}TOUCHPAD_MODE;

extern ANSWER remoteConnectionEstablished;

RESULT DMsgBox(MESSAGE * msg);
void AppDesktop(void);

#endif