/*	This header file has all structures and macros needed to use
	routines in the x.lib link library. */

#include <exec/types.h>
#include <exec/memory.h>
#include <libraries/dosextens.h>

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *	Header file for key conversion subroutines					 *
 *  Written 22 Mar 88 by Talin									 *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* error codes returned */

#define	KEY_ERR_NOT_RAWKEY	-2
#define KEY_ERR_TOO_LONG	-1

/* special key codes */

enum special_keys {
	UP_ARROW=0x01, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, HELP_KEY,
	FUNKEY1=0x80,   FUNKEY2,   FUNKEY3,   FUNKEY4,   FUNKEY5,
		 FUNKEY6,   FUNKEY7,   FUNKEY8,   FUNKEY9,   FUNKEY10,
	S_FUNKEY1=0x90, S_FUNKEY2, S_FUNKEY3, S_FUNKEY4, S_FUNKEY5,
		 S_FUNKEY6, S_FUNKEY7, S_FUNKEY8, S_FUNKEY9, S_FUNKEY10
};

#define SHIFT				0x0003
#define CONTROL				0x0008
#define ALT					0x0030
#define L_AMIGA				0x0040
#define R_AMIGA				0x0080
#define NUMPAD				0x0100
#define KEY_REPEAT			0x0200


/* date to string standard formats */

#define DATE_AMIGADOS		"D-M-Y"
#define DATE_INTERNATIONAL	"Y-N-D"
#define DATE_USA			"N-D-Y"
#define DATE_CANADIAN		"D-N-Y"


/* macros */

#define IsDisk(d)	((d)->dn_Type == DLT_DEVICE && DiskType((d)) == ID_DOS_DISK)
