1 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is Mozilla Plugins.
17 * The Initial Developer of the Original Code is
18 * Chris Jones <jones.chris.g@gmail.com>.
19 * Portions created by the Initial Developer are Copyright (C) 2009
20 * the Initial Developer. All Rights Reserved.
23 * Benjamin Smedberg <benjamin@smedbergs.us>
24 * Ben Turner <bent.mozilla@gmail.com>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 include protocol PPluginModule;
41 include protocol PPluginScriptableObject;
42 include protocol PBrowserStream;
43 include protocol PPluginStream;
44 include protocol PStreamNotify;
46 include "mozilla/plugins/PluginMessageUtils.h";
53 using NPCoordinateSpace;
54 using mozilla::plugins::NativeWindowHandle;
59 rpc protocol PPluginInstance
61 manager PPluginModule;
63 manages PPluginScriptableObject;
64 manages PBrowserStream;
65 manages PPluginStream;
66 manages PStreamNotify;
71 rpc NPP_SetWindow(NPRemoteWindow window);
73 // this message is not used on non-X platforms
74 rpc NPP_GetValue_NPPVpluginNeedsXEmbed()
75 returns (bool value, NPError result);
76 rpc NPP_GetValue_NPPVpluginScriptableNPObject()
77 returns (nullable PPluginScriptableObject value, NPError result);
79 rpc NPP_SetValue_NPNVprivateModeBool(bool value) returns (NPError result);
81 rpc NPP_HandleEvent(NPRemoteEvent event)
82 returns (int16_t handled);
83 // special cases where we need to a shared memory buffer
84 rpc NPP_HandleEvent_Shmem(NPRemoteEvent event, Shmem buffer)
85 returns (int16_t handled, Shmem rtnbuffer);
86 // special cases where we need an iosurface
87 rpc NPP_HandleEvent_IOSurface(NPRemoteEvent event, uint32_t surfaceid)
88 returns (int16_t handled);
89 // special cases of HandleEvent to make mediating races simpler
90 rpc Paint(NPRemoteEvent event)
91 returns (int16_t handled);
92 // this is only used on windows to forward WM_WINDOWPOSCHANGE
93 async WindowPosChanged(NPRemoteEvent event);
99 rpc NPN_GetValue_NPNVjavascriptEnabledBool()
100 returns (bool value, NPError result);
101 rpc NPN_GetValue_NPNVisOfflineBool()
102 returns (bool value, NPError result);
103 rpc NPN_GetValue_NPNVWindowNPObject()
104 returns (nullable PPluginScriptableObject value, NPError result);
105 rpc NPN_GetValue_NPNVPluginElementNPObject()
106 returns (nullable PPluginScriptableObject value, NPError result);
107 rpc NPN_GetValue_NPNVprivateModeBool()
108 returns (bool value, NPError result);
109 rpc NPN_GetValue_NPNVnetscapeWindow()
110 returns (NativeWindowHandle value, NPError result);
112 rpc NPN_SetValue_NPPVpluginWindow(bool windowed)
113 returns (NPError result);
114 rpc NPN_SetValue_NPPVpluginTransparent(bool transparent)
115 returns (NPError result);
116 rpc NPN_SetValue_NPPVpluginDrawingModel(int drawingModel)
117 returns (NPError result);
118 rpc NPN_SetValue_NPPVpluginEventModel(int eventModel)
119 returns (NPError result);
121 rpc NPN_GetURL(nsCString url, nsCString target)
122 returns (NPError result);
123 rpc NPN_PostURL(nsCString url, nsCString target, nsCString buffer, bool file)
124 returns (NPError result);
127 * Covers both NPN_GetURLNotify and NPN_PostURLNotify.
128 * @TODO This would be more readable as an overloaded method,
129 * but IPDL doesn't allow that for constructors.
131 rpc PStreamNotify(nsCString url, nsCString target, bool post,
132 nsCString buffer, bool file)
133 returns (NPError result);
135 async NPN_InvalidateRect(NPRect rect);
137 rpc NPN_PushPopupsEnabledState(bool aState);
139 rpc NPN_PopPopupsEnabledState();
141 rpc NPN_GetValueForURL(NPNURLVariable variable, nsCString url)
142 returns (nsCString value, NPError result);
144 rpc NPN_SetValueForURL(NPNURLVariable variable, nsCString url,
146 returns (NPError result);
148 rpc NPN_GetAuthenticationInfo(nsCString protocol_, nsCString host,
149 int32_t port, nsCString scheme,
151 returns (nsCString username, nsCString password, NPError result);
153 rpc NPN_ConvertPoint(double sourceX, bool ignoreDestX, double sourceY, bool ignoreDestY, NPCoordinateSpace sourceSpace,
154 NPCoordinateSpace destSpace)
155 returns (double destX, double destY, bool result);
158 async PPluginScriptableObject();
162 rpc PBrowserStream(nsCString url,
164 uint32_t lastmodified,
165 nullable PStreamNotify notifyData,
174 rpc PPluginStream(nsCString mimeType,
176 returns (NPError result);
179 rpc PluginGotFocus();
182 rpc SetPluginFocus();
186 } // namespace plugins
187 } // namespace mozilla