1/* 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <WebKit/WebKitPluginHostTypes.defs> 27 28subsystem WebKitPluginHost 300; 29 30serverprefix WK; 31userprefix _WK; 32 33routine PHCheckInWithPluginHost(pluginHostPort :mach_port_t; 34 options :plist_bytes_t; 35 clientPort :mach_port_make_send_t; 36 clientPSNHigh :uint32_t; 37 clientPSNLow :uint32_t; 38 renderPort :mach_port_copy_send_t; 39 out pluginHostPSNHigh :uint32_t; 40 out pluginHostPSNLow :uint32_t); 41 42simpleroutine PHInstantiatePlugin(pluginHostPort :mach_port_t; 43 requestID :uint32_t; 44 options :plist_bytes_t; 45 pluginID :uint32_t); 46 47simpleroutine PHResizePluginInstance(pluginHostPort :mach_port_t; 48 pluginID :uint32_t; 49 requestID :uint32_t; 50 pluginX :double; 51 pluginY :double; 52 pluginWidth :double; 53 pluginHeight :double; 54 clipX :double; 55 clipY :double; 56 clipWidth :double; 57 clipHeight :double); 58 59simpleroutine PHPluginInstanceFocusChanged(pluginHostPort :mach_port_t; 60 pluginID :uint32_t; 61 hasFocus :boolean_t); 62simpleroutine PHPluginInstanceWindowFocusChanged(pluginHostPort :mach_port_t; 63 pluginID :uint32_t; 64 hasFocus :boolean_t); 65simpleroutine PHPluginInstanceWindowFrameChanged(pluginHostPort :mach_port_t; 66 pluginID :uint32_t; 67 x :double; 68 y :double; 69 width :double; 70 height :double; 71 maxScreenY :double); 72 73simpleroutine PHPluginInstanceMouseEvent(pluginHostPort :mach_port_t; 74 pluginID :uint32_t; 75 timestamp :double; 76 eventType :uint32_t; 77 modifierFlags :uint32_t; 78 pluginX :double; 79 pluginY :double; 80 screenX :double; 81 screenY :double; 82 maxScreenY :double; 83 buttonNumber :int32_t; 84 clickCount :int32_t; 85 deltaX :double; 86 deltaY :double; 87 deltaZ: double); 88 89simpleroutine PHPluginInstanceKeyboardEvent(pluginHostPort :mach_port_t; 90 pluginID :uint32_t; 91 timestamp :double; 92 eventType :uint32_t; 93 modifierFlags :uint32_t; 94 characters :data_t; 95 charactersIgnoringModifiers :data_t; 96 isARepeat :boolean_t; 97 keyCode :uint16_t; 98 keyChar :uint8_t); 99 100simpleroutine PHPluginInstanceWheelEvent(pluginHostPort :mach_port_t; 101 pluginID :uint32_t; 102 requestID :uint32_t; 103 timestamp :double; 104 modifierFlags :uint32_t; 105 pluginX :double; 106 pluginY :double; 107 buttonNumber :int32_t; 108 deltaX :double; 109 deltaY :double; 110 deltaZ: double); 111 112simpleroutine PHPluginInstanceInsertText(pluginHostPort :mach_port_t; 113 pluginID :uint32_t; 114 text :data_t); 115 116simpleroutine PHPluginInstanceStartTimers(pluginHostPort :mach_port_t; 117 pluginID :uint32_t; 118 throttleTimers :boolean_t); 119simpleroutine PHPluginInstanceStopTimers(pluginHostPort :mach_port_t; 120 pluginID :uint32_t); 121 122simpleroutine PHPluginInstancePrint(pluginHostPort :mach_port_t; 123 pluginID :uint32_t; 124 requestID :uint32_t; 125 width :uint32_t; 126 height :uint32_t); 127 128simpleroutine PHDestroyPluginInstance(pluginHostPort :mach_port_t; 129 pluginID :uint32_t; 130 requestID :uint32_t); 131 132simpleroutine PHCheckIfAllowedToLoadURLResult(clientPort :mach_port_t; 133 pluginID :uint32_t; 134 checkID :uint32_t; 135 result :boolean_t); 136 137// Streams 138simpleroutine PHStartStream(pluginHostPort :mach_port_t; 139 pluginID :uint32_t; 140 streamID :uint32_t; 141 responseURL :data_t; 142 expectedContentLength :int64_t; 143 lastModifiedTimeInterval :double; 144 mimeType :data_t; 145 headers :data_t); 146 147simpleroutine PHStreamDidReceiveData(pluginHostPort :mach_port_t; 148 pluginID :uint32_t; 149 streamID :uint32_t; 150 data :data_t); 151 152simpleroutine PHStreamDidFinishLoading(pluginHostPort :mach_port_t; 153 pluginID :uint32_t; 154 streamID :uint32_t); 155 156simpleroutine PHStreamDidFail(pluginHostPort :mach_port_t; 157 pluginID :uint32_t; 158 streamID :uint32_t; 159 reason :int16_t); 160 161simpleroutine PHLoadURLNotify(pluginHostPort :mach_port_t; 162 pluginID :uint32_t; 163 requestID :uint32_t; 164 reason :int16_t); 165 166// NPRuntime 167 168simpleroutine PHGetScriptableNPObject(pluginHostPort :mach_port_t; 169 pluginID :uint32_t; 170 requestID :uint32_t); 171 172simpleroutine PHNPObjectHasProperty(pluginHostPort :mach_port_t; 173 pluginID :uint32_t; 174 requestID :uint32_t; 175 objectID :uint32_t; 176 propertyName :uint64_t); 177 178simpleroutine PHNPObjectHasMethod(pluginHostPort :mach_port_t; 179 pluginID :uint32_t; 180 requestID :uint32_t; 181 objectID :uint32_t; 182 methodName :uint64_t); 183 184simpleroutine PHNPObjectInvoke(pluginHostPort :mach_port_t; 185 pluginID :uint32_t; 186 requestID :uint32_t; 187 objectID :uint32_t; 188 invokeType :uint32_t; 189 methodName :uint64_t; 190 arguments :data_t); 191 192simpleroutine PHNPObjectHasInvokeDefaultMethod(pluginHostPort :mach_port_t; 193 pluginID :uint32_t; 194 requestID :uint32_t; 195 objectID :uint32_t); 196 197simpleroutine PHNPObjectHasConstructMethod(pluginHostPort :mach_port_t; 198 pluginID :uint32_t; 199 requestID :uint32_t; 200 objectID :uint32_t); 201 202simpleroutine PHNPObjectGetProperty(pluginHostPort :mach_port_t; 203 pluginID :uint32_t; 204 requestID :uint32_t; 205 objectID :uint32_t; 206 propertyName :uint64_t); 207 208simpleroutine PHNPObjectSetProperty(pluginHostPort :mach_port_t; 209 pluginID :uint32_t; 210 requestID :uint32_t; 211 objectID :uint32_t; 212 propertyName :uint64_t; 213 value :data_t); 214 215simpleroutine PHNPObjectRelease(pluginHostPort :mach_port_t; 216 pluginID :uint32_t; 217 objectID :uint32_t); 218 219simpleroutine PHNPObjectEnumerate(pluginHostPort :mach_port_t; 220 pluginID :uint32_t; 221 requestID :uint32_t; 222 objectID :uint32_t); 223 224// Replies 225 226simpleroutine PHBooleanReply(clientPort :mach_port_t; 227 pluginID :uint32_t; 228 requestID :uint32_t; 229 result :boolean_t); 230 231simpleroutine PHBooleanAndDataReply(pluginHostPort :mach_port_t; 232 pluginID :uint32_t; 233 requestID :uint32_t; 234 returnValue :boolean_t; 235 result :data_t); 236 237simpleroutine PHPluginInstanceDidDraw(pluginHostPort :mach_port_t; 238 pluginID :uint32_t); 239simpleroutine PHPluginInstancePrivateBrowsingModeDidChange(pluginHostPort :mach_port_t; 240 pluginID :uint32_t; 241 privateBrowsingEnabled :boolean_t); 242 243simpleroutine PHPluginInstanceSnapshot(pluginHostPort :mach_port_t; 244 pluginID :uint32_t; 245 requestID :uint32_t; 246 width :uint32_t; 247 height :uint32_t); 248