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 00014 U_NAMESPACE_BEGIN 00015 00016 typedef int32_t le_int32; 00017 typedef uint32_t le_uint32; 00018 typedef int16_t le_int16; 00019 typedef uint16_t le_uint16; 00020 typedef int8_t le_int8; 00021 typedef uint8_t le_uint8; 00022 00023 typedef UBool le_bool; 00024 00025 #ifndef true 00026 #define true 1 00027 #endif 00028 00029 #ifndef false 00030 #define false 0 00031 #endif 00032 00033 #ifndef NULL 00034 #define NULL 0 00035 #endif 00036 00037 typedef le_uint32 LETag; 00038 00039 typedef le_uint16 LEGlyphID; 00040 00041 typedef UChar LEUnicode16; 00042 typedef UChar32 LEUnicode32; 00043 typedef UChar LEUnicode; // FIXME: we should depricate this type in favor of LEUnicode16... 00044 00045 struct LEPoint 00046 { 00047 float fX; 00048 float fY; 00049 }; 00050 00051 #ifndef XP_CPLUSPLUS 00052 typedef struct LEPoint LEPoint; 00053 #endif 00054 00055 #define LE_ARRAY_COPY(dst, src, count) memcpy(dst, src, (count) * sizeof (src)[0]) 00056 00057 enum LEErrorCode { 00058 /* informational */ 00059 // none right now... 00060 00061 /* success */ 00062 LE_NO_ERROR = U_ZERO_ERROR, 00063 00064 /* failures */ 00065 LE_ILLEGAL_ARGUMENT_ERROR = U_ILLEGAL_ARGUMENT_ERROR, 00066 LE_MEMORY_ALLOCATION_ERROR = U_MEMORY_ALLOCATION_ERROR, 00067 LE_INDEX_OUT_OF_BOUNDS_ERROR = U_INDEX_OUTOFBOUNDS_ERROR, 00068 LE_NO_LAYOUT_ERROR = U_UNSUPPORTED_ERROR, 00069 LE_INTERNAL_ERROR = U_INTERNAL_PROGRAM_ERROR 00070 }; 00071 00072 #ifndef XP_CPLUSPLUS 00073 typedef enum LEErrorCode LEErrorCode; 00074 #endif 00075 00076 #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code)) 00077 #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code)) 00078 00079 U_NAMESPACE_END 00080 #endif 00081 00082