michael@0: /* ***** BEGIN LICENSE BLOCK ***** michael@0: * michael@0: * Copyright (c) 2010, Mozilla Corporation michael@0: * All rights reserved. michael@0: * michael@0: * Redistribution and use in source and binary forms, with or without michael@0: * modification, are permitted provided that the following conditions are met: michael@0: * michael@0: * * Redistributions of source code must retain the above copyright notice, this michael@0: * list of conditions and the following disclaimer. michael@0: * * Redistributions in binary form must reproduce the above copyright notice, michael@0: * this list of conditions and the following disclaimer in the documentation michael@0: * and/or other materials provided with the distribution. michael@0: * * Neither the name of the Mozilla Corporation nor the names of its michael@0: * contributors may be used to endorse or promote products derived from this michael@0: * software without specific prior written permission. michael@0: * michael@0: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND michael@0: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED michael@0: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE michael@0: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR michael@0: * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES michael@0: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; michael@0: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON michael@0: * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT michael@0: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS michael@0: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. michael@0: * michael@0: * Contributor(s): michael@0: * Brad Lassey michael@0: * michael@0: * ***** END LICENSE BLOCK ***** */ michael@0: #include "nptest_platform.h" michael@0: #include "npapi.h" michael@0: michael@0: struct _PlatformData { michael@0: }; michael@0: using namespace std; michael@0: michael@0: bool michael@0: pluginSupportsWindowMode() michael@0: { michael@0: return false; michael@0: } michael@0: michael@0: bool michael@0: pluginSupportsWindowlessMode() michael@0: { michael@0: return true; michael@0: } michael@0: michael@0: bool michael@0: pluginSupportsAsyncBitmapDrawing() michael@0: { michael@0: return false; michael@0: } michael@0: michael@0: NPError michael@0: pluginInstanceInit(InstanceData* instanceData) michael@0: { michael@0: printf("NPERR_INCOMPATIBLE_VERSION_ERROR\n"); michael@0: return NPERR_INCOMPATIBLE_VERSION_ERROR; michael@0: } michael@0: michael@0: void michael@0: pluginInstanceShutdown(InstanceData* instanceData) michael@0: { michael@0: NPN_MemFree(instanceData->platformData); michael@0: instanceData->platformData = 0; michael@0: } michael@0: michael@0: void michael@0: pluginDoSetWindow(InstanceData* instanceData, NPWindow* newWindow) michael@0: { michael@0: instanceData->window = *newWindow; michael@0: } michael@0: michael@0: void michael@0: pluginWidgetInit(InstanceData* instanceData, void* oldWindow) michael@0: { michael@0: // XXX nothing here yet since we don't support windowed plugins michael@0: } michael@0: michael@0: int16_t michael@0: pluginHandleEvent(InstanceData* instanceData, void* event) michael@0: { michael@0: return 0; michael@0: } michael@0: michael@0: int32_t pluginGetEdge(InstanceData* instanceData, RectEdge edge) michael@0: { michael@0: // XXX nothing here yet since we don't support windowed plugins michael@0: return NPTEST_INT32_ERROR; michael@0: } michael@0: michael@0: int32_t pluginGetClipRegionRectCount(InstanceData* instanceData) michael@0: { michael@0: // XXX nothing here yet since we don't support windowed plugins michael@0: return NPTEST_INT32_ERROR; michael@0: } michael@0: michael@0: int32_t pluginGetClipRegionRectEdge(InstanceData* instanceData, michael@0: int32_t rectIndex, RectEdge edge) michael@0: { michael@0: // XXX nothing here yet since we don't support windowed plugins michael@0: return NPTEST_INT32_ERROR; michael@0: } michael@0: michael@0: void pluginDoInternalConsistencyCheck(InstanceData* instanceData, string& error) michael@0: { michael@0: }