summaryrefslogtreecommitdiffstats
path: root/dom/plugins/base/nsIPluginInstanceOwner.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/plugins/base/nsIPluginInstanceOwner.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/plugins/base/nsIPluginInstanceOwner.idl')
-rw-r--r--dom/plugins/base/nsIPluginInstanceOwner.idl122
1 files changed, 122 insertions, 0 deletions
diff --git a/dom/plugins/base/nsIPluginInstanceOwner.idl b/dom/plugins/base/nsIPluginInstanceOwner.idl
new file mode 100644
index 000000000..87e51599c
--- /dev/null
+++ b/dom/plugins/base/nsIPluginInstanceOwner.idl
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* 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/. */
+
+#include "nsISupports.idl"
+#include "nspluginroot.idl"
+#include "nsIInputStream.idl"
+
+interface nsIDocument;
+
+%{C++
+#include "npapi.h"
+#include "mozilla/EventForwards.h"
+class nsNPAPIPluginInstance;
+
+enum nsPluginTagType {
+ nsPluginTagType_Unknown,
+ nsPluginTagType_Embed,
+ nsPluginTagType_Object,
+ nsPluginTagType_Applet
+};
+%}
+
+[ptr] native nsNPAPIPluginInstancePtr(nsNPAPIPluginInstance);
+
+// Do not make this interface scriptable, because the virtual functions in C++
+// blocks will make script call the wrong functions.
+[uuid(7d65452e-c167-4cba-a0e3-ddc61bdde8c3)]
+interface nsIPluginInstanceOwner : nsISupports
+{
+ /**
+ * Let the owner know what its instance is
+ */
+ void setInstance(in nsNPAPIPluginInstancePtr aInstance);
+
+ /**
+ * Get the instance associated with this owner.
+ */
+ nsNPAPIPluginInstancePtr getInstance();
+
+ /**
+ * Get a handle to the window structure of the owner.
+ * This pointer cannot be made persistent by the caller.
+ */
+ void getWindow(in NPWindowStarRef aWindow);
+
+ /**
+ * Get the display mode for the plugin instance.
+ */
+ readonly attribute int32_t mode;
+
+ /**
+ * Create a place for the plugin to live in the owner's
+ * environment. this may or may not create a window
+ * depending on the windowless state of the plugin instance.
+ */
+ void createWidget();
+
+%{C++
+ /**
+ * Called when there is a valid target so that the proper
+ * frame can be updated with new content. will not be called
+ * with nullptr aTarget.
+ */
+ NS_IMETHOD
+ GetURL(const char *aURL, const char *aTarget,
+ nsIInputStream *aPostStream,
+ void *aHeadersData, uint32_t aHeadersDataLen,
+ bool aDoCheckLoadURIChecks) = 0;
+%}
+
+ /**
+ * Get the associated document.
+ */
+ readonly attribute nsIDocument document;
+
+ /**
+ * Invalidate the rectangle
+ */
+ void invalidateRect(in NPRectPtr aRect);
+
+ /**
+ * Invalidate the region
+ */
+ void invalidateRegion(in NPRegion aRegion);
+
+ /**
+ * Have the plugin recomposited.
+ */
+ void redrawPlugin();
+
+ /**
+ * Get NetscapeWindow, corresponds to NPNVnetscapeWindow
+ */
+ void getNetscapeWindow(in voidPtr aValue);
+
+ /**
+ * Convert between plugin, window, and screen coordinate spaces.
+ */
+%{C++
+ virtual NPBool ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
+ double *destX, double *destY, NPCoordinateSpace destSpace) = 0;
+ virtual NPError InitAsyncSurface(NPSize *size, NPImageFormat format,
+ void *initData, NPAsyncSurface *surface) = 0;
+ virtual NPError FinalizeAsyncSurface(NPAsyncSurface *surface) = 0;
+ virtual void SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed) = 0;
+%}
+
+ void setEventModel(in int32_t eventModel);
+
+ /**
+ * Call NPP_SetWindow on the plugin.
+ */
+ void callSetWindow();
+
+ /**
+ * Get the contents scale factor for the screen the plugin is
+ * drawn on.
+ */
+ double getContentsScaleFactor();
+};