|
1 /* ***** BEGIN LICENSE BLOCK ***** |
|
2 * |
|
3 * Copyright (c) 2010, Mozilla Corporation |
|
4 * All rights reserved. |
|
5 * |
|
6 * Redistribution and use in source and binary forms, with or without |
|
7 * modification, are permitted provided that the following conditions are met: |
|
8 * |
|
9 * * Redistributions of source code must retain the above copyright notice, this |
|
10 * list of conditions and the following disclaimer. |
|
11 * * Redistributions in binary form must reproduce the above copyright notice, |
|
12 * this list of conditions and the following disclaimer in the documentation |
|
13 * and/or other materials provided with the distribution. |
|
14 * * Neither the name of the Mozilla Corporation nor the names of its |
|
15 * contributors may be used to endorse or promote products derived from this |
|
16 * software without specific prior written permission. |
|
17 * |
|
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
|
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR |
|
22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
|
25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
28 * |
|
29 * Contributor(s): |
|
30 * Brad Lassey <blassey@mozilla.com> |
|
31 * |
|
32 * ***** END LICENSE BLOCK ***** */ |
|
33 #include "nptest_platform.h" |
|
34 #include "npapi.h" |
|
35 |
|
36 struct _PlatformData { |
|
37 }; |
|
38 using namespace std; |
|
39 |
|
40 bool |
|
41 pluginSupportsWindowMode() |
|
42 { |
|
43 return false; |
|
44 } |
|
45 |
|
46 bool |
|
47 pluginSupportsWindowlessMode() |
|
48 { |
|
49 return true; |
|
50 } |
|
51 |
|
52 bool |
|
53 pluginSupportsAsyncBitmapDrawing() |
|
54 { |
|
55 return false; |
|
56 } |
|
57 |
|
58 NPError |
|
59 pluginInstanceInit(InstanceData* instanceData) |
|
60 { |
|
61 printf("NPERR_INCOMPATIBLE_VERSION_ERROR\n"); |
|
62 return NPERR_INCOMPATIBLE_VERSION_ERROR; |
|
63 } |
|
64 |
|
65 void |
|
66 pluginInstanceShutdown(InstanceData* instanceData) |
|
67 { |
|
68 NPN_MemFree(instanceData->platformData); |
|
69 instanceData->platformData = 0; |
|
70 } |
|
71 |
|
72 void |
|
73 pluginDoSetWindow(InstanceData* instanceData, NPWindow* newWindow) |
|
74 { |
|
75 instanceData->window = *newWindow; |
|
76 } |
|
77 |
|
78 void |
|
79 pluginWidgetInit(InstanceData* instanceData, void* oldWindow) |
|
80 { |
|
81 // XXX nothing here yet since we don't support windowed plugins |
|
82 } |
|
83 |
|
84 int16_t |
|
85 pluginHandleEvent(InstanceData* instanceData, void* event) |
|
86 { |
|
87 return 0; |
|
88 } |
|
89 |
|
90 int32_t pluginGetEdge(InstanceData* instanceData, RectEdge edge) |
|
91 { |
|
92 // XXX nothing here yet since we don't support windowed plugins |
|
93 return NPTEST_INT32_ERROR; |
|
94 } |
|
95 |
|
96 int32_t pluginGetClipRegionRectCount(InstanceData* instanceData) |
|
97 { |
|
98 // XXX nothing here yet since we don't support windowed plugins |
|
99 return NPTEST_INT32_ERROR; |
|
100 } |
|
101 |
|
102 int32_t pluginGetClipRegionRectEdge(InstanceData* instanceData, |
|
103 int32_t rectIndex, RectEdge edge) |
|
104 { |
|
105 // XXX nothing here yet since we don't support windowed plugins |
|
106 return NPTEST_INT32_ERROR; |
|
107 } |
|
108 |
|
109 void pluginDoInternalConsistencyCheck(InstanceData* instanceData, string& error) |
|
110 { |
|
111 } |