|
1 /* ***** BEGIN LICENSE BLOCK ***** |
|
2 * |
|
3 * Copyright (c) 2008, 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 * Josh Aas <josh@mozilla.com> |
|
31 * |
|
32 * ***** END LICENSE BLOCK ***** */ |
|
33 #include "nptest_platform.h" |
|
34 #include "npapi.h" |
|
35 |
|
36 using namespace std; |
|
37 |
|
38 bool |
|
39 pluginSupportsWindowMode() |
|
40 { |
|
41 return false; |
|
42 } |
|
43 |
|
44 bool |
|
45 pluginSupportsWindowlessMode() |
|
46 { |
|
47 return true; |
|
48 } |
|
49 |
|
50 bool |
|
51 pluginSupportsAsyncBitmapDrawing() |
|
52 { |
|
53 return false; |
|
54 } |
|
55 |
|
56 NPError |
|
57 pluginInstanceInit(InstanceData* instanceData) |
|
58 { |
|
59 printf("NPERR_INCOMPATIBLE_VERSION_ERROR\n"); |
|
60 return NPERR_INCOMPATIBLE_VERSION_ERROR; |
|
61 } |
|
62 |
|
63 void |
|
64 pluginInstanceShutdown(InstanceData* instanceData) |
|
65 { |
|
66 NPN_MemFree(instanceData->platformData); |
|
67 instanceData->platformData = 0; |
|
68 } |
|
69 |
|
70 void |
|
71 pluginDoSetWindow(InstanceData* instanceData, NPWindow* newWindow) |
|
72 { |
|
73 instanceData->window = *newWindow; |
|
74 } |
|
75 |
|
76 void |
|
77 pluginWidgetInit(InstanceData* instanceData, void* oldWindow) |
|
78 { |
|
79 // XXX nothing here yet since we don't support windowed plugins |
|
80 } |
|
81 |
|
82 int16_t |
|
83 pluginHandleEvent(InstanceData* instanceData, void* event) |
|
84 { |
|
85 return 0; |
|
86 } |
|
87 |
|
88 int32_t pluginGetEdge(InstanceData* instanceData, RectEdge edge) |
|
89 { |
|
90 // XXX nothing here yet since we don't support windowed plugins |
|
91 return NPTEST_INT32_ERROR; |
|
92 } |
|
93 |
|
94 int32_t pluginGetClipRegionRectCount(InstanceData* instanceData) |
|
95 { |
|
96 // XXX nothing here yet since we don't support windowed plugins |
|
97 return NPTEST_INT32_ERROR; |
|
98 } |
|
99 |
|
100 int32_t pluginGetClipRegionRectEdge(InstanceData* instanceData, |
|
101 int32_t rectIndex, RectEdge edge) |
|
102 { |
|
103 // XXX nothing here yet since we don't support windowed plugins |
|
104 return NPTEST_INT32_ERROR; |
|
105 } |
|
106 |
|
107 void pluginDoInternalConsistencyCheck(InstanceData* instanceData, string& error) |
|
108 { |
|
109 } |