/*****************************************************************************/
/*     piKey SDK                                                             */
/*                                                                           */
/* piKeyTypes.h : various global types.                                      */
/*****************************************************************************/
#ifndef __PIKEYTYPES_H__
#define __PIKEYTYPES_H__

#include "pikeykeycodes.h"

#define PIKEY_THIS_VERSION            3
#define PIKEY_ERROR_VERSION          -1
#define PIKEY_ERROR_NOT_ENOUGH_CHARS -2
#define PIKEY_ERROR_NOT_EXCLUSIVE    -3
#define PIKEY_ERROR_WRONG_MODE       -4
#define PIKEY_ERROR_TOO_MANY_CONFIGS -5
#define PIKEY_ERROR_NO_MEM           -6
#define PIKEY_ERROR_MISC             -7
#define PIKEY_SUCCESS                 0

#define DRAWINFO_VERSION              1

#define DRAW_GRAVITY_LOW              0
#define DRAW_GRAVITY_CENTRE           1
#define DRAW_GRAVITY_HIGH             2

#define PIKEY_KEYMODE_KEYPRESS        0
#define PIKEY_KEYMODE_VT100STREAM     1

typedef int BOOL;
#define TRUE    1
#define FALSE   0

typedef int wchar;

/*****************************************************************************/
/* DRIVERINFO: Your driver needs to populate this struct, when passed it     */
/*    by getDriverInfo().                                                    */
/*****************************************************************************/
typedef struct {
	int   apiVersion;					// API version number
	char  driverName[64];			// driver's name
	char  driverVersion[16];	// driver's version
	BOOL  unicodeSupported;		// TRUE if you support unicode
} DRIVERINFO;

/*****************************************************************************/
/* DRAWINFO: Info to pass to OSK info drawing routines.                      */
/*****************************************************************************/
typedef struct {
	int size;									// sizeof(struct), bytes.
	int structver;            // drawinfo api version.  Set to DRAWINFO_VERSION

  /***************************************************************************/
	/* Hints for draw location, these will not necessarily be obeyed but       */
  /* should be used as a guideline.  Origin is top-left.                     */
	/***************************************************************************/
	int minx;
	int miny;
	int maxx;
	int maxy;

  /***************************************************************************/
	/* Gravity hints: 0 = low, 1 = centre, 2 = high (as per the                */
  /* DRAW_GRAVITY_* constants).                                              */
  /* If the draw area doesn't fill the available area, this is a request     */
  /* for how to orient within the space.  e.g. if gravity_x == 0,            */
  /* and gravity_y == 2,  please draw in the bottom-left corner (low x,      */
  /* high y).                                                                */
	/***************************************************************************/
	char gravity_x;
	char gravity_y;
}	DRAWINFO;


#endif
