d3drm: Avoid LPD3DRMQUATERNION.
[wine] / include / gameux.idl
1  /*
2  *      Defines the COM interfaces of Game Explorer
3  *
4  * Copyright (C) 2008 Alistair Leslie-Hughes
5  * Copyright (C) 2010 Mariusz PluciƄski
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 import "oaidl.idl";
23 import "ocidl.idl";
24 import "shobjidl.idl";
25
26 #ifndef __WIDL__
27 #define threading(model)
28 #define progid(str)
29 #define vi_progid(str)
30 #endif
31
32 [
33   uuid(4F48A59C-942D-4F3C-83C9-4EFFE84E4959),
34   version(1.0),
35   helpstring("gameux public 1.0 Type Library")
36 ]
37 library gameuxLib
38 {
39     importlib("stdole2.tlb");
40
41     cpp_quote("#define ID_GDF_XML __GDF_XML")
42     cpp_quote("#define ID_GDF_THUMBNAIL __GDF_THUMBNAIL")
43     cpp_quote("#define ID_ICON_ICO __ICON_ICO")
44
45     cpp_quote("#if defined(__GNUC__)")
46     cpp_quote("#define ID_GDF_XML_STR (const WCHAR[]){'_','_','G','D','F','_','X','M','L',0}")
47     cpp_quote("#define ID_GDF_THUMBNAIL_STR (const WCHAR[]){'_','_','G','D','F','_','T','H','U','M','B','N','A','I','L',0}")
48     cpp_quote("#elif defined(_MSC_VER)")
49     cpp_quote("#define ID_GDF_XML_STR L\"__GDF_XML\"")
50     cpp_quote("#define ID_GDF_THUMBNAIL_STR L\"__GDF_THUMBNAIL\"")
51     cpp_quote("#endif")
52
53     typedef enum
54     {
55         GIS_NOT_INSTALLED  = 1,
56         GIS_CURRENT_USER   = 2,
57         GIS_ALL_USERS      = 3
58     } GAME_INSTALL_SCOPE;
59
60     typedef enum
61     {
62         GAMESTATS_OPEN_OPENORCREATE = 0,
63         GAMESTATS_OPEN_OPENONLY = 1
64     } GAMESTATS_OPEN_TYPE;
65
66     typedef enum
67     {
68         GAMESTATS_OPEN_CREATED = 0,
69         GAMESTATS_OPEN_OPENED = 1
70     } GAMESTATS_OPEN_RESULT;
71
72     [
73       object,
74       uuid(E7B2FB72-D728-49B3-A5F2-18EBF5F1349E)
75     ]
76     interface IGameExplorer : IUnknown
77     {
78         HRESULT AddGame([in] BSTR sGDFBinaryPath,
79                     [in] BSTR sInstallDirectory,
80                     [in] GAME_INSTALL_SCOPE installScope,
81                     [in, out] GUID* pguidInstanceID);
82
83         HRESULT RemoveGame([in] GUID instanceID);
84
85         HRESULT UpdateGame([in] GUID instanceID);
86
87         HRESULT VerifyAccess([in] BSTR sGDFBinaryPath,
88                     [out] BOOL* pHasAccess);
89     };
90
91     [
92       object,
93       uuid(3887C9CA-04A0-42ae-BC4C-5FA6C7721145)
94     ]
95     interface IGameStatistics : IUnknown
96     {
97         HRESULT GetMaxCategoryLength(
98                     [retval, out] UINT* cch);
99
100         HRESULT GetMaxNameLength(
101                     [retval, out] UINT* cch);
102
103         HRESULT GetMaxValueLength(
104                     [retval, out] UINT* cch);
105
106         HRESULT GetMaxCategories(
107                     [retval, out] WORD* pMax);
108
109         HRESULT GetMaxStatsPerCategory(
110                     [retval, out] WORD* pMax);
111
112         HRESULT SetCategoryTitle(
113                     [in] WORD categoryIndex,
114                     [string, in] LPCWSTR title);
115
116         HRESULT GetCategoryTitle(
117                     [in] WORD categoryIndex,
118                     [retval, string, out] LPWSTR* pTitle);
119
120         HRESULT GetStatistic(
121                     [in] WORD categoryIndex,
122                     [in] WORD statIndex,
123                     [string, unique, out, in] LPWSTR* pName,
124                     [string, unique, out, in] LPWSTR* pValue);
125
126         HRESULT SetStatistic(
127                     [in] WORD categoryIndex,
128                     [in] WORD statIndex,
129                     [string, in] LPCWSTR name,
130                     [string, in] LPCWSTR value);
131
132         HRESULT Save(
133                     [in] BOOL trackChanges);
134
135         HRESULT SetLastPlayedCategory(
136                     [in] UINT categoryIndex);
137
138         HRESULT GetLastPlayedCategory(
139                     [retval, out] UINT* pCategoryIndex);
140     };
141
142     [
143       object,
144       uuid(AFF3EA11-E70E-407d-95DD-35E612C41CE2)
145     ]
146     interface IGameStatisticsMgr : IUnknown
147     {
148         HRESULT GetGameStatistics(
149                     [string, in] LPCWSTR GDFBinaryPath,
150                     [in] GAMESTATS_OPEN_TYPE openType,
151                     [out] GAMESTATS_OPEN_RESULT* pOpenResult,
152                     [retval, out] IGameStatistics** ppiStats);
153
154         HRESULT RemoveGameStatistics(
155                     [string, in] LPCWSTR GDFBinaryPath);
156     };
157
158     [
159       object,
160       uuid(86874AA7-A1ED-450d-A7EB-B89E20B2FFF3)
161     ]
162     interface IGameExplorer2 : IUnknown
163     {
164        HRESULT InstallGame(
165                     [string, in] LPCWSTR binaryGDFPath,
166                     [unique, in] LPCWSTR installDirectory,
167                     [in] GAME_INSTALL_SCOPE installScope);
168
169         HRESULT UninstallGame(
170                     [string, in] LPCWSTR binaryGDFPath);
171
172         HRESULT CheckAccess(
173                     [string, in] LPCWSTR binaryGDFPath,
174                     [retval, out] BOOL* pHasAccess);
175
176     }
177
178     [
179       helpstring("GameExplorer Class"),
180       threading(both),
181       progid("gameux.GameExplorer.1"),
182       vi_progid("gameux.GameExplorer"),
183       uuid(9A5EA990-3034-4D6F-9128-01F3C61022BC)
184     ]
185     coclass GameExplorer
186     {
187         [default] interface IGameExplorer;
188     };
189
190     [
191       helpstring("GameStatistics Class"),
192       threading(apartment),
193       progid("gameux.GameStatistics.1"),
194       vi_progid("gameux.GameStatistics"),
195       uuid(DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4)
196     ]
197     coclass GameStatistics
198     {
199         [default] interface IGameStatistics;
200     };
201 }