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

📄 npupp.h

📁 kmplayer源碼 對學習很有幫助 在unix_Linux下的開發環境下
💻 H
📖 第 1 页 / 共 5 页
字号:
	uppNPN_HasMethodProcInfo = kThinkCStackBased		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPObject*)))		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPIdentifier)))		| RESULT_SIZE(SIZE_CODE(sizeof(bool)))};#define NewNPN_HasMethodProc(FUNC)		\		(NPN_HasMethodUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_HasMethodProcInfo, GetCurrentArchitecture())#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3)		\		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_HasMethodProcInfo, (ARG1), (ARG2), (ARG3))#elsetypedef bool (* NP_LOADDS NPN_HasMethodUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName);#define NewNPN_HasMethodProc(FUNC)		\		((NPN_HasMethodUPP) (FUNC))#define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3)		\		(*(FUNC))((ARG1), (ARG2), (ARG3))#endif/* NPN_ReleaseVariantValue */#if _NPUPP_USE_UPP_typedef UniversalProcPtr NPN_ReleaseVariantValue;enum {	uppNPN_ReleaseVariantValueProcInfo = kThinkCStackBased		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPVariant*)))		| RESULT_SIZE(SIZE_CODE(0))};#define NewNPN_ReleaseVariantValueProc(FUNC)		\		(NPN_ReleaseVariantValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, GetCurrentArchitecture())#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1)		\		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReleaseVariantValueProcInfo, (ARG1))	#elsetypedef void (* NP_LOADDS NPN_ReleaseVariantValueUPP)(NPVariant *variant);#define NewNPN_ReleaseVariantValueProc(FUNC)		\		((NPN_ReleaseVariantValueUPP) (FUNC))#define CallNPN_ReleaseVariantValueProc(FUNC, ARG1)		\		(*(FUNC))((ARG1))#endif/* NPN_SetException */#if _NPUPP_USE_UPP_typedef UniversalProcPtr NPN_SetExceptionUPP;enum {	uppNPN_SetExceptionProcInfo = kThinkCStackBased		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPObject*)))		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const NPUTF8*)))		| RESULT_SIZE(SIZE_CODE(0))};#define NewNPN_SetExceptionProc(FUNC)		\		(NPN_SetExceptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, GetCurrentArchitecture())#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2)		\		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetExceptionProcInfo, (ARG1), (ARG2))	#elsetypedef void (* NP_LOADDS NPN_SetExceptionUPP)(NPObject *obj, const NPUTF8 *message);#define NewNPN_SetExceptionProc(FUNC)		\		((NPN_SetExceptionUPP) (FUNC))#define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2)		\		(*(FUNC))((ARG1), (ARG2))	#endif/* NPN_PushPopupsEnabledStateUPP */#if _NPUPP_USE_UPP_typedef UniversalProcPtr NPN_PushPopupsEnabledStateUPP;enum {	uppNPN_PushPopupsEnabledStateProcInfo = kThinkCStackBased		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))        | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPBool)))		| RESULT_SIZE(SIZE_CODE(0))};#define NewNPN_PushPopupsEnabledStateProc(FUNC)		\		(NPN_PushPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, GetCurrentArchitecture())#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2)		\		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PushPopupsEnabledStateProcInfo, (ARG1), (ARG2))#elsetypedef bool (* NP_LOADDS NPN_PushPopupsEnabledStateUPP)(NPP npp, NPBool enabled);#define NewNPN_PushPopupsEnabledStateProc(FUNC)		\		((NPN_PushPopupsEnabledStateUPP) (FUNC))#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2)		\		(*(FUNC))((ARG1), (ARG2))#endif/* NPN_PopPopupsEnabledState */#if _NPUPP_USE_UPP_typedef UniversalProcPtr NPN_PopPopupsEnabledStateUPP;enum {	uppNPN_PopPopupsEnabledStateProcInfo = kThinkCStackBased		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))		| RESULT_SIZE(SIZE_CODE(0))};#define NewNPN_PopPopupsEnabledStateProc(FUNC)		\		(NPN_PopPopupsEnabledStateUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, GetCurrentArchitecture())#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1)		\		(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PopPopupsEnabledStateProcInfo, (ARG1))#elsetypedef bool (* NP_LOADDS NPN_PopPopupsEnabledStateUPP)(NPP npp);#define NewNPN_PopPopupsEnabledStateProc(FUNC)		\		((NPN_PopPopupsEnabledStateUPP) (FUNC))#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1)		\		(*(FUNC))((ARG1))#endif/****************************************************************************************** * The actual plugin function table definitions *******************************************************************************************/#ifdef XP_MAC#if PRAGMA_STRUCT_ALIGN#pragma options align=mac68k#endif#endiftypedef struct _NPPluginFuncs {    uint16 size;    uint16 version;    NPP_NewUPP newp;    NPP_DestroyUPP destroy;    NPP_SetWindowUPP setwindow;    NPP_NewStreamUPP newstream;    NPP_DestroyStreamUPP destroystream;    NPP_StreamAsFileUPP asfile;    NPP_WriteReadyUPP writeready;    NPP_WriteUPP write;    NPP_PrintUPP print;    NPP_HandleEventUPP event;    NPP_URLNotifyUPP urlnotify;    JRIGlobalRef javaClass;    NPP_GetValueUPP getvalue;    NPP_SetValueUPP setvalue;} NPPluginFuncs;typedef struct _NPNetscapeFuncs {    uint16 size;    uint16 version;    NPN_GetURLUPP geturl;    NPN_PostURLUPP posturl;    NPN_RequestReadUPP requestread;    NPN_NewStreamUPP newstream;    NPN_WriteUPP write;    NPN_DestroyStreamUPP destroystream;    NPN_StatusUPP status;    NPN_UserAgentUPP uagent;    NPN_MemAllocUPP memalloc;    NPN_MemFreeUPP memfree;    NPN_MemFlushUPP memflush;    NPN_ReloadPluginsUPP reloadplugins;    NPN_GetJavaEnvUPP getJavaEnv;    NPN_GetJavaPeerUPP getJavaPeer;    NPN_GetURLNotifyUPP geturlnotify;    NPN_PostURLNotifyUPP posturlnotify;    NPN_GetValueUPP getvalue;    NPN_SetValueUPP setvalue;    NPN_InvalidateRectUPP invalidaterect;    NPN_InvalidateRegionUPP invalidateregion;    NPN_ForceRedrawUPP forceredraw;    NPN_GetStringIdentifierUPP getstringidentifier;    NPN_GetStringIdentifiersUPP getstringidentifiers;    NPN_GetIntIdentifierUPP getintidentifier;    NPN_IdentifierIsStringUPP identifierisstring;    NPN_UTF8FromIdentifierUPP utf8fromidentifier;    NPN_IntFromIdentifierUPP intfromidentifier;    NPN_CreateObjectUPP createobject;    NPN_RetainObjectUPP retainobject;    NPN_ReleaseObjectUPP releaseobject;    NPN_InvokeUPP invoke;    NPN_InvokeDefaultUPP invokeDefault;    NPN_EvaluateUPP evaluate;    NPN_GetPropertyUPP getproperty;    NPN_SetPropertyUPP setproperty;    NPN_RemovePropertyUPP removeproperty;    NPN_HasPropertyUPP hasproperty;    NPN_HasMethodUPP hasmethod;    NPN_ReleaseVariantValueUPP releasevariantvalue;    NPN_SetExceptionUPP setexception;    NPN_PushPopupsEnabledStateUPP pushpopupsenabledstate;    NPN_PopPopupsEnabledStateUPP poppopupsenabledstate;} NPNetscapeFuncs;#ifdef XP_MAC#if PRAGMA_STRUCT_ALIGN#pragma options align=reset#endif#endif#if defined(XP_MAC) || defined(XP_MACOSX)/****************************************************************************************** * Mac platform-specific plugin glue stuff *******************************************************************************************//* * Main entry point of the plugin. * This routine will be called when the plugin is loaded. The function * tables are passed in and the plugin fills in the NPPluginFuncs table * and NPPShutdownUPP for Netscape's use. */#if _NPUPP_USE_UPP_typedef UniversalProcPtr NPP_MainEntryUPP;enum {	uppNPP_MainEntryProcInfo = kThinkCStackBased		| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*)))		| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*)))		| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*)))		| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))};#define NewNPP_MainEntryProc(FUNC)		\		(NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture())#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)		\		CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP))#elsetypedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*);#define NewNPP_MainEntryProc(FUNC)		\		((NPP_MainEntryUPP) (FUNC))#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)		\		(*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP))#endif/* * Mac version(s) of NP_GetMIMEDescription(const char *) * These can be called to retreive MIME information from the plugin dynamically * * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way *       to get mime info from the plugin only on OSX and may not be supported  *       in furture version--use NP_GetMIMEDescription instead */enum{ kBPSupportedMIMETypesStructVers_1    = 1};typedef struct _BPSupportedMIMETypes{ SInt32    structVersion;      /* struct version */ Handle    typeStrings;        /* STR# formated handle, allocated by plug-in */ Handle    infoStrings;        /* STR# formated handle, allocated by plug-in */} BPSupportedMIMETypes;OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags);#if _NPUPP_USE_UPP_#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescriptionRD"typedef UniversalProcPtr NP_GetMIMEDescriptionUPP;enum {	uppNP_GetMIMEDescEntryProc = kThinkCStackBased		| RESULT_SIZE(SIZE_CODE(sizeof(const char *)))};#define NewNP_GetMIMEDescEntryProc(FUNC)		\		(NP_GetMIMEDescriptionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNP_GetMIMEDescEntryProc, GetCurrentArchitecture())#define CallNP_GetMIMEDescEntryProc(FUNC)		\		(const char *)CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNP_GetMIMEDescEntryProc)#else  /* !_NPUPP_USE_UPP_ */ /* NP_GetMIMEDescription */#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"typedef const char* (* NP_LOADDS NP_GetMIMEDescriptionUPP)();#define NewNP_GetMIMEDescEntryProc(FUNC)		\		((NP_GetMIMEDescriptionUPP) (FUNC))#define CallNP_GetMIMEDescEntryProc(FUNC)		\		(*(FUNC))()/* BP_GetSupportedMIMETypes */typedef OSErr (* NP_LOADDS BP_GetSupportedMIMETypesUPP)(BPSupportedMIMETypes*, UInt32);#define NewBP_GetSupportedMIMETypesEntryProc(FUNC)		\		((BP_GetSupportedMIMETypesUPP) (FUNC))#define CallBP_GetMIMEDescEntryProc(FUNC,  mimeInfo, flags)		\		(*(FUNC))((mimeInfo), (flags))#endif#endif /* MAC */#if defined(_WINDOWS)#define OSCALL WINAPI#else#if defined(__OS2__)#define OSCALL _System#else#define OSCALL#endif#endif#if defined( _WINDOWS ) || defined (__OS2__)#ifdef __cplusplusextern "C" {#endif/* plugin meta member functions */#if defined(__OS2__)typedef struct _NPPluginData {   /* Alternate OS2 Plugin interface */    char *pMimeTypes;    char *pFileExtents;    char *pFileOpenTemplate;    char *pProductName;    char *pProductDescription;    unsigned long dwProductVersionMS;    unsigned long dwProductVersionLS;} NPPluginData;NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData);#endifNPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs);NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs);NPError OSCALL NP_Shutdown();char*	NP_GetMIMEDescription();#ifdef __cplusplus}#endif#endif /* _WINDOWS || __OS2__ */#if defined(__OS2__)#pragma pack()#endif#ifdef XP_UNIX#ifdef __cplusplusextern "C" {#endif/* plugin meta member functions */char*	NP_GetMIMEDescription(void);NPError	NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*);NPError	NP_Shutdown(void);NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue);#ifdef __cplusplus}#endif#endif /* XP_UNIX */#endif /* _NPUPP_H_ */

⌨️ 快捷键说明

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