2002-09-26 01:59:08 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-09-26 01:59:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This file is the default implementation of plugin native window
|
|
|
|
* empty stubs, it should be replaced with real platform implementation
|
|
|
|
* for every platform
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsDebug.h"
|
|
|
|
#include "nsPluginNativeWindow.h"
|
|
|
|
|
|
|
|
class nsPluginNativeWindowPLATFORM : public nsPluginNativeWindow {
|
|
|
|
public:
|
|
|
|
nsPluginNativeWindowPLATFORM();
|
|
|
|
virtual ~nsPluginNativeWindowPLATFORM();
|
|
|
|
};
|
|
|
|
|
|
|
|
nsPluginNativeWindowPLATFORM::nsPluginNativeWindowPLATFORM() : nsPluginNativeWindow()
|
|
|
|
{
|
|
|
|
// initialize the struct fields
|
2012-07-30 14:20:58 +00:00
|
|
|
window = nullptr;
|
2002-09-26 01:59:08 +00:00
|
|
|
x = 0;
|
|
|
|
y = 0;
|
|
|
|
width = 0;
|
|
|
|
height = 0;
|
|
|
|
memset(&clipRect, 0, sizeof(clipRect));
|
2002-11-06 01:24:57 +00:00
|
|
|
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
2012-07-30 14:20:58 +00:00
|
|
|
ws_info = nullptr;
|
2002-09-26 01:59:08 +00:00
|
|
|
#endif
|
2009-09-17 01:30:26 +00:00
|
|
|
type = NPWindowTypeWindow;
|
2002-09-26 01:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
nsPluginNativeWindowPLATFORM::~nsPluginNativeWindowPLATFORM()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult PLUG_NewPluginNativeWindow(nsPluginNativeWindow ** aPluginNativeWindow)
|
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aPluginNativeWindow);
|
|
|
|
*aPluginNativeWindow = new nsPluginNativeWindowPLATFORM();
|
|
|
|
return *aPluginNativeWindow ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult PLUG_DeletePluginNativeWindow(nsPluginNativeWindow * aPluginNativeWindow)
|
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aPluginNativeWindow);
|
|
|
|
nsPluginNativeWindowPLATFORM *p = (nsPluginNativeWindowPLATFORM *)aPluginNativeWindow;
|
|
|
|
delete p;
|
|
|
|
return NS_OK;
|
|
|
|
}
|