mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Beos fix for Bug #38249. Thanks to Justin Morey <justin@68k.org> for the patch.
This commit is contained in:
parent
87d19933d5
commit
f8f7701766
@ -36,7 +36,13 @@ CPPSRCS = npsimple.cpp
|
|||||||
|
|
||||||
LOCAL_INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../public
|
LOCAL_INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../public
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_XPCOM_LIBS) -L$(DIST)/lib -lgtksuperwin $(TK_LIBS)
|
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_XPCOM_LIBS) -L$(DIST)/lib
|
||||||
|
|
||||||
|
ifdef MOZ_ENABLE_GTK
|
||||||
|
EXTRA_DSO_LDOPTS += -lgtksuperwin
|
||||||
|
endif
|
||||||
|
|
||||||
|
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
|
@ -88,19 +88,18 @@
|
|||||||
* Windows PlatformInstance
|
* Windows PlatformInstance
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_PC
|
#if defined(XP_PC)
|
||||||
typedef struct _PlatformInstance
|
typedef struct _PlatformInstance
|
||||||
{
|
{
|
||||||
HWND fhWnd;
|
HWND fhWnd;
|
||||||
WNDPROC fDefaultWindowProc;
|
WNDPROC fDefaultWindowProc;
|
||||||
} PlatformInstance;
|
} PlatformInstance;
|
||||||
#endif /* XP_PC */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* UNIX PlatformInstance
|
* UNIX PlatformInstance
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_UNIX
|
#elif defined(XP_UNIX)
|
||||||
typedef struct _PlatformInstance
|
typedef struct _PlatformInstance
|
||||||
{
|
{
|
||||||
Window window;
|
Window window;
|
||||||
@ -110,18 +109,27 @@ typedef struct _PlatformInstance
|
|||||||
uint32 x, y;
|
uint32 x, y;
|
||||||
uint32 width, height;
|
uint32 width, height;
|
||||||
} PlatformInstance;
|
} PlatformInstance;
|
||||||
#endif /* XP_UNIX */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Macintosh PlatformInstance
|
* Macintosh PlatformInstance
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_MAC
|
#elif defined(XP_MAC)
|
||||||
typedef struct _PlatformInstance
|
typedef struct _PlatformInstance
|
||||||
{
|
{
|
||||||
int placeholder;
|
int placeholder;
|
||||||
} PlatformInstance;
|
} PlatformInstance;
|
||||||
#endif /* macintosh */
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Stub PlatformInstance
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#else
|
||||||
|
typedef struct _PlatformInstance
|
||||||
|
{
|
||||||
|
int placeholder;
|
||||||
|
} PlatformInstance;
|
||||||
|
#endif /* end Section 2 */
|
||||||
|
|
||||||
|
|
||||||
// Define constants for easy use
|
// Define constants for easy use
|
||||||
@ -1113,7 +1121,7 @@ SimplePluginStreamListener::GetStreamType(nsPluginStreamType *result)
|
|||||||
* UNIX Implementations
|
* UNIX Implementations
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_UNIX
|
#if defined(XP_UNIX)
|
||||||
|
|
||||||
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
* PlatformNew
|
* PlatformNew
|
||||||
@ -1182,13 +1190,12 @@ SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event)
|
|||||||
/* UNIX Plugins do not use HandleEvent */
|
/* UNIX Plugins do not use HandleEvent */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* XP_UNIX */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Windows Implementations
|
* Windows Implementations
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_PC
|
#elif defined(XP_PC)
|
||||||
const char* gInstanceLookupString = "instance->pdata";
|
const char* gInstanceLookupString = "instance->pdata";
|
||||||
|
|
||||||
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -1325,7 +1332,6 @@ SimplePluginInstance::PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPAR
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* XP_PC */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1333,7 +1339,7 @@ SimplePluginInstance::PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPAR
|
|||||||
* Macintosh Implementations
|
* Macintosh Implementations
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef macintosh
|
#elif defined(XP_MAC)
|
||||||
|
|
||||||
PRBool StartDraw(nsPluginWindow* window);
|
PRBool StartDraw(nsPluginWindow* window);
|
||||||
void EndDraw(nsPluginWindow* window);
|
void EndDraw(nsPluginWindow* window);
|
||||||
@ -1500,6 +1506,38 @@ SimplePluginInstance::DoDraw(void)
|
|||||||
DrawString("\pHello, World!");
|
DrawString("\pHello, World!");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* macintosh */
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Stub Implementations
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void
|
||||||
|
SimplePluginInstance::PlatformNew(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
SimplePluginInstance::PlatformDestroy(void)
|
||||||
|
{
|
||||||
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
SimplePluginInstance::PlatformSetWindow(nsPluginWindow* window)
|
||||||
|
{
|
||||||
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
int16
|
||||||
|
SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event)
|
||||||
|
{
|
||||||
|
int16 eventHandled = FALSE;
|
||||||
|
return eventHandled;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* end Section 5 */
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -36,7 +36,13 @@ CPPSRCS = npsimple.cpp
|
|||||||
|
|
||||||
LOCAL_INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../public
|
LOCAL_INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../public
|
||||||
|
|
||||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_XPCOM_LIBS) -L$(DIST)/lib -lgtksuperwin $(TK_LIBS)
|
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_XPCOM_LIBS) -L$(DIST)/lib
|
||||||
|
|
||||||
|
ifdef MOZ_ENABLE_GTK
|
||||||
|
EXTRA_DSO_LDOPTS += -lgtksuperwin
|
||||||
|
endif
|
||||||
|
|
||||||
|
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
|
@ -88,19 +88,18 @@
|
|||||||
* Windows PlatformInstance
|
* Windows PlatformInstance
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_PC
|
#if defined(XP_PC)
|
||||||
typedef struct _PlatformInstance
|
typedef struct _PlatformInstance
|
||||||
{
|
{
|
||||||
HWND fhWnd;
|
HWND fhWnd;
|
||||||
WNDPROC fDefaultWindowProc;
|
WNDPROC fDefaultWindowProc;
|
||||||
} PlatformInstance;
|
} PlatformInstance;
|
||||||
#endif /* XP_PC */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* UNIX PlatformInstance
|
* UNIX PlatformInstance
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_UNIX
|
#elif defined(XP_UNIX)
|
||||||
typedef struct _PlatformInstance
|
typedef struct _PlatformInstance
|
||||||
{
|
{
|
||||||
Window window;
|
Window window;
|
||||||
@ -110,18 +109,27 @@ typedef struct _PlatformInstance
|
|||||||
uint32 x, y;
|
uint32 x, y;
|
||||||
uint32 width, height;
|
uint32 width, height;
|
||||||
} PlatformInstance;
|
} PlatformInstance;
|
||||||
#endif /* XP_UNIX */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Macintosh PlatformInstance
|
* Macintosh PlatformInstance
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_MAC
|
#elif defined(XP_MAC)
|
||||||
typedef struct _PlatformInstance
|
typedef struct _PlatformInstance
|
||||||
{
|
{
|
||||||
int placeholder;
|
int placeholder;
|
||||||
} PlatformInstance;
|
} PlatformInstance;
|
||||||
#endif /* macintosh */
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Stub PlatformInstance
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#else
|
||||||
|
typedef struct _PlatformInstance
|
||||||
|
{
|
||||||
|
int placeholder;
|
||||||
|
} PlatformInstance;
|
||||||
|
#endif /* end Section 2 */
|
||||||
|
|
||||||
|
|
||||||
// Define constants for easy use
|
// Define constants for easy use
|
||||||
@ -1113,7 +1121,7 @@ SimplePluginStreamListener::GetStreamType(nsPluginStreamType *result)
|
|||||||
* UNIX Implementations
|
* UNIX Implementations
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_UNIX
|
#if defined(XP_UNIX)
|
||||||
|
|
||||||
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
* PlatformNew
|
* PlatformNew
|
||||||
@ -1182,13 +1190,12 @@ SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event)
|
|||||||
/* UNIX Plugins do not use HandleEvent */
|
/* UNIX Plugins do not use HandleEvent */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* XP_UNIX */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Windows Implementations
|
* Windows Implementations
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef XP_PC
|
#elif defined(XP_PC)
|
||||||
const char* gInstanceLookupString = "instance->pdata";
|
const char* gInstanceLookupString = "instance->pdata";
|
||||||
|
|
||||||
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
/*+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -1325,7 +1332,6 @@ SimplePluginInstance::PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPAR
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* XP_PC */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1333,7 +1339,7 @@ SimplePluginInstance::PluginWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPAR
|
|||||||
* Macintosh Implementations
|
* Macintosh Implementations
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifdef macintosh
|
#elif defined(XP_MAC)
|
||||||
|
|
||||||
PRBool StartDraw(nsPluginWindow* window);
|
PRBool StartDraw(nsPluginWindow* window);
|
||||||
void EndDraw(nsPluginWindow* window);
|
void EndDraw(nsPluginWindow* window);
|
||||||
@ -1500,6 +1506,38 @@ SimplePluginInstance::DoDraw(void)
|
|||||||
DrawString("\pHello, World!");
|
DrawString("\pHello, World!");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* macintosh */
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Stub Implementations
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void
|
||||||
|
SimplePluginInstance::PlatformNew(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
SimplePluginInstance::PlatformDestroy(void)
|
||||||
|
{
|
||||||
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
SimplePluginInstance::PlatformSetWindow(nsPluginWindow* window)
|
||||||
|
{
|
||||||
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
int16
|
||||||
|
SimplePluginInstance::PlatformHandleEvent(nsPluginEvent* event)
|
||||||
|
{
|
||||||
|
int16 eventHandled = FALSE;
|
||||||
|
return eventHandled;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* end Section 5 */
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user