⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hxtypes.h

📁 著名的 helix realplayer 基于手机 symbian 系统的 播放器全套源代码
💻 H
📖 第 1 页 / 共 2 页
字号:

/*
/////////////////////////////////////////////////////////////////////////////
// HXEXPORT needed for RA.H and RAGUI.H, should be able to be defined
// and used in cross platform code...
/////////////////////////////////////////////////////////////////////////////
*/
#if defined(_WIN32) || defined(_WINDOWS)
#ifdef _WIN32
#define HXEXPORT            __declspec(dllexport) __stdcall
#define HXEXPORT_PTR        __stdcall *
#else /* Windows, but not 32 bit... */
#define HXEXPORT            _pascal __export
#define HXEXPORT_PTR        _pascal *
#define WAVE_FORMAT_PCM	    1
#define LPCTSTR				LPCSTR
#endif
#else /* Not Windows... */




#define HXEXPORT
#define HXEXPORT_PTR        *
#endif

#if defined(_WIN32) || defined(_WINDOWS) || defined (_MACINTOSH)|| defined (_UNIX)  
typedef void (*RANOTIFYPROC)( void* );
#endif

#if defined(EXPORT_CLASSES) && defined(_WINDOWS)     
#ifdef _WIN32
#define HXEXPORT_CLASS __declspec(dllexport)
#else
#define HXEXPORT_CLASS __export
#endif // _WIN32
#else
#define HXEXPORT_CLASS
#endif // EXPORT_CLASSES 


/*
 *  STDMETHODCALLTYPE
 */
#ifndef STDMETHODCALLTYPE
#if defined(_WIN32) || defined(_MPPC_)
#ifdef _MPPC_
#define STDMETHODCALLTYPE       __cdecl
#else
#define STDMETHODCALLTYPE       __stdcall
#endif
#elif defined(_WIN16)
// XXXTW I made the change below on 5/18/98.  The __export was causing 
//       conflicts with duplicate CHXBuffer methods in being linked into
//       rpupgrd and rpdestpn.  Also, the warning was "export imported".
//       This was fixed by removing the __export.  The __export is also
//       causing the same problem in pndebug methods.
//#define STDMETHODCALLTYPE       __export far _cdecl
#define STDMETHODCALLTYPE       far _cdecl
#else
#define STDMETHODCALLTYPE
#endif
#endif

/*
 *  STDMETHODVCALLTYPE  (V is for variable number of arguments)
 */
#ifndef STDMETHODVCALLTYPE
#if defined(_WINDOWS) || defined(_MPPC_)
#define STDMETHODVCALLTYPE      __cdecl
#else
#define STDMETHODVCALLTYPE
#endif
#endif

/*
 *  STDAPICALLTYPE
 */
#ifndef STDAPICALLTYPE
#if defined(_WIN32) || defined(_MPPC_)
#define STDAPICALLTYPE          __stdcall
#elif defined(_WIN16)
#define STDAPICALLTYPE          __export FAR PASCAL
#else
#define STDAPICALLTYPE
#endif
#endif

/*
 *  STDAPIVCALLTYPE (V is for variable number of arguments)
 */
#ifndef STDAPIVCALLTYPE
#if defined(_WINDOWS) || defined(_MPPC_)
#define STDAPIVCALLTYPE         __cdecl
#else
#define STDAPIVCALLTYPE
#endif
#endif

/*
/////////////////////////////////////////////////////////////////////////////
//
//  Macro:
//
//      HX_GET_MAJOR_VERSION()
//
//  Purpose:
//
//      Returns the Major version portion of the encoded product version 
//      of the RealAudio application interface DLL previously returned from
//      a call to RaGetProductVersion().
//
//  Parameters:
//
//      prodVer
//      The encoded product version of the RealAudio application interface 
//      DLL previously returned from a call to RaGetProductVersion().
//
//  Return:
//
//      The major version number of the RealAudio application interface DLL
//
//
*/
#define HX_GET_MAJOR_VERSION(prodVer)   ((prodVer >> 28) & 0xF)

/*
/////////////////////////////////////////////////////////////////////////////
//
//  Macro:
//
//      HX_GET_MINOR_VERSION()
//
//  Purpose:
//
//      Returns the minor version portion of the encoded product version 
//      of the RealAudio application interface DLL previously returned from
//      a call to RaGetProductVersion().
//
//  Parameters:
//
//      prodVer
//      The encoded product version of the RealAudio application interface 
//      DLL previously returned from a call to RaGetProductVersion().
//
//  Return:
//
//      The minor version number of the RealAudio application interface DLL
//
//
*/
#define HX_GET_MINOR_VERSION(prodVer)   ((prodVer >> 20) & 0xFF)

/*
/////////////////////////////////////////////////////////////////////////////
//
//  Macro:
//
//      HX_GET_RELEASE_NUMBER()
//
//  Purpose:
//
//      Returns the release number portion of the encoded product version 
//      of the RealAudio application interface DLL previously returned from
//      a call to RaGetProductVersion().
//
//  Parameters:
//
//      prodVer
//      The encoded product version of the RealAudio application interface 
//      DLL previously returned from a call to RaGetProductVersion().
//
//  Return:
//
//      The release number of the RealAudio application interface DLL
//
//
*/
#define HX_GET_RELEASE_NUMBER(prodVer)  ((prodVer >> 12) & 0xFF)

/*
/////////////////////////////////////////////////////////////////////////////
//
//  Macro:
//
//      HX_GET_BUILD_NUMBER()
//
//  Purpose:
//
//      Returns the build number portion of the encoded product version 
//      of the RealAudio application interface DLL previously returned from
//      a call to RaGetProductVersion().
//
//  Parameters:
//
//      prodVer
//      The encoded product version of the RealAudio application interface 
//      DLL previously returned from a call to RaGetProductVersion().
//
//  Return:
//
//      The build number of the RealAudio application interface DLL
//
//
*/
#define HX_GET_BUILD_NUMBER(prodVer)    (prodVer & 0xFFF)

/*
/////////////////////////////////////////////////////////////////////////////
//
//  Macro:
//
//      HX_ENCODE_PROD_VERSION()
//
//  Purpose:
//
//      Encodes a major version, minor version, release number, and build
//      number into a product version for testing against the product version
//      of the RealAudio application interface DLL returned from a call to 
//      RaGetProductVersion().
//
//  Parameters:
//
//      major
//      The major version number to encode.
//
//      mimor
//      The minor version number to encode.
//
//      release
//      The release number to encode.
//
//      build
//      The build number to encode.
//
//  Return:
//
//      The encoded product version.
//
//  NOTES:
//      
//      Macintosh DEVELOPERS especially, make sure when using the HX_ENCODE_PROD_VERSION
//      that you are passing a ULONG32 or equivalent for each of the parameters. 
//      By default a number passed in as a constant is a short unless it requires more room,
//      so designate the constant as a long by appending a L to the end of it.  
//      Example:
//          WORKS:
//              HX_ENCODE_VERSION(2L,1L,1L,0L);
//
//          DOES NOT WORK:
//              HX_ENCODE_VERSION(2,1,1,0);
//
*/

#define HX_ENCODE_PROD_VERSION(major,minor,release,build)   \
            ((ULONG32)((ULONG32)major << 28) | ((ULONG32)minor << 20) | \
            ((ULONG32)release << 12) | (ULONG32)build)

#define HX_ENCODE_ADD_PRIVATE_FIELD(ulversion,ulprivate) \
			((ULONG32)((ULONG32)(ulversion) & (UINT32)0xFFFFFF00) | (ULONG32)(ulprivate) )

#define HX_EXTRACT_PRIVATE_FIELD(ulversion)(ulversion & (UINT32)0xFF)

#define HX_EXTRACT_MAJOR_VERSION(ulversion) ((ulversion)>>28)
#define HX_EXTRACT_MINOR_VERSION(ulversion) (((ulversion)>>20) & (UINT32)0xFF)
	
#ifdef _AIX
    typedef int                 tv_sec_t;
    typedef int                 tv_usec_t;
#elif (defined _HPUX)
    typedef UINT32              tv_sec_t;
    typedef INT32               tv_usec_t;
#else
    typedef INT32               tv_sec_t;
    typedef INT32               tv_usec_t;
#endif /* _AIX */

#ifndef VOLATILE
#define VOLATILE volatile
#endif

#ifdef __GNUC__
#define PRIVATE_DESTRUCTORS_ARE_NOT_A_CRIME friend class SilenceGCCWarnings;
#else
#define PRIVATE_DESTRUCTORS_ARE_NOT_A_CRIME
#endif

typedef ULONG32 HXXRESOURCE;
typedef ULONG32 HXXHANDLE;
typedef ULONG32 HXXIMAGE;

// Macro which indicates that a particular variable is unused. Use this to
// avoid compiler warnings.
#define UNUSED(x)

/*
 * For VC++ 6.0 and higher we need to include this substitute header file
 * in place of the standard header file basetsd.h, since this standard 
 * header file conflicts with our definitions.
 */
#if defined(_MSC_VER) && (_MSC_VER > 1100) && !defined(_SYMBIAN)
#include "hxbastsd.h"
#ifdef WIN32_PLATFORM_PSPC
#define _TYPES_H_
#endif
#endif

#ifdef _VXWORKS
/* throw in some defines for VXWORKS */
#define MAXPATHLEN 255


#endif

#ifdef _MACINTOSH
// xxxbobclark with CWPro 7, there is a code generation bug in the long long
// casting code. It can be avoided by first casting to an unsigned long long.
// This is supposedly fixed in the upcoming (as of this writing) CWPro 8, but
// for now we're setting up the casting using a macro to change it easily.
#define CAST_TO_INT64 (INT64)(UINT64)
#else
#define CAST_TO_INT64 (INT64)
#endif


#if defined _LONG_IS_64 && (defined _OSF1 || defined _SOLARIS || defined _HPUX)
typedef unsigned long PTR_INT;
#else
typedef unsigned int PTR_INT;
#endif


/*
/////////////////////////////////////////////////////////////////////////////
//
//  Macro:
//
//      DEFINE_CONSTANT_STRING()
//
//  Purpose:
//
//      declare a constant string as "const char *" or "extern const char *" depending on whether or
//	not INITGUID is defined. This allows constant strings to be safely added
//	to a header file without risk of multiply defined symbols if that header is included in a DLL
//	and in a library that the DLL links to. While INITGUID doesn't have anything to do with constant
//	strings, it is a great constant to switch off of because it is already used to denote when a GUID
//	should be defined as external.
//
//  Parameters:
//
//      name
//      The name of the variable to which the constant string will be assigned
//
//      string
//      the constant string (in quotes).
//
//
//
//  NOTES:
//      There is currently no way to use DEFINE_CONSTANT_STRING() to declare an "extern const char*" when
//	INITGUID is defined. This functionality could be added, but until there is a use case, it would just
//	make things more complicated.
//
*/
#if defined (INITGUID)
#define DEFINE_CONSTANT_STRING(name, string) \
    const char *name = string;
#else
#define DEFINE_CONSTANT_STRING(name, string) \
    extern const char* name;
#endif


#endif /* _HXTYPES_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -