Debian Codegraph @

mingw-w64-headers/include/windows.devices.geolocation.idl

raw
1 /*
2 * Copyright 2023 Fabian Maurer
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 #ifdef __WIDL__
20 #pragma winrt ns_prefix
21 #endif
22
23 import "inspectable.idl";
24 import "asyncinfo.idl";
25 import "eventtoken.idl";
26 import "windowscontracts.idl";
27 import "windows.foundation.idl";
28
29 namespace Windows.Devices.Geolocation {
30
31 typedef enum PositionAccuracy PositionAccuracy;
32 typedef enum PositionStatus PositionStatus;
33
34 interface IGeolocator;
35 interface IGeoposition;
36 interface IGeocoordinate;
37 interface IPositionChangedEventArgs;
38 interface IStatusChangedEventArgs;
39 interface ICivicAddress;
40
41 runtimeclass Geolocator;
42 runtimeclass Geoposition;
43 runtimeclass Geocoordinate;
44 runtimeclass PositionChangedEventArgs;
45 runtimeclass StatusChangedEventArgs;
46 runtimeclass CivicAddress;
47
48 declare {
49 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Geolocation.Geoposition*>;
50 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Geolocation.Geoposition*>;
51 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Geolocation.Geolocator*, Windows.Devices.Geolocation.PositionChangedEventArgs*>;
52 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Geolocation.Geolocator*, Windows.Devices.Geolocation.StatusChangedEventArgs*>;
53 }
54
55 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
56 enum PositionAccuracy
57 {
58 Default = 0,
59 High = 1,
60 };
61
62 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
63 enum PositionStatus
64 {
65 Ready = 0,
66 Initializing = 1,
67 NoData = 2,
68 Disabled = 3,
69 NotInitialized = 4,
70 NotAvailable = 5,
71 };
72
73 /* Interfaces */
74
75 [
76 contract(Windows.Foundation.UniversalApiContract, 1.0),
77 exclusiveto(Windows.Devices.Geolocation.Geolocator),
78 uuid(a9c3bf62-4524-4989-8aa9-de019d2e551f)
79 ]
80 interface IGeolocator : IInspectable
81 {
82 [propget] HRESULT DesiredAccuracy([out, retval] Windows.Devices.Geolocation.PositionAccuracy *value);
83 [propput] HRESULT DesiredAccuracy([in] Windows.Devices.Geolocation.PositionAccuracy value);
84 [propget] HRESULT MovementThreshold([out, retval] DOUBLE *value);
85 [propput] HRESULT MovementThreshold([in] DOUBLE value);
86 [propget] HRESULT ReportInterval([out, retval] UINT32 *value);
87 [propput] HRESULT ReportInterval([in] UINT32 value);
88 [propget] HRESULT LocationStatus([out, retval] Windows.Devices.Geolocation.PositionStatus *value);
89 [overload("GetGeopositionAsync")]
90 HRESULT GetGeopositionAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Geolocation.Geoposition*> **value);
91 [overload("GetGeopositionAsync")]
92 HRESULT GetGeopositionAsyncWithAgeAndTimeout([in] Windows.Foundation.TimeSpan maximum_age,
93 [in] Windows.Foundation.TimeSpan timeout,
94 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Geolocation.Geoposition*> **value);
95 [eventadd] HRESULT PositionChanged([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Geolocation.Geolocator*, Windows.Devices.Geolocation.PositionChangedEventArgs*> *handler,
96 [out, retval] EventRegistrationToken *token);
97 [eventremove] HRESULT PositionChanged([in] EventRegistrationToken token);
98 [eventadd] HRESULT StatusChanged([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Geolocation.Geolocator*, Windows.Devices.Geolocation.StatusChangedEventArgs*> *handler,
99 [out, retval] EventRegistrationToken *token);
100 [eventremove] HRESULT StatusChanged([in] EventRegistrationToken token);
101 }
102
103 [
104 contract(Windows.Foundation.UniversalApiContract, 1.0),
105 exclusiveto(Windows.Devices.Geolocation.Geoposition),
106 uuid(c18d0454-7d41-4ff7-a957-9dffb4ef7f5b)
107 ]
108 interface IGeoposition : IInspectable
109 {
110 [propget] HRESULT Coordinate([out, retval] Windows.Devices.Geolocation.Geocoordinate **value);
111 [propget] HRESULT CivicAddress([out, retval] Windows.Devices.Geolocation.CivicAddress **value);
112 }
113
114 [
115 contract(Windows.Foundation.UniversalApiContract, 1.0),
116 exclusiveto(Windows.Devices.Geolocation.Geocoordinate),
117 uuid(ee21a3aa-976a-ac70-803d-083ea55bcbc4)
118 ]
119 interface IGeocoordinate : IInspectable
120 {
121 [deprecated("Use Point.Position.Latitude", deprecate, Windows.Foundation.UniversalApiContract, 1.0)]
122 [propget] HRESULT Latitude([out, retval] DOUBLE *value);
123 [deprecated("Use Point.Position.Longitude", deprecate, Windows.Foundation.UniversalApiContract, 1.0)]
124 [propget] HRESULT Longitude([out, retval] DOUBLE *value);
125 [deprecated("Use Point.Position.Altitude", deprecate, Windows.Foundation.UniversalApiContract, 1.0)]
126 [propget] HRESULT Altitude([out, retval] Windows.Foundation.IReference<DOUBLE> **value);
127 [propget] HRESULT Accuracy([out, retval] DOUBLE *value);
128 [propget] HRESULT AltitudeAccuracy([out, retval] Windows.Foundation.IReference<DOUBLE> **value);
129 [propget] HRESULT Heading([out, retval] Windows.Foundation.IReference<DOUBLE> **value);
130 [propget] HRESULT Speed([out, retval] Windows.Foundation.IReference<DOUBLE> **value);
131 [propget] HRESULT Timestamp([out, retval] Windows.Foundation.DateTime *value);
132 }
133
134 [
135 contract(Windows.Foundation.UniversalApiContract, 1.0),
136 exclusiveto(Windows.Devices.Geolocation.PositionChangedEventArgs),
137 uuid(37859ce5-9d1e-46c5-bf3b-6ad8cac1a093)
138 ]
139 interface IPositionChangedEventArgs : IInspectable
140 {
141 [propget] HRESULT Position([out, retval] Windows.Devices.Geolocation.Geoposition **value);
142 }
143
144 [
145 contract(Windows.Foundation.UniversalApiContract, 1.0),
146 exclusiveto(Windows.Devices.Geolocation.StatusChangedEventArgs),
147 uuid(3453d2da-8c93-4111-a205-9aecfc9be5c0)
148 ]
149 interface IStatusChangedEventArgs : IInspectable
150 {
151 [propget] HRESULT Status([out, retval] Windows.Devices.Geolocation.PositionStatus *value);
152 }
153
154 [
155 contract(Windows.Foundation.UniversalApiContract, 1.0),
156 exclusiveto(Windows.Devices.Geolocation.CivicAddress),
157 uuid(a8567a1a-64f4-4d48-bcea-f6b008eca34c)
158 ]
159 interface ICivicAddress : IInspectable
160 {
161 [propget] HRESULT Country([out, retval] HSTRING *value);
162 [propget] HRESULT State([out, retval] HSTRING *value);
163 [propget] HRESULT City([out, retval] HSTRING *value);
164 [propget] HRESULT PostalCode([out, retval] HSTRING *value);
165 [propget] HRESULT Timestamp([out, retval] Windows.Foundation.DateTime *value);
166 }
167
168 /* Runtime Classes */
169
170 [
171 activatable(Windows.Foundation.UniversalApiContract, 1.0),
172 contract(Windows.Foundation.UniversalApiContract, 1.0),
173 marshaling_behavior(agile),
174 threading(both)
175 ]
176 runtimeclass Geolocator
177 {
178 [default] interface Windows.Devices.Geolocation.IGeolocator;
179 }
180
181 [
182 contract(Windows.Foundation.UniversalApiContract, 1.0),
183 marshaling_behavior(agile)
184 ]
185 runtimeclass Geoposition
186 {
187 [default] interface Windows.Devices.Geolocation.IGeoposition;
188 }
189
190 [
191 contract(Windows.Foundation.UniversalApiContract, 1.0),
192 marshaling_behavior(agile)
193 ]
194 runtimeclass Geocoordinate
195 {
196 [default] interface Windows.Devices.Geolocation.IGeocoordinate;
197 }
198
199 [
200 contract(Windows.Foundation.UniversalApiContract, 1.0),
201 marshaling_behavior(agile)
202 ]
203 runtimeclass PositionChangedEventArgs
204 {
205 [default] interface Windows.Devices.Geolocation.IPositionChangedEventArgs;
206 }
207
208 [
209 contract(Windows.Foundation.UniversalApiContract, 1.0),
210 marshaling_behavior(agile)
211 ]
212 runtimeclass StatusChangedEventArgs
213 {
214 [default] interface Windows.Devices.Geolocation.IStatusChangedEventArgs;
215 }
216
217 [
218 contract(Windows.Foundation.UniversalApiContract, 1.0),
219 marshaling_behavior(agile)
220 ]
221 runtimeclass CivicAddress
222 {
223 [default] interface Windows.Devices.Geolocation.ICivicAddress;
224 }
225 }