зеркало из https://github.com/mozilla/pjs.git
Bug 485073 - OS/2 enable test plugin equivalent to other platforms; r=mozilla@Weilbacher.org
This commit is contained in:
Родитель
2a7a81f524
Коммит
a3772fe23a
|
@ -76,7 +76,7 @@ TOOL_DIRS += default/mac
|
|||
endif
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
ifneq (,$(filter WINNT Darwin Linux,$(OS_ARCH)))
|
||||
ifneq (,$(filter WINNT Darwin Linux OS2,$(OS_ARCH)))
|
||||
DIRS += test
|
||||
TOOL_DIRS += sdk
|
||||
endif
|
||||
|
|
|
@ -50,7 +50,7 @@ DIRS = samples
|
|||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
|
||||
PROG_SUFFIX = .exe
|
||||
else
|
||||
PROG_SUFFIX =
|
||||
|
|
|
@ -67,6 +67,10 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
|||
CPPSRCS += nptest_gtk2.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
|
||||
CPPSRCS += nptest_os2.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
|
||||
CPPSRCS += nptest_qt.cpp
|
||||
endif
|
||||
|
|
|
@ -118,7 +118,7 @@ NP_GetPluginVersion()
|
|||
|
||||
#if defined(XP_UNIX)
|
||||
NP_EXPORT(char*) NP_GetMIMEDescription()
|
||||
#elif defined(XP_WIN)
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
char* NP_GetMIMEDescription()
|
||||
#endif
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ static void fillPluginFunctionTable(NPPluginFuncs* pFuncs)
|
|||
|
||||
#if defined(XP_MACOSX)
|
||||
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs)
|
||||
#elif defined(XP_WIN)
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
NPError OSCALL NP_Initialize(NPNetscapeFuncs* bFuncs)
|
||||
#elif defined(XP_UNIX)
|
||||
NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs)
|
||||
|
@ -198,10 +198,10 @@ NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs)
|
|||
|
||||
#if defined(XP_MACOSX)
|
||||
NP_EXPORT(NPError) NP_GetEntryPoints(NPPluginFuncs* pFuncs)
|
||||
#elif defined(XP_WIN)
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs)
|
||||
#endif
|
||||
#if defined(XP_MACOSX) || defined(XP_WIN)
|
||||
#if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
|
||||
{
|
||||
fillPluginFunctionTable(pFuncs);
|
||||
return NPERR_NO_ERROR;
|
||||
|
@ -210,7 +210,7 @@ NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs)
|
|||
|
||||
#if defined(XP_UNIX)
|
||||
NP_EXPORT(NPError) NP_Shutdown()
|
||||
#elif defined(XP_WIN)
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
NPError OSCALL NP_Shutdown()
|
||||
#endif
|
||||
{
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
*
|
||||
* Copyright (c) 2008, Mozilla Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Mozilla Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Josh Aas <josh@mozilla.com>
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nptest_platform.h"
|
||||
|
||||
NPError
|
||||
pluginInstanceInit(InstanceData* instanceData)
|
||||
{
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
|
||||
int16_t
|
||||
pluginHandleEvent(InstanceData* instanceData, void* event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
pluginDraw(InstanceData* instanceData)
|
||||
{
|
||||
}
|
Загрузка…
Ссылка в новой задаче