home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / plginapi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.9 KB  |  97 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef _PLGINAPI_H_
  20. #define _PLGINAPI_H_
  21. /* plginapi.h - Defines the interface between the Navigator and its plugin */
  22.  
  23. #include <windows.h>
  24. #include "npapi.h"
  25. #include "plginerr.h"
  26.  
  27. #ifdef _WINDOWS
  28.     #ifndef WIN32
  29.         #define NP_EXPORT _export
  30.     #endif
  31. #endif
  32.  
  33. #ifndef NP_EXPORT
  34.     #define NP_EXPORT
  35. #endif
  36.  
  37. typedef unsigned long NPReason;
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. extern NPError NPE_PluginInit();
  44.  
  45. extern NPError NPE_PluginShutdown();
  46.  
  47. extern NPError NPE_New(void *pluginType, NPP instance, uint16 mode, 
  48.                        int16 argc, char *argn[],
  49.                        char *argv[], NPSavedData *saved);
  50.  
  51. extern void NPE_Destroy(NPP instance, NPSavedData **save);
  52.  
  53. extern NPError NPE_SetWindow(NPP instance, NPWindow *window);
  54.  
  55. extern NPError NPE_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
  56.                              NPBool seekable, uint16 *stype);
  57.  
  58. extern int32 NPE_WriteReady(NPP instance, NPStream* stream);
  59.  
  60. extern int32 NPE_Write(NPP instance, NPStream* stream,
  61.                          int32 offset,
  62.                          int32 len, void *buffer);
  63.  
  64. extern NPError NPE_DestroyStream(NPP instance,
  65.                                  NPStream *stream, NPReason reason);
  66.  
  67. extern void NPE_StreamAsFile(NPP instance, NPStream *stream, const char* fname);
  68.  
  69. extern int16 NPE_HandleEvent(NPP instance, void *event);
  70.  
  71. extern void NPE_Print(NPP instance, void *platformPrint);
  72.  
  73. extern NPError NPNE_GetURL(NPP instance, const char *url, const char *window);
  74.  
  75. extern NPError NP_PostURL(NPP instance, const char *url,
  76.                           uint32 len, const char *buf, NPBool file);
  77.  
  78. extern NPError NPNE_RequestRead(NPStream* stream, NPByteRange* rangeList);
  79.  
  80. extern NPError NPNE_NewStream(NPP instance,
  81.                               NPMIMEType type, NPStream *streame);
  82.  
  83. extern int32 NPNE_Write(NPP instance, NPStream *stream,
  84.                         int32 len, void *buffer);
  85.  
  86. extern NPError NPNE_DestroyStream(NPP instance,
  87.                                   NPStream* stream, NPError reason);
  88.  
  89. extern void NPNE_Status(NPP instance, const char *message);
  90.  
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94.  
  95. #endif // _PLGINAPI_H_
  96.  
  97.