/*==============================================================================
	Copyright (C) 2008 IT Access.,Co.Ltd. All Rights Reserved.
	
	This software is the confidential and proprietary information 
	of IT Access.,Co.Ltd.
	
	Note:

==============================================================================*/

#ifndef	_INC_GEAL_COMMON_H
#define	_INC_GEAL_COMMON_H

#ifdef __cplusplus
extern "C" {		/* Assume C declarations for C++ */
#endif				/* __cplusplus */

/*==============================================================================
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> INCLUDE. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
==============================================================================*/

/*==============================================================================
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CONFIGURATION. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
==============================================================================*/
typedef signed char			GE_INT8;
typedef unsigned char		GE_UINT8;
typedef signed short		GE_INT16;
typedef unsigned short		GE_UINT16;	
typedef signed long			GE_INT32;
typedef unsigned long		GE_UINT32;
typedef signed int			GE_INT;
typedef unsigned int		GE_UINT;
typedef signed int			GE_BOOL;
typedef float				GE_FLOAT;
typedef unsigned short		GE_ID;
typedef void				GE_VOID;
typedef unsigned short		GE_TCHAR;
typedef unsigned short		GE_UNICODE;
typedef GE_UINT32			GE_COLOR;

#define GE_INT8_MIN			(-128)				/* Minimum signed   char  value */
#define GE_INT8_MAX			(+127)				/* Minimum signed   char  value */
#define GE_UINT8_MAX		(0xff)				/* Maximum unsigned char  value */
#define GE_INT16_MIN		(-32768)			/* Minimum signed   short value */
#define GE_INT16_MAX		(+32767)			/* Maximum signed   short value */
#define GE_UINT16_MAX		(0xffff)			/* Maximum unsigned short value */
#define GE_INT32_MIN		(-2147483648L)		/* Minimum signed   long  value */
#define GE_INT32_MAX		(2147483647L)		/* Maximum signed   long  value */
#define GE_UINT32_MAX		(0xffffffffUL)		/* Maximum unsigned long  value */

#define GE_TRUE				(1)
#define GE_FALSE			(0)
#define GE_NULL				((void *)0)

#define GE_INVALID_ID		(0)

#define GE_TRANSPARENT_COLOR	(0x80000000)

#define GE_BYID				(0)
#define GE_BYPOSITION		(1)

/*==============================================================================
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> TYPE. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
==============================================================================*/

/* Type of loaction. */
typedef enum
{
	eGELOC_INVALID,
	eGELOC_TOPLEFT,
	eGELOC_TOP,
	eGELOC_TOPRIGHT,
	eGELOC_LEFT,
	eGELOC_CENTER,
	eGELOC_RIGHT,
	eGELOC_BOTTOMLEFT,
	eGELOC_BOTTOM,
	eGELOC_BOTTOMRIGHT,
	eGELOC_COUNT,
} eGE_LOCATE;

/* Type of direction. */
typedef enum
{
	eGEDIR_INVALID,
	eGEDIR_UP,
	eGEDIR_DOWN,
	eGEDIR_LEFT,
	eGEDIR_RIGHT
} eGE_DIRECTION;

/* Type of point. */
typedef struct _GE_POINT
{
	GE_INT16		x, y;
} GE_POINT;

typedef struct _GE_POINT32
{
	GE_INT32		x, y;
} GE_POINT32;

/* Type of size. */
typedef struct _GE_SIZE
{
	GE_INT16		cx, cy;
} GE_SIZE;

typedef struct _GE_SIZE32
{
	GE_INT32		cx, cy;
} GE_SIZE32;

/* Type of rectangle. */
typedef struct _GE_RECT
{
	GE_INT16		left;
	GE_INT16		top;
	GE_INT16		right;
	GE_INT16		bottom;
} GE_RECT;

typedef struct _GE_RECT32
{
	GE_INT32		left;
	GE_INT32		top;
	GE_INT32		right;
	GE_INT32		bottom;
} GE_RECT32;

/* Type of the character width in a Propotional font. */ 
typedef struct _GE_ABC
{
	GE_INT8			abcA;
	GE_UINT8		abcB;
	GE_INT8			abcC;
	GE_UINT8		firstbit;
} GE_ABC;


#ifdef __cplusplus
	}				/* Assume C declarations for C++ */
#endif  			/* __cplusplus */
#endif				/* _INC_GEAL_COMMON_H */
