]>
git.saurik.com Git - wxWidgets.git/blob - utils/nplugin/src/npapp.h
3 * Purpose: wxPluginApp declaration
7 * Copyright: (c) Julian Smart
18 // Data passed to OnNewInstance
31 class WXDLLEXPORT wxPluginApp
: public wxApp
33 DECLARE_ABSTRACT_CLASS(wxPluginApp
)
37 virtual ~wxPluginApp(void);
39 // Find a frame given a NP instance
40 wxPluginFrame
*FindFrame(NPP instance
);
43 void AddFrame(wxPluginFrame
*frame
);
46 void RemoveFrame(wxPluginFrame
*frame
);
48 // Set attribute/values for the last instance
49 void SetAttributeValues(const int n
, char *argn
[], char *argv
[]);
51 ///////////////////////////////////////////////////////////////
52 // Higher-level API than NP API
53 virtual wxPluginFrame
*OnNewInstance(const wxPluginData
& data
) = 0;
55 ///////////////////////////////////////////////////////////////
56 // Netscape Plugin API calls routed via wxPluginApp
58 virtual NPError
NPP_Destroy(NPP instance
, NPSavedData
** save
);
59 virtual NPError
NPP_DestroyStream(NPP instance
, NPStream
* stream
, NPError reason
);
60 // virtual jref NPP_GetJavaClass(void);
61 virtual NPError
NPP_Initialize(void);
62 virtual NPError
NPP_New(NPMIMEType pluginType
, NPP instance
, uint16 mode
,
63 int16 argc
, char* argn
[], char* argv
[], NPSavedData
* saved
);
64 virtual NPError
NPP_NewStream(NPP instance
, NPMIMEType type
, NPStream
*stream
,
65 NPBool seekable
, uint16
* stype
);
66 virtual void NPP_Print(NPP instance
, NPPrint
* platformPrint
);
67 virtual NPError
NPP_SetWindow(NPP instance
, NPWindow
* window
);
68 virtual void NPP_Shutdown(void);
69 virtual void NPP_StreamAsFile(NPP instance
, NPStream
* stream
, const char *fname
);
71 virtual void NPP_URLNotify(NPP instance, const char* url, NPReason reason,
74 virtual int32
NPP_Write(NPP instance
, NPStream
* stream
, int32 offset
, int32 len
,
76 virtual int32
NPP_WriteReady(NPP instance
, NPStream
* stream
);
80 // List of plugin frames
83 // Temporary NPP_New arguments so we can wait until NPP_SetWindow is called
84 // before creating a frame
88 wxPluginApp
*wxGetPluginApp(void);