00001 00002 /* 00003 * @(#)LETypes.h 1.2 00/03/15 00004 * 00005 * (C) Copyright IBM Corp. 1998, 1999, 2000 - All Rights Reserved 00006 * 00007 */ 00008 00009 #ifndef __LETYPES_H 00010 #define __LETYPES_H 00011 00012 #include "unicode/utypes.h" 00013 #include "unicode/uobject.h" 00014 //#include "cmemory.h" 00015 00016 U_NAMESPACE_BEGIN 00017 00018 typedef int32_t le_int32; 00019 typedef uint32_t le_uint32; 00020 typedef int16_t le_int16; 00021 typedef uint16_t le_uint16; 00022 typedef int8_t le_int8; 00023 typedef uint8_t le_uint8; 00024 00025 typedef UBool le_bool; 00026 00027 #ifndef true 00028 #define true 1 00029 #endif 00030 00031 #ifndef false 00032 #define false 0 00033 #endif 00034 00035 #ifndef NULL 00036 #define NULL 0 00037 #endif 00038 00039 typedef le_uint32 LETag; 00040 00041 typedef le_uint16 LEGlyphID; 00042 00043 typedef UChar LEUnicode16; 00044 typedef UChar32 LEUnicode32; 00045 typedef UChar LEUnicode; // FIXME: we should deprecate this type in favor of LEUnicode16... 00046 00047 struct LEPoint 00048 { 00049 float fX; 00050 float fY; 00051 }; 00052 00053 #ifndef XP_CPLUSPLUS 00054 typedef struct LEPoint LEPoint; 00055 #endif 00056 00057 #define LE_ARRAY_COPY(dst, src, count) memcpy(dst, src, (count) * sizeof (src)[0]) 00058 00059 enum LEErrorCode { 00060 /* informational */ 00061 // none right now... 00062 00063 /* success */ 00064 LE_NO_ERROR = U_ZERO_ERROR, 00065 00066 /* failures */ 00067 LE_ILLEGAL_ARGUMENT_ERROR = U_ILLEGAL_ARGUMENT_ERROR, 00068 LE_MEMORY_ALLOCATION_ERROR = U_MEMORY_ALLOCATION_ERROR, 00069 LE_INDEX_OUT_OF_BOUNDS_ERROR = U_INDEX_OUTOFBOUNDS_ERROR, 00070 LE_NO_LAYOUT_ERROR = U_UNSUPPORTED_ERROR, 00071 LE_INTERNAL_ERROR = U_INTERNAL_PROGRAM_ERROR 00072 }; 00073 00074 #ifndef XP_CPLUSPLUS 00075 typedef enum LEErrorCode LEErrorCode; 00076 #endif 00077 00078 #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code)) 00079 #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code)) 00080 00081 U_NAMESPACE_END 00082 #endif 00083 00084