Added IOleCommandTarget::Exec implementation.
[wine] / dlls / mshtml / nsiface.idl
1 /*
2  * Copyright 2005 Jacek Caban
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 /* 
20  * NOTE:
21  * This file is not an usual idl file. Interfaces in this file are XPCOM interfaces
22  * (NOT MSCOM!), but we generate the header file with WIDL compatibile with XPCOM,
23  * useable in C code.
24  */
25
26 import "wtypes.idl";
27
28 typedef HRESULT nsresult;
29 typedef ULONG nsrefcnt;
30
31 typedef IID nsIID;
32 typedef nsIID nsCID;
33 typedef REFIID nsIIDRef;
34 typedef nsIIDRef nsCIDRef;
35
36 typedef void** nsQIResult;
37 typedef LPSTR nsstring;
38 typedef WCHAR PRUnichar;
39 typedef LPWSTR nswstring;
40 typedef ULONG PRUint32;
41 typedef LONG PRInt32;
42 typedef BOOL PRBool;
43 typedef LARGE_INTEGER PRInt64;
44
45 typedef int nsAString;
46 typedef int nsACString;
47
48 interface nsIWebBrowserChrome;
49
50 [
51     object,
52     uuid(00000000-0000-0000-c000-000000000046)
53 ]
54 interface nsISupports
55 {
56     nsresult QueryInterface(nsIIDRef riid, nsQIResult result);
57     nsrefcnt AddRef();
58     nsrefcnt Release();
59 }
60
61 /* Currently we don't need a full declaration of these interfaces */
62 typedef nsISupports nsIWeakReference;
63 typedef nsISupports nsIURIContentListener;
64 typedef nsISupports nsIDOMWindow;
65 typedef nsISupports nsIInputStream;
66 typedef nsISupports nsIDOMDocument;
67 typedef nsISupports nsIURI;
68 typedef nsISupports nsISHistory;
69 typedef nsISupports nsISimpleEnumerator;
70 typedef nsISupports nsIWidget;
71
72 [
73     object,
74     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958)
75 ]
76 interface nsIServiceManager : nsISupports
77 {
78     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
79     nsresult GetServiceByContactID(nsstring aContactID, nsIIDRef aIID, void **result);
80     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
81     nsresult IsServiceInstantiatedByContractID(nsstring aContractID, nsIIDRef aIID, BOOL *_retval);
82 }
83
84 [
85     object,
86     uuid(db242e01-e4d9-11d2-9dde-000064657374)
87 ]
88 interface nsIObserver : nsISupports
89 {
90     nsresult Observe(nsISupports *aSubject, nsstring aTopic, nswstring aData);
91 }
92
93 [
94     object,
95     uuid(a88e5a60-205a-4bb1-94e1-2628daf51eae)
96 ]
97 interface nsIComponentManager : nsISupports
98 {
99     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, nsQIResult result);
100     nsresult GetClassObjectByContractID(nsstring aContractID, nsIIDRef aIID, nsQIResult result);
101     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
102             nsQIResult result);
103     nsresult CreateInstanceByContractID(nsstring aContractID, nsISupports *aDelegate,
104             nsIIDRef aIID, nsQIResult result);
105 }
106
107 [
108     object,
109     uuid(69e5df00-7b8b-11d3-af61-00a024ffc08c)
110 ]
111 interface nsIWebBrowser : nsISupports
112 {
113     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
114     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
115     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
116     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
117     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
118     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
119     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
120 }
121
122 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7");
123
124 [
125     object,
126     uuid(f15398a0-8018-11d3-af70-00a024ffc08c)
127 ]
128 interface nsIWebBrowserSetup : nsISupports
129 {
130     nsresult SetProperty(PRUint32 aId, PRUint32 aValue);
131 }
132
133 typedef void* nativeWindow;
134
135 [
136     object,
137     uuid(046bc8a0-8015-11d3-af70-00a024ffc08c)
138 ]
139 interface nsIBaseWindow : nsISupports
140 {
141     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, PRInt32 x,
142             PRInt32 y, PRInt32 cx, PRInt32 cy);
143     nsresult Create();
144     nsresult Destroy();
145     nsresult SetPosition(PRInt32 x, PRInt32 y);
146     nsresult GetPosition(PRInt32 *x, PRInt32 *y);
147     nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint);
148     nsresult GetSize(PRInt32 *cx, PRInt32 *cy);
149     nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint);
150     nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
151     nsresult Repaint(PRBool force);
152     nsresult GetParentWidget(nsIWidget **aParentWidget); 
153     nsresult SetParentWidget(nsIWidget *aParentWidget);
154     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
155     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
156     nsresult GetVisibility(PRBool *aVisibility);
157     nsresult SetVisibility(PRBool aVisibility);
158     nsresult GetEnabled(PRBool *aEnabled);
159     nsresult SetEnabled(PRBool aEnabled);
160     nsresult GetBlurSuppression(PRBool *aBlurSuppression);
161     nsresult SetBlurSuppression(PRBool aBlurSuppression);
162     nsresult GetMainWidget(nsIWidget **aMainWidget);
163     nsresult SetFocus();
164     nsresult GetTitle(PRUnichar **aTitle);
165     nsresult SetTitle(const PRUnichar *aTitle);
166 }
167
168 cpp_quote("#define LOAD_FLAGS_NONE 0");
169
170 [
171     object,
172     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c)
173 ]
174 interface nsIWebNavigation : nsISupports
175 {
176     nsresult GetCanGoBack(PRBool *aCanGoBack);
177     nsresult GetCanGoForward(PRBool *aCanGoForward);
178     nsresult GoBack();
179     nsresult GoForward();
180     nsresult GotoIndex(PRInt32 index);
181     nsresult LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer,
182             nsIInputStream *aPostData, nsIInputStream *aHeaders);
183     nsresult Reload(PRUint32 aReloadFlags);
184     nsresult Stop(PRUint32 aStopFlags);
185     nsresult GetDocument(nsIDOMDocument **aDocument);
186     nsresult GetCurrentURI(nsIURI **aCurrentURI);
187     nsresult GetReferringURI(nsIURI **aReferringURI);
188     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
189     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
190 }
191
192 [
193     object,
194     uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)
195 ]
196 interface nsIFile : nsISupports
197 {
198     nsresult Append(const nsAString *node);
199     nsresult AppendNative(const nsAString *node);
200     nsresult Normalize();
201     nsresult Create(PRUint32 type, PRUint32 permission);
202     nsresult GetLeafName(nsAString *aLeafName);
203     nsresult SetLeafName(const nsAString *aLeafName);
204     nsresult GetNativeLeafName(nsAString *aLeafName);
205     nsresult SetNativeLeafName(const nsAString *aLeafName);
206     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
207     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
208     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
209     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
210     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
211     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
212     nsresult Remove(PRBool recursive);
213     nsresult GetPermissions(PRUint32 *aPermissions);
214     nsresult SetPermissions(PRUint32 pPermissions);
215     nsresult GetPermissionsOfLink(PRUint32 *aPermissions);
216     nsresult SetPermissionsOfLink(PRUint32 pPermissions);
217     nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime);
218     nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime);
219     nsresult GetFileSize(PRInt64 *aFileSize);
220     nsresult SetFileSize(PRInt64 aFileSize);
221     nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink);
222     nsresult GetTarget(nsAString *aTarget);
223     nsresult GetNativeTarget(nsACString *aNativeTarget);
224     nsresult GetPath(nsAString *aPath);
225     nsresult GetNativePath(nsACString *aNativePath);
226     nsresult Exists(PRBool *_retval);
227     nsresult IsWritable(PRBool *_retval);
228     nsresult IsReadable(PRBool *_retval);
229     nsresult IsExecutable(PRBool *_retval);
230     nsresult IsHidden(PRBool *_retval);
231     nsresult IsDirectory(PRBool *_retval);
232     nsresult IsFile(PRBool *_retval);
233     nsresult IsSymlink(PRBool *_retval);
234     nsresult IsSpecial(PRBool *_retval);
235     nsresult CreateUnique(PRUint32 type, PRUint32 permission);
236     nsresult Clone(nsIFile **_retval);
237     nsresult Equals(nsIFile *inFile, PRBool *_retval);
238     nsresult Contains(nsIFile *inFile, PRBool recir, PRBool *_retval);
239     nsresult GetParent(nsIFile **aParent);
240     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
241 }