d3dx9/tests: Add D3DXCreateTextureFromResource tests.
[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 [
27   uuid(1DE6CE3D-EA69-4671-941F-26F789F39C5B),
28   version(1.0),
29   helpstring("gameux public 1.0 Type Library")
30 ]
31 library gameuxLib
32 {
33     importlib("stdole2.tlb");
34
35     cpp_quote("#define ID_GDF_XML __GDF_XML")
36     cpp_quote("#define ID_GDF_THUMBNAIL __GDF_THUMBNAIL")
37     cpp_quote("#define ID_ICON_ICO __ICON_ICO")
38
39     cpp_quote("#if defined(__GNUC__)")
40     cpp_quote("#define ID_GDF_XML_STR (const WCHAR[]){'_','_','G','D','F','_','X','M','L',0}")
41     cpp_quote("#define ID_GDF_THUMBNAIL_STR (const WCHAR[]){'_','_','G','D','F','_','T','H','U','M','B','N','A','I','L',0}")
42     cpp_quote("#elif defined(_MSC_VER)")
43     cpp_quote("#define ID_GDF_XML_STR L\"__GDF_XML\"")
44     cpp_quote("#define ID_GDF_THUMBNAIL_STR L\"__GDF_THUMBNAIL\"")
45     cpp_quote("#endif")
46
47     typedef enum
48     {
49         GIS_NOT_INSTALLED  = 1,
50         GIS_CURRENT_USER   = 2,
51         GIS_ALL_USERS      = 3
52     } GAME_INSTALL_SCOPE;
53
54     typedef enum
55     {
56         GAMESTATS_OPEN_OPENORCREATE = 0,
57         GAMESTATS_OPEN_OPENONLY = 1
58     } GAMESTATS_OPEN_TYPE;
59
60     typedef enum
61     {
62         GAMESTATS_OPEN_CREATED = 0,
63         GAMESTATS_OPEN_OPENED = 1
64     } GAMESTATS_OPEN_RESULT;
65
66     [
67       object,
68       uuid(E7B2FB72-D728-49B3-A5F2-18EBF5F1349E)
69     ]
70     interface IGameExplorer : IUnknown
71     {
72         HRESULT AddGame([in] BSTR sGDFBinaryPath,
73                     [in] BSTR sInstallDirectory,
74                     [in] GAME_INSTALL_SCOPE installScope,
75                     [in, out] GUID* pguidInstanceID);
76
77         HRESULT RemoveGame([in] GUID instanceID);
78
79         HRESULT UpdateGame([in] GUID instanceID);
80
81         HRESULT VerifyAccess([in] BSTR sGDFBinaryPath,
82                     [out] BOOL* pHasAccess);
83     };
84
85     [
86       object,
87       uuid(3887C9CA-04A0-42ae-BC4C-5FA6C7721145)
88     ]
89     interface IGameStatistics : IUnknown
90     {
91         HRESULT GetMaxCategoryLength(
92                     [retval, out] UINT* cch);
93
94         HRESULT GetMaxNameLength(
95                     [retval, out] UINT* cch);
96
97         HRESULT GetMaxValueLength(
98                     [retval, out] UINT* cch);
99
100         HRESULT GetMaxCategories(
101                     [retval, out] WORD* pMax);
102
103         HRESULT GetMaxStatsPerCategory(
104                     [retval, out] WORD* pMax);
105
106         HRESULT SetCategoryTitle(
107                     [in] WORD categoryIndex,
108                     [string, in] LPCWSTR title);
109
110         HRESULT GetCategoryTitle(
111                     [in] WORD categoryIndex,
112                     [retval, string, out] LPWSTR* pTitle);
113
114         HRESULT GetStatistic(
115                     [in] WORD categoryIndex,
116                     [in] WORD statIndex,
117                     [string, unique, out, in] LPWSTR* pName,
118                     [string, unique, out, in] LPWSTR* pValue);
119
120         HRESULT SetStatistic(
121                     [in] WORD categoryIndex,
122                     [in] WORD statIndex,
123                     [string, in] LPCWSTR name,
124                     [string, in] LPCWSTR value);
125
126         HRESULT Save(
127                     [in] BOOL trackChanges);
128
129         HRESULT SetLastPlayedCategory(
130                     [in] UINT categoryIndex);
131
132         HRESULT GetLastPlayedCategory(
133                     [retval, out] UINT* pCategoryIndex);
134     };
135
136     [
137       object,
138       uuid(AFF3EA11-E70E-407d-95DD-35E612C41CE2)
139     ]
140     interface IGameStatisticsMgr : IUnknown
141     {
142         HRESULT GetGameStatistics(
143                     [string, in] LPCWSTR GDFBinaryPath,
144                     [in] GAMESTATS_OPEN_TYPE openType,
145                     [out] GAMESTATS_OPEN_RESULT* pOpenResult,
146                     [retval, out] IGameStatistics** ppiStats);
147
148         HRESULT RemoveGameStatistics(
149                     [string, in] LPCWSTR GDFBinaryPath);
150     };
151
152     [
153       object,
154       uuid(86874AA7-A1ED-450d-A7EB-B89E20B2FFF3)
155     ]
156     interface IGameExplorer2 : IUnknown
157     {
158        HRESULT InstallGame(
159                     [string, in] LPCWSTR binaryGDFPath,
160                     [unique, in] LPCWSTR installDirectory,
161                     [in] GAME_INSTALL_SCOPE installScope);
162
163         HRESULT UninstallGame(
164                     [string, in] LPCWSTR binaryGDFPath);
165
166         HRESULT CheckAccess(
167                     [string, in] LPCWSTR binaryGDFPath,
168                     [retval, out] BOOL* pHasAccess);
169
170     }
171
172     [
173       uuid(9A5EA990-3034-4D6F-9128-01F3C61022BC)
174     ]
175     coclass GameExplorer
176     {
177         [default] interface IGameExplorer;
178     };
179
180     [
181       uuid(DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4)
182     ]
183     coclass GameStatistics
184     {
185         [default] interface IGameStatistics;
186     };
187 }