dinput: COM cleanup - use helper function instead of direct typecast in mouse.
[wine] / programs / wscript / ihost.idl
1 /*
2  * Copyright 2010 Jacek Caban for CodeWeavers
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #include "ihost_dispid.h"
20
21 import "oaidl.idl";
22
23 [
24     uuid(60254ca0-953b-11cf-8c96-00aa00b8708c),
25     version(5.6),
26 ]
27 library IHost
28 {
29     importlib("stdole2.tlb");
30
31     [
32         odl,
33         uuid(2cc5a9d1-b1e5-11d3-a286-00104bd35090),
34         dual,
35         oleautomation
36     ]
37     interface IArguments2 : IDispatch {
38         [id(DISPID_VALUE)]
39         HRESULT Item(
40             [in] LONG Index,
41             [out, retval] BSTR *out_Value);
42
43         [id(IARGUMENTS2_COUNT_DISPID)]
44         HRESULT Count([out, retval] LONG *out_Count);
45
46         [id(IARGUMENTS2_LENGTH_DISPID), propget]
47         HRESULT length([out, retval] LONG *out_Count);
48     }
49
50     [
51         odl,
52         uuid(53bad8c1-e718-11cf-893d-00a0c9054228),
53         hidden,
54         dual,
55         nonextensible,
56         oleautomation
57     ]
58     interface ITextStream : IDispatch {
59         [id(ITEXTSTREAM_LINE_DISPID), propget]
60         HRESULT Line([out, retval] LONG *Line);
61
62         [id(ITEXTSTREAM_COLUMN_DISPID), propget]
63         HRESULT Column([out, retval] LONG *Column);
64
65         [id(ITEXTSTREAM_ATENDOFSTREAM_DISPID), propget]
66         HRESULT AtEndOfStream([out, retval] VARIANT_BOOL *EOS);
67
68         [id(ITEXTSTREAM_ATENDOFLINE_DISPID), propget]
69         HRESULT AtEndOfLine([out, retval] VARIANT_BOOL *EOL);
70
71         [id(ITEXTSTREAM_READ_DISPID)]
72         HRESULT Read(
73             [in] LONG Characters,
74             [out, retval] BSTR *Text);
75
76         [id(ITEXTSTREAM_READLINE_DISPID)]
77         HRESULT ReadLine([out, retval] BSTR *Text);
78
79         [id(ITEXTSTREAM_READALL_DISPID)]
80         HRESULT ReadAll([out, retval] BSTR *Text);
81
82         [id(ITEXTSTREAM_WRITE_DISPID)]
83         HRESULT Write([in] BSTR Text);
84
85         [id(ITEXTSTREAM_WRITELINE_DISPID)]
86         HRESULT WriteLine([in, optional, defaultvalue("")] BSTR Text);
87
88         [id(ITEXTSTREAM_WRITEBLANKLINES_DISPID)]
89         HRESULT WriteBlankLines([in] LONG Lines);
90
91         [id(ITEXTSTREAM_SKIP_DISPID)]
92         HRESULT Skip([in] LONG Characters);
93
94         [id(ITEXTSTREAM_SKIPLINE_DISPID)]
95         HRESULT SkipLine();
96
97         [id(ITEXTSTREAM_CLOSE_DISPID)]
98         HRESULT Close();
99     }
100
101     [
102         odl,
103         uuid(91afbd1b-5feb-43f5-b028-e2ca960617ec),
104         dual,
105         oleautomation
106     ]
107     interface IHost : IDispatch {
108         [id(IHOST_NAME_DISPID), propget]
109         HRESULT Name([out, retval] BSTR *out_Name);
110
111         [id(IHOST_APPLICATION_DISPID), propget]
112         HRESULT Application([out, retval] IDispatch **out_Dispatch);
113
114         [id(IHOST_FULLNAME_DISPID), propget]
115         HRESULT FullName([out, retval] BSTR *out_Path);
116
117         [id(IHOST_PATH_DISPID), propget]
118         HRESULT Path([out, retval] BSTR* out_Path);
119
120         [id(IHOST_INTERACTIVE_DISPID), propget]
121         HRESULT Interactive([out, retval] VARIANT_BOOL *out_Interactive);
122
123         [id(IHOST_INTERACTIVE_DISPID), propput]
124         HRESULT Interactive([in] VARIANT_BOOL out_Interactive);
125
126         [id(IHOST_QUIT_DISPID)]
127         HRESULT Quit([in, optional, defaultvalue(0)] int ExitCode);
128
129         [id(IHOST_SCRIPTNAME_DISPID), propget]
130         HRESULT ScriptName([out, retval] BSTR *out_ScriptName);
131
132         [id(IHOST_SCRIPTFULLNAME_DISPID), propget]
133         HRESULT ScriptFullName([out, retval] BSTR* out_ScriptFullName);
134
135         [id(IHOST_ARGUMENTS_DISPID), propget]
136         HRESULT Arguments([out, retval] IArguments2 **out_Arguments);
137
138         [id(IHOST_VERSION_DISPID), propget]
139         HRESULT Version([out, retval] BSTR *out_Version);
140
141         [id(IHOST_BUILDVERSION_DISPID), propget]
142         HRESULT BuildVersion([out, retval] int *out_Build);
143
144         [id(IHOST_TIMEOUT_DISPID), propget]
145         HRESULT Timeout([out, retval] LONG *out_Timeout);
146
147         [id(IHOST_TIMEOUT_DISPID), propput]
148         HRESULT Timeout([in] LONG out_Timeout);
149
150         [id(IHOST_CREATEOBJECT_DISPID)]
151         HRESULT CreateObject(
152                 [in] BSTR ProgID,
153                 [in, optional, defaultvalue("")] BSTR Prefix,
154                 [out, retval] IDispatch **out_Dispatch);
155
156         [id(IHOST_ECHO_DISPID), vararg]
157         HRESULT Echo([in] SAFEARRAY(VARIANT) pArgs);
158
159         [id(IHOST_GETOBJECT_DISPID)]
160         HRESULT GetObject(
161             [in] BSTR Pathname,
162             [in, optional, defaultvalue("")] BSTR ProgID,
163             [in, optional, defaultvalue("")] BSTR Prefix,
164             [out, retval] IDispatch **out_Dispatch);
165
166         [id(IHOST_DISCONNECTOBJECT_DISPID)]
167         HRESULT DisconnectObject([in] IDispatch *Object);
168
169         [id(IHOST_SLEEP_DISPID)]
170         HRESULT Sleep([in] LONG Time);
171
172         [id(IHOST_CONNECTOBJECT_DISPID)]
173         HRESULT ConnectObject(
174             [in] IDispatch *Object,
175             [in] BSTR Prefix);
176
177         [id(IHOST_STDIN_DISPID), propget]
178         HRESULT StdIn([out, retval] ITextStream **out_ppts);
179
180         [id(IHOST_STDOUT_DISPID), propget]
181         HRESULT StdOut([out, retval] ITextStream **ppts);
182
183         [id(IHOST_STDERR_DISPID), propget]
184         HRESULT StdErr([out, retval] ITextStream **ppts);
185     }
186 }