|
1 /* |
|
2 * Copyright (C) 2006, 2007 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 COMPUTER, 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 COMPUTER, 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 cpp_quote("/*") |
|
27 cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.") |
|
28 cpp_quote(" *") |
|
29 cpp_quote(" * Redistribution and use in source and binary forms, with or without") |
|
30 cpp_quote(" * modification, are permitted provided that the following conditions") |
|
31 cpp_quote(" * are met:") |
|
32 cpp_quote(" * 1. Redistributions of source code must retain the above copyright") |
|
33 cpp_quote(" * notice, this list of conditions and the following disclaimer.") |
|
34 cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright") |
|
35 cpp_quote(" * notice, this list of conditions and the following disclaimer in the") |
|
36 cpp_quote(" * documentation and/or other materials provided with the distribution.") |
|
37 cpp_quote(" *") |
|
38 cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY") |
|
39 cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE") |
|
40 cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR") |
|
41 cpp_quote(" * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR") |
|
42 cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,") |
|
43 cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,") |
|
44 cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR") |
|
45 cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") |
|
46 cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") |
|
47 cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") |
|
48 cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") |
|
49 cpp_quote(" */") |
|
50 |
|
51 import "oaidl.idl"; |
|
52 import "ocidl.idl"; |
|
53 import "IWebNotification.idl"; |
|
54 import "DOMCore.idl"; |
|
55 import "DOMCSS.idl"; |
|
56 import "DOMRange.idl"; |
|
57 import "IWebUndoManager.idl"; |
|
58 import "IWebView.idl"; |
|
59 |
|
60 interface IDOMCSSStyleDeclaration; |
|
61 interface IDOMRange; |
|
62 interface IWebView; |
|
63 interface IWebNotification; |
|
64 |
|
65 typedef enum _WebViewInsertAction { |
|
66 WebViewInsertActionTyped, |
|
67 WebViewInsertActionPasted, |
|
68 WebViewInsertActionDropped, |
|
69 } WebViewInsertAction; |
|
70 |
|
71 [ |
|
72 object, |
|
73 oleautomation, |
|
74 uuid(B0F960E7-FB81-447f-A958-E02DA02ADBB7), |
|
75 pointer_default(unique) |
|
76 ] |
|
77 interface IEnumSpellingGuesses : IUnknown |
|
78 { |
|
79 HRESULT Next(ULONG celt, [out] BSTR* guess, [out] ULONG* pceltFetched); |
|
80 HRESULT Skip(ULONG celt); |
|
81 HRESULT Reset(void); |
|
82 HRESULT Clone([out, retval] IEnumSpellingGuesses** ppenum); |
|
83 }; |
|
84 |
|
85 [ |
|
86 object, |
|
87 oleautomation, |
|
88 uuid(8B95C1B3-E1B3-4f97-80D6-2240417E3E0C), |
|
89 pointer_default(unique) |
|
90 ] |
|
91 interface IWebGrammarDetail : IUnknown |
|
92 { |
|
93 HRESULT location([out, retval] int* value); |
|
94 HRESULT length([out, retval] int* value); |
|
95 HRESULT userDescription([out, retval] BSTR* value); |
|
96 HRESULT guesses([out, retval] IEnumSpellingGuesses** guesses); |
|
97 } |
|
98 |
|
99 [ |
|
100 object, |
|
101 oleautomation, |
|
102 uuid(FABCC69A-5917-4242-A19A-42E8B62227A7), |
|
103 pointer_default(unique) |
|
104 ] |
|
105 interface IEnumWebGrammarDetails : IUnknown |
|
106 { |
|
107 HRESULT Next(ULONG celt, [out] IWebGrammarDetail** detail, [out] ULONG* pceltFetched); |
|
108 HRESULT Skip(ULONG celt); |
|
109 HRESULT Reset(void); |
|
110 HRESULT Clone([out, retval] IEnumSpellingGuesses** ppenum); |
|
111 }; |
|
112 |
|
113 /* |
|
114 @interface NSObject (WebViewEditingDelegate) |
|
115 */ |
|
116 [ |
|
117 object, |
|
118 oleautomation, |
|
119 uuid(2C75A1E3-EE9D-45c8-A385-19DE68AC5675), |
|
120 pointer_default(unique) |
|
121 ] |
|
122 interface IWebEditingDelegate : IUnknown |
|
123 { |
|
124 /* |
|
125 - (BOOL)webView:(WebView *)webView shouldBeginEditingInDOMRange:(DOMRange *)range; |
|
126 */ |
|
127 HRESULT shouldBeginEditingInDOMRange([in] IWebView* webView, [in] IDOMRange* range, [out, retval] BOOL* result); |
|
128 |
|
129 /* |
|
130 - (BOOL)webView:(WebView *)webView shouldEndEditingInDOMRange:(DOMRange *)range; |
|
131 */ |
|
132 HRESULT shouldEndEditingInDOMRange([in] IWebView* webView, [in] IDOMRange* range, [out, retval] BOOL* result); |
|
133 |
|
134 /* |
|
135 - (BOOL)webView:(WebView *)webView shouldInsertNode:(DOMNode *)node replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action; |
|
136 */ |
|
137 HRESULT shouldInsertNode([in] IWebView* webView, [in] IDOMNode* node, [in] IDOMRange* range, [in] WebViewInsertAction action); |
|
138 |
|
139 /* |
|
140 - (BOOL)webView:(WebView *)webView shouldInsertText:(NSString *)text replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action; |
|
141 */ |
|
142 HRESULT shouldInsertText([in] IWebView* webView, [in] BSTR text, [in] IDOMRange* range, [in] WebViewInsertAction action, [out, retval] BOOL* result); |
|
143 |
|
144 /* |
|
145 - (BOOL)webView:(WebView *)webView shouldDeleteDOMRange:(DOMRange *)range; |
|
146 */ |
|
147 HRESULT shouldDeleteDOMRange([in] IWebView* webView, [in] IDOMRange* range, [out, retval] BOOL* result); |
|
148 |
|
149 /* |
|
150 - (BOOL)webView:(WebView *)webView shouldChangeSelectedDOMRange:(DOMRange *)currentRange toDOMRange:(DOMRange *)proposedRange affinity:(NSSelectionAffinity)selectionAffinity stillSelecting:(BOOL)flag; |
|
151 */ |
|
152 HRESULT shouldChangeSelectedDOMRange([in] IWebView* webView, [in] IDOMRange* currentRange, [in] IDOMRange* proposedRange, [in] WebSelectionAffinity selectionAffinity, [in] BOOL stillSelecting, [out, retval] BOOL* result); |
|
153 /* |
|
154 - (BOOL)webView:(WebView *)webView shouldApplyStyle:(DOMCSSStyleDeclaration *)style toElementsInDOMRange:(DOMRange *)range; |
|
155 */ |
|
156 HRESULT shouldApplyStyle([in] IWebView* webView, [in] IDOMCSSStyleDeclaration* style, [in] IDOMRange* range, [out, retval] BOOL* result); |
|
157 |
|
158 /* |
|
159 - (BOOL)webView:(WebView *)webView shouldChangeTypingStyle:(DOMCSSStyleDeclaration *)currentStyle toStyle:(DOMCSSStyleDeclaration *)proposedStyle; |
|
160 */ |
|
161 HRESULT shouldChangeTypingStyle([in] IWebView* webView, [in] IDOMCSSStyleDeclaration* currentStyle, [in] IDOMCSSStyleDeclaration* proposedStyle, [out, retval] BOOL* result); |
|
162 |
|
163 /* |
|
164 - (BOOL)webView:(WebView *)webView doCommandBySelector:(SEL)selector; |
|
165 */ |
|
166 HRESULT doPlatformCommand([in] IWebView* webView, [in] BSTR command, [out, retval] BOOL* result); |
|
167 |
|
168 /* |
|
169 - (void)webViewDidBeginEditing:(NSNotification *)notification; |
|
170 */ |
|
171 HRESULT webViewDidBeginEditing([in] IWebNotification* notification); |
|
172 |
|
173 /* |
|
174 - (void)webViewDidChange:(NSNotification *)notification; |
|
175 */ |
|
176 HRESULT webViewDidChange([in] IWebNotification* notification); |
|
177 |
|
178 /* |
|
179 - (void)webViewDidEndEditing:(NSNotification *)notification; |
|
180 */ |
|
181 HRESULT webViewDidEndEditing([in] IWebNotification* notification); |
|
182 |
|
183 /* |
|
184 - (void)webViewDidChangeTypingStyle:(NSNotification *)notification; |
|
185 */ |
|
186 HRESULT webViewDidChangeTypingStyle([in] IWebNotification* notification); |
|
187 |
|
188 /* |
|
189 - (void)webViewDidChangeSelection:(NSNotification *)notification; |
|
190 */ |
|
191 HRESULT webViewDidChangeSelection([in] IWebNotification* notification); |
|
192 |
|
193 /* |
|
194 - (NSUndoManager *)undoManagerForWebView:(WebView *)webView; |
|
195 */ |
|
196 HRESULT undoManagerForWebView([in] IWebView* webView, [out, retval] IWebUndoManager** undoManager); |
|
197 |
|
198 HRESULT ignoreWordInSpellDocument([in] IWebView* view, [in] BSTR word); |
|
199 HRESULT learnWord([in] BSTR word); |
|
200 HRESULT checkSpellingOfString([in] IWebView* view, [in] LPCTSTR text, [in] int length, [out] int* misspellingLocation, [out] int* misspellingLength); |
|
201 HRESULT checkGrammarOfString([in] IWebView* view, [in] LPCTSTR text, [in] int length, [out] IEnumWebGrammarDetails** grammarDetails, [out] int* badGrammarLocation, [out] int* badGrammarLength); |
|
202 HRESULT updateSpellingUIWithGrammarString([in] BSTR string, [in] int location, [in] int length, [in] BSTR userDescription, [in] BSTR* guesses, [in] int guessesCount); |
|
203 HRESULT updateSpellingUIWithMisspelledWord([in] BSTR word); |
|
204 HRESULT showSpellingUI([in] BOOL show); |
|
205 HRESULT spellingUIIsShowing([out, retval] BOOL* result); |
|
206 HRESULT guessesForWord([in] BSTR word, [out, retval] IEnumSpellingGuesses** guesses); |
|
207 HRESULT closeSpellDocument([in] IWebView* view); |
|
208 HRESULT sharedSpellCheckerExists([out, retval] BOOL* exists); |
|
209 HRESULT preflightChosenSpellServer(); |
|
210 HRESULT updateGrammar(); |
|
211 } |