"Fossies" - the Fresh Open Source Software Archive

Member "mozplugger-2.1.6/npapi/npn_func_tab.h" (17 Apr 2014, 11015 Bytes) of package /linux/www/old/mozplugger-2.1.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
    2 /* ***** BEGIN LICENSE BLOCK *****
    3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
    4  *
    5  * The contents of this file are subject to the Mozilla Public License Version
    6  * 1.1 (the "License"); you may not use this file except in compliance with
    7  * the License. You may obtain a copy of the License at
    8  * http://www.mozilla.org/MPL/
    9  *
   10  * Software distributed under the License is distributed on an "AS IS" basis,
   11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   12  * for the specific language governing rights and limitations under the
   13  * License.
   14  *
   15  * The Original Code is mozilla.org code.
   16  *
   17  * The Initial Developer of the Original Code is
   18  * Netscape Communications Corporation.
   19  * Portions created by the Initial Developer are Copyright (C) 1998
   20  * the Initial Developer. All Rights Reserved.
   21  *
   22  * Contributor(s):
   23  *
   24  * Alternatively, the contents of this file may be used under the terms of
   25  * either the GNU General Public License Version 2 or later (the "GPL"), or
   26  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   27  * in which case the provisions of the GPL or the LGPL are applicable instead
   28  * of those above. If you wish to allow use of your version of this file only
   29  * under the terms of either the GPL or the LGPL, and not to allow others to
   30  * use your version of this file under the terms of the MPL, indicate your
   31  * decision by deleting the provisions above and replace them with the notice
   32  * and other provisions required by the GPL or the LGPL. If you do not delete
   33  * the provisions above, a recipient may use your version of this file under
   34  * the terms of any one of the MPL, the GPL or the LGPL.
   35  *
   36  * ***** END LICENSE BLOCK ***** */
   37 
   38 #ifndef _NPN_FUNC_TAB_H_
   39 #define _NPN_FUNCS_TAB_H_
   40 
   41 //#include "npapi.h"
   42 //#include "npruntime.h"
   43 
   44 
   45 typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable,
   46                                                               void * retValue);
   47 
   48 typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable,
   49                                                                    void *value);
   50 
   51 typedef NPError (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url,
   52                                           const char* window, void* notifyData);
   53 
   54 typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url,
   55                               const char* window, uint32_t len, const char* buf,
   56                                                  NPBool file, void* notifyData);
   57 
   58 typedef NPError (*NPN_GetURLProcPtr)(NPP instance, const char* url,
   59                                                             const char* window);
   60 
   61 typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* url,
   62                 const char* window, uint32_t len, const char* buf, NPBool file);
   63 
   64 typedef NPError (*NPN_RequestReadProcPtr)(NPStream* stream,
   65                                                         NPByteRange* rangeList);
   66 
   67 typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type,
   68                                          const char* window, NPStream** stream);
   69 
   70 typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream,
   71                                                      int32_t len, void* buffer);
   72 
   73 typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream,
   74                                                                NPReason reason);
   75 
   76 typedef void (*NPN_StatusProcPtr)(NPP instance, const char * message);
   77 
   78 typedef const char * (*NPN_UserAgentProcPtr)(NPP instance);
   79 
   80 typedef void * (*NPN_MemAllocProcPtr)(uint32_t size);
   81 
   82 typedef void (*NPN_MemFreeProcPtr)(void * ptr);
   83 
   84 typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size);
   85 
   86 typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
   87 
   88 typedef void* (*NPN_GetJavaEnvProcPtr)(void);
   89 
   90 typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance);
   91 
   92 typedef void (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect * rect);
   93 
   94 typedef void (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region);
   95 
   96 typedef void (*NPN_ForceRedrawProcPtr)(NPP instance);
   97 
   98 typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8 * name);
   99 
  100 typedef void (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8 ** names,
  101                                   int32_t nameCount, NPIdentifier* identifiers);
  102 
  103 typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid);
  104 
  105 typedef bool (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier);
  106 
  107 typedef NPUTF8* (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier);
  108 
  109 typedef int32_t (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier);
  110 
  111 typedef NPObject* (*NPN_CreateObjectProcPtr)(NPP npp, NPClass * aClass);
  112 
  113 typedef NPObject* (*NPN_RetainObjectProcPtr)(NPObject * obj);
  114 
  115 typedef void (*NPN_ReleaseObjectProcPtr)(NPObject * obj);
  116 
  117 typedef bool (*NPN_InvokeProcPtr)(NPP npp, NPObject * obj,
  118                                NPIdentifier methodName, const NPVariant * args,
  119                                          uint32_t argCount, NPVariant * result);
  120 
  121 typedef bool (*NPN_InvokeDefaultProcPtr)(NPP npp, NPObject * obj,
  122                  const NPVariant * args, uint32_t argCount, NPVariant * result);
  123 
  124 typedef bool (*NPN_EvaluateProcPtr)(NPP npp, NPObject * obj, NPString * script,
  125                                                             NPVariant * result);
  126 
  127 typedef bool (*NPN_GetPropertyProcPtr)(NPP npp, NPObject * obj,
  128                                  NPIdentifier propertyName, NPVariant * result);
  129 
  130 typedef bool (*NPN_SetPropertyProcPtr)(NPP npp, NPObject * obj,
  131                             NPIdentifier propertyName, const NPVariant * value);
  132 
  133 typedef bool (*NPN_RemovePropertyProcPtr)(NPP npp, NPObject * obj,
  134                                                      NPIdentifier propertyName);
  135 
  136 typedef bool (*NPN_HasPropertyProcPtr)(NPP npp, NPObject * obj,
  137                                                      NPIdentifier propertyName);
  138 
  139 typedef bool (*NPN_HasMethodProcPtr)(NPP npp, NPObject * obj,
  140                                                      NPIdentifier propertyName);
  141 
  142 typedef void (*NPN_ReleaseVariantValueProcPtr)(NPVariant * variant);
  143 
  144 typedef void (*NPN_SetExceptionProcPtr)(NPObject * obj, const NPUTF8 * message);
  145 
  146 typedef void (*NPN_PushPopupsEnabledStateProcPtr)(NPP npp, NPBool enabled);
  147 
  148 typedef void (*NPN_PopPopupsEnabledStateProcPtr)(NPP npp);
  149 
  150 typedef bool (*NPN_EnumerateProcPtr)(NPP npp, NPObject * obj,
  151                                   NPIdentifier ** identifier, uint32_t * count);
  152 
  153 typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP instance,
  154                                          void (*func)(void *), void * userData);
  155 
  156 typedef bool (*NPN_ConstructProcPtr)(NPP npp, NPObject * obj,
  157                  const NPVariant * args, uint32_t argCount, NPVariant * result);
  158 
  159 typedef NPError (*NPN_GetValueForURLPtr)(NPP npp, NPNURLVariable variable,
  160                                const char * url, char ** value, uint32_t * len);
  161 
  162 typedef NPError (*NPN_SetValueForURLPtr)(NPP npp, NPNURLVariable variable,
  163                             const char * url, const char * value, uint32_t len);
  164 
  165 typedef NPError (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char * protocol,
  166                           const char * host, int32_t port, const char * scheme,
  167                          const char * realm, char ** username, uint32_t * ulen,
  168                                              char ** password, uint32_t * plen);
  169 
  170 typedef uint32_t (*NPN_ScheduleTimerPtr)(NPP instance, uint32_t interval,
  171                    NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
  172 
  173 typedef void (*NPN_UnscheduleTimerPtr)(NPP instance, uint32_t timerID);
  174 
  175 typedef NPError (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu * menu);
  176 
  177 typedef NPBool (*NPN_ConvertPointPtr)(NPP instance, double sourceX,
  178                      double sourceY, NPCoordinateSpace sourceSpace,
  179                    double * destX, double * destY, NPCoordinateSpace destSpace);
  180 
  181 typedef NPBool (*NPN_HandleEventPtr)(NPP instance, void * event, NPBool handled);
  182 
  183 typedef NPBool (*NPN_UnfocusInstancePtr)(NPP instance, NPFocusDirection direction);
  184 
  185 typedef void (*NPN_URLRedirectResponsePtr)(NPP instance, void * notifyData,
  186                                                                   NPBool allow);
  187 
  188 /******************************************************************************/
  189 struct NPNetscapeFuncs_s
  190 {
  191     uint16_t size;
  192     uint16_t version;
  193     NPN_GetURLProcPtr geturl;
  194     NPN_PostURLProcPtr posturl;
  195     NPN_RequestReadProcPtr requestread;
  196     NPN_NewStreamProcPtr newstream;
  197     NPN_WriteProcPtr write;
  198     NPN_DestroyStreamProcPtr destroystream;
  199     NPN_StatusProcPtr status;
  200     NPN_UserAgentProcPtr uagent;
  201     NPN_MemAllocProcPtr memalloc;
  202     NPN_MemFreeProcPtr memfree;
  203     NPN_MemFlushProcPtr memflush;
  204     NPN_ReloadPluginsProcPtr reloadplugins;
  205     NPN_GetJavaEnvProcPtr getJavaEnv;
  206     NPN_GetJavaPeerProcPtr getJavaPeer;
  207     NPN_GetURLNotifyProcPtr geturlnotify;
  208     NPN_PostURLNotifyProcPtr posturlnotify;
  209     NPN_GetValueProcPtr getvalue;
  210     NPN_SetValueProcPtr setvalue;
  211     NPN_InvalidateRectProcPtr invalidaterect;
  212     NPN_InvalidateRegionProcPtr invalidateregion;
  213     NPN_ForceRedrawProcPtr forceredraw;
  214     NPN_GetStringIdentifierProcPtr getstringidentifier;
  215     NPN_GetStringIdentifiersProcPtr getstringidentifiers;
  216     NPN_GetIntIdentifierProcPtr getintidentifier;
  217     NPN_IdentifierIsStringProcPtr identifierisstring;
  218     NPN_UTF8FromIdentifierProcPtr utf8fromidentifier;
  219     NPN_IntFromIdentifierProcPtr intfromidentifier;
  220     NPN_CreateObjectProcPtr createobject;
  221     NPN_RetainObjectProcPtr retainobject;
  222     NPN_ReleaseObjectProcPtr releaseobject;
  223     NPN_InvokeProcPtr invoke;
  224     NPN_InvokeDefaultProcPtr invokeDefault;
  225     NPN_EvaluateProcPtr evaluate;
  226     NPN_GetPropertyProcPtr getproperty;
  227     NPN_SetPropertyProcPtr setproperty;
  228     NPN_RemovePropertyProcPtr removeproperty;
  229     NPN_HasPropertyProcPtr hasproperty;
  230     NPN_HasMethodProcPtr hasmethod;
  231     NPN_ReleaseVariantValueProcPtr releasevariantvalue;
  232     NPN_SetExceptionProcPtr setexception;
  233     NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate;
  234     NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate;
  235     NPN_EnumerateProcPtr enumerate;
  236     NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall;
  237     NPN_ConstructProcPtr construct;
  238     NPN_GetValueForURLPtr getvalueforurl;
  239     NPN_SetValueForURLPtr setvalueforurl;
  240     NPN_GetAuthenticationInfoPtr getauthenticationinfo;
  241     NPN_ScheduleTimerPtr scheduletimer;
  242     NPN_UnscheduleTimerPtr unscheduletimer;
  243     NPN_PopUpContextMenuPtr popupcontextmenu;
  244     NPN_ConvertPointPtr convertpoint;
  245     NPN_HandleEventPtr handleevent;
  246     NPN_UnfocusInstancePtr unfocusinstance;
  247     NPN_URLRedirectResponsePtr urlredirectresponse;
  248 };
  249 
  250 typedef struct NPNetscapeFuncs_s NPNetscapeFuncs;
  251 
  252 void NPN_Version(int * netscape_major, int * netscape_minor);
  253 
  254 NPError NPN_InitFuncTable(const NPNetscapeFuncs * nsTable);
  255 
  256 #endif