~ubuntu-branches/ubuntu/karmic/gears/karmic

« back to all changes in this revision

Viewing changes to gears/base/safari/npapi_patches.h

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Lesicnik
  • Date: 2009-04-30 19:15:25 UTC
  • Revision ID: james.westby@ubuntu.com-20090430191525-0790sb5wzg8ou0xb
Tags: upstream-0.5.21.0~svn3334+dfsg
ImportĀ upstreamĀ versionĀ 0.5.21.0~svn3334+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2008, Google Inc.
 
2
//
 
3
// Redistribution and use in source and binary forms, with or without 
 
4
// modification, are permitted provided that the following conditions are met:
 
5
//
 
6
//  1. Redistributions of source code must retain the above copyright notice, 
 
7
//     this list of conditions and the following disclaimer.
 
8
//  2. Redistributions in binary form must reproduce the above copyright notice,
 
9
//     this list of conditions and the following disclaimer in the documentation
 
10
//     and/or other materials provided with the distribution.
 
11
//  3. Neither the name of Google Inc. nor the names of its contributors may be
 
12
//     used to endorse or promote products derived from this software without
 
13
//     specific prior written permission.
 
14
//
 
15
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 
16
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
 
17
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
 
18
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 
19
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
20
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 
21
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 
22
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
 
23
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
 
24
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
25
 
 
26
// The WebKit NPAPI headers in the 10.4u SDK are missing some fields, we
 
27
// define our own versions of these structures here so we can access them.
 
28
// When we upgrade to a post-10.4 SDK, this file can be removed.
 
29
 
 
30
#ifndef GEARS_BASE_SAFARI_NPAPI_PATCHES_H__
 
31
#define GEARS_BASE_SAFARI_NPAPI_PATCHES_H__
 
32
 
 
33
#ifdef BROWSER_WEBKIT
 
34
typedef bool (*NPN_EnumerateProcPtr) (NPP npp, NPObject *npobj, 
 
35
              NPIdentifier **identifier, uint32_t *count);
 
36
typedef void  (*NPN_PushPopupsEnabledStateProcPtr)(NPP instance, 
 
37
                                                   NPBool enabled);
 
38
typedef void  (*NPN_PopPopupsEnabledStateProcPtr)(NPP instance);
 
39
 
 
40
typedef struct {
 
41
    uint16 size;
 
42
    uint16 version;
 
43
    
 
44
    NPN_GetURLProcPtr geturl;
 
45
    NPN_PostURLProcPtr posturl;
 
46
    NPN_RequestReadProcPtr requestread;
 
47
    NPN_NewStreamProcPtr newstream;
 
48
    NPN_WriteProcPtr write;
 
49
    NPN_DestroyStreamProcPtr destroystream;
 
50
    NPN_StatusProcPtr status;
 
51
    NPN_UserAgentProcPtr uagent;
 
52
    NPN_MemAllocProcPtr memalloc;
 
53
    NPN_MemFreeProcPtr memfree;
 
54
    NPN_MemFlushProcPtr memflush;
 
55
    NPN_ReloadPluginsProcPtr reloadplugins;
 
56
    NPN_GetJavaEnvProcPtr getJavaEnv;
 
57
    NPN_GetJavaPeerProcPtr getJavaPeer;
 
58
    NPN_GetURLNotifyProcPtr geturlnotify;
 
59
    NPN_PostURLNotifyProcPtr posturlnotify;
 
60
    NPN_GetValueProcPtr getvalue;
 
61
    NPN_SetValueProcPtr setvalue;
 
62
    NPN_InvalidateRectProcPtr invalidaterect;
 
63
    NPN_InvalidateRegionProcPtr invalidateregion;
 
64
    NPN_ForceRedrawProcPtr forceredraw;
 
65
    
 
66
    NPN_GetStringIdentifierProcPtr getstringidentifier;
 
67
    NPN_GetStringIdentifiersProcPtr getstringidentifiers;
 
68
    NPN_GetIntIdentifierProcPtr getintidentifier;
 
69
    NPN_IdentifierIsStringProcPtr identifierisstring;
 
70
    NPN_UTF8FromIdentifierProcPtr utf8fromidentifier;
 
71
    NPN_IntFromIdentifierProcPtr intfromidentifier;
 
72
    NPN_CreateObjectProcPtr createobject;
 
73
    NPN_RetainObjectProcPtr retainobject;
 
74
    NPN_ReleaseObjectProcPtr releaseobject;
 
75
    NPN_InvokeProcPtr invoke;
 
76
    NPN_InvokeDefaultProcPtr invokeDefault;
 
77
    NPN_EvaluateProcPtr evaluate;
 
78
    NPN_GetPropertyProcPtr getproperty;
 
79
    NPN_SetPropertyProcPtr setproperty;
 
80
    NPN_RemovePropertyProcPtr removeproperty;
 
81
    NPN_HasPropertyProcPtr hasproperty;
 
82
    NPN_HasMethodProcPtr hasmethod;
 
83
    NPN_ReleaseVariantValueProcPtr releasevariantvalue;
 
84
    NPN_SetExceptionProcPtr setexception;
 
85
    NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate;
 
86
    NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate;
 
87
    NPN_EnumerateProcPtr enumerate;
 
88
 
 
89
} GearsNPNetscapeFuncs;
 
90
 
 
91
bool NPN_Enumerate(NPP npp, NPObject *obj, NPIdentifier **identifier,
 
92
                   uint32_t *count);
 
93
 
 
94
#endif
 
95
 
 
96
#endif GEARS_BASE_SAFARI_NPAPI_PATCHES_H__