WebKit:
[WebKit-https.git] / WebKit / mac / Plugins / Hosted / WebKitPluginHost.defs
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
28 subsystem WebKitPluginHost 300;
29
30 serverprefix WKPH;
31 userprefix _WKPH;
32
33 routine CheckInWithPluginHost(pluginHostPort :mach_port_t;
34                               options :plist_bytes_t;
35                               clientPort :mach_port_make_send_t;
36                               renderPort :mach_port_copy_send_t);
37
38 simpleroutine InstantiatePlugin(pluginHostPort :mach_port_t;
39                                 options :plist_bytes_t;
40                                 pluginID :uint32_t);
41                                 
42 simpleroutine ResizePluginInstance(pluginHostPort :mach_port_t;
43                                    pluginID :uint32_t;
44                                    x :double;
45                                    y :double;
46                                    width :double;
47                                    height :double);
48 simpleroutine PluginInstanceFocusChanged(pluginHostPort :mach_port_t;
49                                          pluginID :uint32_t;
50                                          hasFocus :boolean_t);
51 simpleroutine PluginInstanceWindowFocusChanged(pluginHostPort :mach_port_t;
52                                          pluginID :uint32_t;
53                                          hasFocus :boolean_t);
54 simpleroutine PluginInstanceWindowFrameChanged(pluginHostPort :mach_port_t;
55                                                pluginID :uint32_t;
56                                                x :double;
57                                                y :double;
58                                                width :double;
59                                                height :double;
60                                                maxScreenY :double);
61
62 simpleroutine PluginInstanceMouseEvent(pluginHostPort :mach_port_t;
63                                        pluginID :uint32_t;
64                                        timestamp :double;
65                                        eventType :uint32_t;
66                                        modifierFlags :uint32_t;
67                                        pluginX :double;
68                                        pluginY :double;
69                                        screenX :double;
70                                        screenY :double;
71                                        maxScreenY :double;
72                                        buttonNumber :int32_t;
73                                        clickCount :int32_t;
74                                        deltaX :double;
75                                        deltaY :double;
76                                        deltaZ: double);
77
78 simpleroutine PluginInstanceKeyboardEvent(pluginHostPort :mach_port_t;
79                                           pluginID :uint32_t;
80                                           timestamp :double;
81                                           eventType :uint32_t;
82                                           modifierFlags :uint32_t;
83                                           characters :data_t;
84                                           charactersIgnoringModifiers :data_t;
85                                           isARepeat :boolean_t;
86                                           keyCode :uint16_t);
87                                           
88 simpleroutine PluginInstanceStartTimers(pluginHostPort :mach_port_t;
89                                         pluginID :uint32_t;
90                                         throttleTimers :boolean_t);
91 simpleroutine PluginInstanceStopTimers(pluginHostPort :mach_port_t;
92                                        pluginID :uint32_t);
93
94 simpleroutine DestroyPluginInstance(pluginHostPort :mach_port_t;
95                                     pluginID :uint32_t);
96
97
98 // Streams
99 simpleroutine StartStream(pluginHostPort :mach_port_t;
100                           pluginID :uint32_t;
101                           streamID :uint32_t;
102                           responseURL :data_t;
103                           expectedContentLength :int64_t;
104                           lastModifiedTimeInterval :double;
105                           mimeType :data_t;
106                           headers :data_t);
107
108 simpleroutine StreamDidReceiveData(pluginHostPort :mach_port_t;
109                                    pluginID :uint32_t;
110                                    streamID :uint32_t;
111                                    data :data_t);
112
113 simpleroutine StreamDidFinishLoading(pluginHostPort :mach_port_t;
114                                      pluginID :uint32_t;
115                                      streamID :uint32_t);
116
117 simpleroutine StreamDidFail(pluginHostPort :mach_port_t;
118                             pluginID :uint32_t;
119                             streamID :uint32_t;
120                             reason :int16_t);
121
122 // NPRuntime
123
124 simpleroutine GetScriptableNPObject(pluginHostPort :mach_port_t;
125                                     pluginID :uint32_t);
126
127 // Replies
128
129 simpleroutine EvaluateReply(pluginHostPort :mach_port_t;
130                             pluginID :uint32_t;
131                             returnValue :boolean_t;
132                             result :data_t);