hxtypes.h
来自「Amarok是一款在LINUX或其他类UNIX操作系统中运行的音频播放器软件。 」· C头文件 代码 · 共 731 行 · 第 1/2 页
H
731 行
/* * * This software is released under the provisions of the GPL version 2. * see file "COPYING". If that file is not available, the full statement * of the license can be found at * * http://www.fsf.org/licensing/licenses/gpl.txt * * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. * */#if defined(_SYMBIAN)# include <e32def.h># include <e32std.h># include <platform/symbian/symbiantypes.h> /* For our TInt64 impl */#endif#ifdef _VXWORKS#include "types/vxTypesOld.h"#include "vxWorks.h" /* md3 - added to override SENS macro. net/mbuf.h */# ifdef m_flags# undef m_flags# endif /* m_flags */ /* md3 - added to override SENS macro, net/radix.h */# ifdef Free# undef Free# endif /* Free */#endif#ifdef _MACINTOSH#pragma once#endif#ifndef _HXTYPES_H_#define _HXTYPES_H_// this is essential to make sure that new is not #define'd before the C++ version is included.#if (defined(_MSC_VER) && defined(_DEBUG) && defined(__cplusplus) && !defined(WIN32_PLATFORM_PSPC) && !defined(_SYMBIAN) && !defined(_OPENWAVE))#include <memory>#endif// disable the "debug info truncated at 255" warning.#if defined _MSC_VER#pragma warning (disable: 4786)#endif#if (defined(_MSC_VER) && (_MSC_VER > 1100) && defined(_BASETSD_H_))#error For VC++ 6.0 or higher you must include hxtypes.h before other windows header files.#endif#if defined(_SYMBIAN)typedef TInt8 INT8;typedef TUint8 UINT8;typedef TInt16 INT16;typedef TUint16 UINT16;typedef TInt32 INT32;typedef TUint32 UINT32;typedef TUint32 UINT; /* Its unclear, but UINT is suppose to be 32 bits. */typedef TBool BOOL;#else# ifndef _VXWORKS# if defined(QWS) && !defined(QT_CLEAN_NAMESPACE)#error "You need to define QT_CLEAN_NAMESPACE when using Qt with Helix. If you don't you'll have conflicts with the Helix INT32, UINT32, and UINT definitions"# endif typedef char INT8; /* signed 8 bit value */ typedef unsigned char UINT8; /* unsigned 8 bit value */ typedef short int INT16; /* signed 16 bit value */ typedef unsigned short int UINT16; /* unsigned 16 bit value */# if (defined _UNIX && defined _LONG_IS_64) typedef int INT32; /* signed 32 bit value */ typedef unsigned int UINT32; /* unsigned 32 bit value */ typedef unsigned int UINT;# elif defined _VXWORKS typedef int INT32; /* signed 32 bit value */ typedef unsigned int UINT32; /* unsigned 32 bit value */ typedef unsigned int UINT;# else typedef long int INT32; /* signed 32 bit value */ typedef unsigned long int UINT32; /* unsigned 32 bit value */ typedef unsigned int UINT;# endif /* (defined _UNIX && (defined _ALPHA || OSF1)) */# if (defined _UNIX && defined _IRIX)# ifdef __LONG_MAX__# undef __LONG_MAX__# endif# define __LONG_MAX__ 2147483647# endif#endif /* _VXWORKS */#endif /* _SYMBIAN */#if defined(HELIX_CONFIG_AVOID_BOOL) typedef int HXBOOL;# if defined(BOOL)# undef BOOL# endif#else# if defined(BOOL) typedef BOOL HXBOOL;# else typedef int HXBOOL; typedef HXBOOL BOOL;# endif#endif#define ARE_BOOLS_EQUAL(a,b) (((a) && (b)) || (!(a) && !(b)))#ifndef HX_BITFIELDtypedef unsigned char HX_BITFIELD;#endiftypedef INT32 LONG32; /* signed 32 bit value */typedef UINT32 ULONG32; /* unsigned 32 bit value */#ifdef _LONG_IS_64typedef long int INT64;typedef unsigned long int UINT64;#elif defined(_WINDOWS) || defined(_OPENWAVE_SIMULATOR)typedef __int64 INT64;typedef unsigned __int64 UINT64;#elif defined(_SYMBIAN) && !defined (_SYMBIAN_81_)typedef SymInt64 INT64;typedef SymInt64 UINT64;#elsetypedef long long INT64;typedef unsigned long long UINT64;#endif /* _WINDOWS *//* define the float and double type for all platforms */#define HXFLOAT float#define HXDOUBLE doubletypedef ULONG32 HX_MOFTAG;/* Some platforms have native 64 bit int types, others don't * so, we provide these casting macros that have to be used * to cast 64-bit ints to smaller datatypes */#if defined(_SYMBIAN) && !defined (_SYMBIAN_81_)#define INT64_TO_ULONG32(a) ((ULONG32)((a).Low()))#define INT64_TO_UINT32(a) ((UINT32)((a).Low()))#define INT64_TO_INT32(a) ((INT32)((a).Low()))#define INT64_TO_DOUBLE(a) ((a).GetTReal())#define INT64_TO_FLOAT(a) ((a).GetTReal())#define UINT32_TO_DOUBLE(a) (SymbianUINT32toDouble(a))#else#define INT64_TO_ULONG32(a) ((ULONG32)(a))#define INT64_TO_UINT32(a) ((UINT32) (a))#define INT64_TO_INT32(a) ((INT32) (a))#define INT64_TO_DOUBLE(a) ((double) (a))#define INT64_TO_FLOAT(a) ((float) (a))#define UINT32_TO_DOUBLE(a) ((double) (a))#endif#ifdef _MACINTOSH #ifdef powerc #define _MACPPC #else #define _MAC68K #endif#endif#if defined(_SYMBIAN)#define PATH_MAX KMaxPath#endif#ifdef __cplusplusextern "C" { /* Assume C declarations for C++ */#endif /* __cplusplus */#define LANGUAGE_CODE "EN"#ifdef _WIN16#define MAX_PATH 260#define PRODUCT_ID "play16"#define PLUS_PRODUCT_ID "plus16"#else#define PRODUCT_ID "play32"#define PLUS_PRODUCT_ID "plus32"#endif// $Private:#define DEFAULT_CONN_TIMEOUT 20 // in seconds#define MAX_TIMESTAMP_GAP 0x2fffffff#if !defined(MAX_UINT32)#define MAX_UINT32 0xffffffff#endif /* MAX_UINT32 */#if defined(_MACINTOSH)#define kLetInterruptsFinishBeforeQuittingGestalt 'RN$~'#endif// $EndPrivate.#define MAX_DISPLAY_NAME 256#define HX_INVALID_VALUE (ULONG32)0xffffffff#define HX_FREE(x) ((x) ? (free (x), (x) = 0) : 0)#if defined(HELIX_CONFIG_NULL_DELETE_UNSAFE)#define HX_DELETE(x) ((x) ? (delete (x), (x) = 0) : 0)#define HX_VECTOR_DELETE(x) ((x) ? (delete [] (x), (x) = 0) : 0)#else // defined(HELIX_CONFIG_NULL_DELETE_UNSAFE)#define HX_DELETE(x) (delete (x), (x) = 0)#define HX_VECTOR_DELETE(x) (delete [] (x), (x) = 0)#endif // defined(HELIX_CONFIG_NULL_DELETE_UNSAFE)#define RA_FILE_MAGIC_NUMBER 0x2E7261FDL /* RealAudio File Identifier */#define RM_FILE_MAGIC_NUMBER 0x2E524D46L /* RealMedia File Identifier */#define RIFF_FILE_MAGIC_NUMBER 0x52494646L /* RIFF (AVI etc.) File Identifier */#ifndef _VXWORKStypedef UINT8 UCHAR; /* unsigned 8 bit value */#endiftypedef INT8 CHAR; /* signed 8 bit value */typedef UINT8 BYTE;typedef INT32 long32;typedef UINT32 u_long32;#ifndef _MACINTOSHtypedef INT8 Int8;#endiftypedef UINT8 u_Int8;typedef INT16 Int16;typedef UINT16 u_Int16;typedef INT32 Int32;typedef UINT32 u_Int32;/* * XXXGo * deprecated...now that we need UFIXED and FIXED, this name is confusing... * use the ones below. */typedef ULONG32 UFIXED32; /* FIXED point value */#define FLOAT_TO_FIXED(x) ((UFIXED32) ((x) * (1L << 16) + 0.5))#define FIXED_TO_FLOAT(x) ((float) ((((float)x)/ (float)(1L <<16))))/* * float and fixed point value conversion */#define HX_FLOAT_TO_UFIXED(x) ((UFIXED32) ((x) * (1L << 16) + 0.5))#define HX_UFIXED_TO_FLOAT(x) ((float) ((((float)x)/ (float)(1L <<16))))typedef LONG32 FIXED32; /* FIXED point value */#define HX_FLOAT_TO_FIXED(x) ((FIXED32) ((x) * (1L << 16) + 0.5))#define HX_FIXED_TO_FLOAT(x) ((float) ((((float)x)/ (float)(1L <<16))))/* * UFIXED32 is a 32 value where the upper 16 bits are the unsigned integer * portion of value, and the lower 16 bits are the fractional part of the * value */typedef const char* PCSTR;/* * FOURCC's are 32bit codes used in Tagged File formats like * the RealMedia file format. */#ifndef FOURCCtypedef UINT32 FOURCC;#endif#ifndef HX_FOURCC#define HX_FOURCC( ch0, ch1, ch2, ch3 ) \ ( (UINT32)(UINT8)(ch0) | ( (UINT32)(UINT8)(ch1) << 8 ) | \ ( (UINT32)(UINT8)(ch2) << 16 ) | ( (UINT32)(UINT8)(ch3) << 24 ) )#endiftypedef UINT16 PrefKey;#ifdef __cplusplus}#endif /* __cplusplus */#ifdef TRUE#undef TRUE#endif#ifdef FALSE#undef FALSE#endif#ifndef TRUE#define TRUE 1#endif#ifndef FALSE#define FALSE 0#endif#ifndef NULL#ifdef __cplusplus#define NULL 0#else#define NULL ((void *)0)#endif#endif#ifndef _WINDOWS /* defined in windef.h on Windows platform */#ifndef HIWORD#define HIWORD(x) ((x) >> 16)#endif#ifndef LOWORD#define LOWORD(x) ((x) & 0xffff)#endif#endif#ifndef NOMINMAX/* Always use macro versions of these! */#ifndef max#define max(a, b) (((a) > (b)) ? (a) : (b))#endif#ifndef min#define min(a, b) (((a) < (b)) ? (a) : (b))#endif#endif/* Should use capitalized macro versions of these, as the lowercase versions conflict with the STL spec *///get these from sys/param.h to avoid tons of warnings about redefining them:#ifdef _UNIX#include <sys/param.h>#endif#ifndef MAX#define MAX(a, b) (((a) > (b)) ? (a) : (b))#endif#ifndef MIN#define MIN(a, b) (((a) < (b)) ? (a) : (b))#endif#define HX_MAX(a, b) (((a) > (b)) ? (a) : (b))#define HX_MIN(a, b) (((a) < (b)) ? (a) : (b))/*--------------------------------------------------------------------------| ZeroInit - initializes a block of memory with zeros--------------------------------------------------------------------------*/#define ZeroInit(pb) memset((void *)pb,0,sizeof(*(pb)))#ifndef __MACTYPES__typedef unsigned char Byte;#endif/*/////////////////////////////////////////////////////////////////////////////// HXEXPORT needed for RA.H and RAGUI.H, should be able to be defined
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?