Debian Codegraph @

mingw-w64-headers/include/windows.globalization.idl

raw
1 /*
2 * Copyright 2021 Rémi Bernon 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 #ifdef __WIDL__
20 #pragma makedep header install winmd
21 #pragma winrt ns_prefix
22 #endif
23
24 import "inspectable.idl";
25 import "asyncinfo.idl";
26 import "eventtoken.idl";
27 import "windowscontracts.idl";
28 import "windows.foundation.idl";
29 import "windows.system.idl";
30
31 namespace Windows {
32 namespace Globalization {
33 typedef enum DayOfWeek DayOfWeek;
34 typedef enum LanguageLayoutDirection LanguageLayoutDirection;
35 interface IApplicationLanguagesStatics;
36 interface IApplicationLanguagesStatics2;
37 interface ICalendar;
38 interface ICalendarFactory;
39 interface ICalendarFactory2;
40 interface ILanguage;
41 interface ILanguage2;
42 interface ILanguage3;
43 interface ILanguageExtensionSubtags;
44 interface ILanguageFactory;
45 interface ILanguageStatics;
46 interface ILanguageStatics2;
47 interface ILanguageStatics3;
48 interface IGeographicRegion;
49 interface IGeographicRegionFactory;
50 interface IGeographicRegionStatics;
51 interface ITimeZoneOnCalendar;
52 runtimeclass ApplicationLanguages;
53 runtimeclass Calendar;
54 runtimeclass Language;
55 runtimeclass GeographicRegion;
56 }
57 }
58
59 namespace Windows {
60 namespace Globalization {
61 declare{
62 interface Windows.Foundation.Collections.IIterable<Windows.Globalization.Language*>;
63 interface Windows.Foundation.Collections.IIterator<Windows.Globalization.Language*>;
64 interface Windows.Foundation.Collections.IVectorView<Windows.Globalization.Language*>;
65 interface Windows.Foundation.Collections.IVector<Windows.Globalization.Language*>;
66 }
67 }
68 }
69
70
71 namespace Windows {
72 namespace Globalization {
73 [contract(Windows.Foundation.UniversalApiContract, 1.0)]
74 enum DayOfWeek
75 {
76 Sunday = 0,
77 Monday = 1,
78 Tuesday = 2,
79 Wednesday = 3,
80 Thursday = 4,
81 Friday = 5,
82 Saturday = 6
83 };
84
85 [contract(Windows.Foundation.UniversalApiContract, 6.0)]
86 enum LanguageLayoutDirection
87 {
88 Ltr = 0,
89 Rtl = 1,
90 TtbLtr = 2,
91 TtbRtl = 3,
92 };
93
94 [
95 contract(Windows.Foundation.UniversalApiContract, 1.0),
96 exclusiveto(Windows.Globalization.Calendar),
97 uuid(ca30221d-86d9-40fb-a26b-d44eb7cf08ea)
98 ]
99 interface ICalendar : IInspectable
100 {
101 HRESULT Clone([out, retval] Windows.Globalization.Calendar **value);
102 HRESULT SetToMin();
103 HRESULT SetToMax();
104 [propget] HRESULT Languages([out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value);
105 [propget] HRESULT NumeralSystem([out, retval] HSTRING *value);
106 [propput] HRESULT NumeralSystem([in] HSTRING value);
107 HRESULT GetCalendarSystem([out, retval] HSTRING *value);
108 HRESULT ChangeCalendarSystem([in] HSTRING value);
109 HRESULT GetClock([out, retval] HSTRING *value);
110 HRESULT ChangeClock([in] HSTRING value);
111 HRESULT GetDateTime([out, retval] Windows.Foundation.DateTime *result);
112 HRESULT SetDateTime([in] Windows.Foundation.DateTime value);
113 HRESULT SetToNow();
114 [propget] HRESULT FirstEra([out, retval] INT32 *value);
115 [propget] HRESULT LastEra([out, retval] INT32 *value);
116 [propget] HRESULT NumberOfEras([out, retval] INT32 *value);
117 [propget] HRESULT Era([out, retval] INT32 *value);
118 [propput] HRESULT Era([in] INT32 value);
119 HRESULT AddEras([in] INT32 eras);
120 [overload("EraAsString")] HRESULT EraAsFullString([out, retval] HSTRING *result);
121 [overload("EraAsString")] HRESULT EraAsString([in] INT32 ideal_length, [out, retval] HSTRING *result);
122 [propget] HRESULT FirstYearInThisEra([out, retval] INT32 *value);
123 [propget] HRESULT LastYearInThisEra([out, retval] INT32 *value);
124 [propget] HRESULT NumberOfYearsInThisEra([out, retval] INT32 *value);
125 [propget] HRESULT Year([out, retval] INT32 *value);
126 [propput] HRESULT Year([in] INT32 value);
127 HRESULT AddYears([in] INT32 years);
128 HRESULT YearAsString([out, retval] HSTRING *result);
129 HRESULT YearAsTruncatedString([in] INT32 remaining_digits, [out, retval] HSTRING *result);
130 HRESULT YearAsPaddedString([in] INT32 min_digits, [out, retval] HSTRING *result);
131 [propget] HRESULT FirstMonthInThisYear([out, retval] INT32 *value);
132 [propget] HRESULT LastMonthInThisYear([out, retval] INT32 *value);
133 [propget] HRESULT NumberOfMonthsInThisYear([out, retval] INT32 *value);
134 [propget] HRESULT Month([out, retval] INT32 *value);
135 [propput] HRESULT Month([in] INT32 value);
136 HRESULT AddMonths([in] INT32 months);
137 [overload("MonthAsString")] HRESULT MonthAsFullString([out, retval] HSTRING *result);
138 [overload("MonthAsString")] HRESULT MonthAsString([in] INT32 ideal_length, [out, retval] HSTRING *result);
139 [overload("MonthAsSoloString")] HRESULT MonthAsFullSoloString([out, retval] HSTRING *result);
140 [overload("MonthAsSoloString")] HRESULT MonthAsSoloString([in] INT32 ideal_length, [out, retval] HSTRING *result);
141 HRESULT MonthAsNumericString([out, retval] HSTRING *result);
142 HRESULT MonthAsPaddedNumericString([in] INT32 min_digits, [out, retval] HSTRING *result);
143 HRESULT AddWeeks([in] INT32 weeks);
144 [propget] HRESULT FirstDayInThisMonth([out, retval] INT32 *value);
145 [propget] HRESULT LastDayInThisMonth([out, retval] INT32 *value);
146 [propget] HRESULT NumberOfDaysInThisMonth([out, retval] INT32 *value);
147 [propget] HRESULT Day([out, retval] INT32 *value);
148 [propput] HRESULT Day([in] INT32 value);
149 HRESULT AddDays([in] INT32 days);
150 HRESULT DayAsString([out, retval] HSTRING *result);
151 HRESULT DayAsPaddedString([in] INT32 min_digits, [out, retval] HSTRING *result);
152 [propget] HRESULT DayOfWeek([out, retval] Windows.Globalization.DayOfWeek *value);
153 [overload("DayOfWeekAsString")] HRESULT DayOfWeekAsFullString([out, retval] HSTRING *result);
154 [overload("DayOfWeekAsString")] HRESULT DayOfWeekAsString([in] INT32 ideal_length, [out, retval] HSTRING *result);
155 [overload("DayOfWeekAsSoloString")] HRESULT DayOfWeekAsFullSoloString([out, retval] HSTRING *result);
156 [overload("DayOfWeekAsSoloString")] HRESULT DayOfWeekAsSoloString([in] INT32 ideal_length, [out, retval] HSTRING *result);
157 [propget] HRESULT FirstPeriodInThisDay([out, retval] INT32 *value);
158 [propget] HRESULT LastPeriodInThisDay([out, retval] INT32 *value);
159 [propget] HRESULT NumberOfPeriodsInThisDay([out, retval] INT32 *value);
160 [propget] HRESULT Period([out, retval] INT32 *value);
161 [propput] HRESULT Period([in] INT32 value);
162 HRESULT AddPeriods([in] INT32 periods);
163 [overload("PeriodAsString")] HRESULT PeriodAsFullString([out, retval] HSTRING *result);
164 [overload("PeriodAsString")] HRESULT PeriodAsString([in] INT32 ideal_length, [out, retval] HSTRING *result);
165 [propget] HRESULT FirstHourInThisPeriod([out, retval] INT32 *value);
166 [propget] HRESULT LastHourInThisPeriod([out, retval] INT32 *value);
167 [propget] HRESULT NumberOfHoursInThisPeriod([out, retval] INT32 *value);
168 [propget] HRESULT Hour([out, retval] INT32 *value);
169 [propput] HRESULT Hour([in] INT32 value);
170 HRESULT AddHours([in] INT32 hours);
171 HRESULT HourAsString([out, retval] HSTRING *result);
172 HRESULT HourAsPaddedString([in] INT32 min_digits, [out, retval] HSTRING *result);
173 [propget] HRESULT Minute([out, retval] INT32 *value);
174 [propput] HRESULT Minute([in] INT32 value);
175 HRESULT AddMinutes([in] INT32 minutes);
176 HRESULT MinuteAsString([out, retval] HSTRING *result);
177 HRESULT MinuteAsPaddedString([in] INT32 min_digits, [out, retval] HSTRING *result);
178 [propget] HRESULT Second([out, retval] INT32 *value);
179 [propput] HRESULT Second([in] INT32 value);
180 HRESULT AddSeconds([in] INT32 seconds);
181 HRESULT SecondAsString([out, retval] HSTRING *result);
182 HRESULT SecondAsPaddedString([in] INT32 min_digits, [out, retval] HSTRING *result);
183 [propget] HRESULT Nanosecond([out, retval] INT32 *value);
184 [propput] HRESULT Nanosecond([in] INT32 value);
185 HRESULT AddNanoseconds([in] INT32 nanoseconds);
186 HRESULT NanosecondAsString([out, retval] HSTRING *result);
187 HRESULT NanosecondAsPaddedString([in] INT32 min_digits, [out, retval] HSTRING *result);
188 HRESULT Compare([in] Windows.Globalization.Calendar *other, [out, retval] INT32 *result);
189 HRESULT CompareDateTime([in] Windows.Foundation.DateTime other, [out, retval] INT32 *result);
190 HRESULT CopyTo([in] Windows.Globalization.Calendar *other);
191 [propget] HRESULT FirstMinuteInThisHour([out, retval] INT32 *value);
192 [propget] HRESULT LastMinuteInThisHour([out, retval] INT32 *value);
193 [propget] HRESULT NumberOfMinutesInThisHour([out, retval] INT32 *value);
194 [propget] HRESULT FirstSecondInThisMinute([out, retval] INT32 *value);
195 [propget] HRESULT LastSecondInThisMinute([out, retval] INT32 *value);
196 [propget] HRESULT NumberOfSecondsInThisMinute([out, retval] INT32 *value);
197 [propget] HRESULT ResolvedLanguage([out, retval] HSTRING *value);
198 [propget] HRESULT IsDaylightSavingTime([out, retval] boolean *value);
199 }
200
201 [
202 contract(Windows.Foundation.UniversalApiContract, 1.0),
203 exclusiveto(Windows.Globalization.Calendar),
204 uuid(83f58412-e56b-4c75-a66e-0f63d57758a6)
205 ]
206 interface ICalendarFactory : IInspectable
207 {
208 HRESULT CreateCalendarDefaultCalendarAndClock(
209 [in] Windows.Foundation.Collections.IIterable<HSTRING> *languages,
210 [out, retval] Windows.Globalization.Calendar **result);
211 HRESULT CreateCalendar(
212 [in] Windows.Foundation.Collections.IIterable<HSTRING> *languages,
213 [in] HSTRING calendar,
214 [in] HSTRING clock,
215 [out, retval] Windows.Globalization.Calendar **result);
216 }
217
218 [
219 contract(Windows.Foundation.UniversalApiContract, 1.0),
220 exclusiveto(Windows.Globalization.Calendar),
221 uuid(b44b378c-ca7e-4590-9e72-ea2bec1a5115)
222 ]
223 interface ICalendarFactory2 : IInspectable
224 {
225 HRESULT CreateCalendarWithTimeZone(
226 [in] Windows.Foundation.Collections.IIterable<HSTRING> *languages,
227 [in] HSTRING calendar,
228 [in] HSTRING clock,
229 [in] HSTRING time_zone_id,
230 [out, retval] Windows.Globalization.Calendar **result);
231 }
232
233 [
234 contract(Windows.Foundation.UniversalApiContract, 1.0),
235 exclusiveto(Windows.Globalization.ApplicationLanguages),
236 uuid(75b40847-0a4c-4a92-9565-fd63c95f7aed)
237 ]
238 interface IApplicationLanguagesStatics : IInspectable
239 {
240 [propget] HRESULT PrimaryLanguageOverride([out, retval] HSTRING *value);
241 [propput] HRESULT PrimaryLanguageOverride([in] HSTRING value);
242 [propget] HRESULT Languages([out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value);
243 [propget] HRESULT ManifestLanguages([out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value);
244 }
245
246 [
247 contract(Windows.Foundation.UniversalApiContract, 6.0),
248 exclusiveto(Windows.Globalization.ApplicationLanguages),
249 uuid(1df0de4f-072b-4d7b-8f06-cb2db40f2bb5)
250 ]
251 interface IApplicationLanguagesStatics2 : IInspectable
252 {
253 HRESULT GetLanguagesForUser([in] Windows.System.User *user, [out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value);
254 }
255
256 [
257 contract(Windows.Foundation.UniversalApiContract, 1.0),
258 exclusiveto(Windows.Globalization.Language),
259 uuid(ea79a752-f7c2-4265-b1bd-c4dec4e4f080)
260 ]
261 interface ILanguage : IInspectable
262 {
263 [propget] HRESULT LanguageTag([out, retval] HSTRING *value);
264 [propget] HRESULT DisplayName([out, retval] HSTRING *value);
265 [propget] HRESULT NativeName([out, retval] HSTRING *value);
266 [propget] HRESULT Script([out, retval] HSTRING *value);
267 }
268
269 [
270 contract(Windows.Foundation.UniversalApiContract, 6.0),
271 exclusiveto(Windows.Globalization.Language),
272 uuid(6a47e5b5-d94d-4886-a404-a5a5b9d5b494)
273 ]
274 interface ILanguage2 : IInspectable
275 {
276 [propget] HRESULT LayoutDirection([out, retval] Windows.Globalization.LanguageLayoutDirection *value);
277 }
278
279 [
280 contract(Windows.Foundation.UniversalApiContract, 10.0),
281 exclusiveto(Windows.Globalization.Language),
282 uuid(c6af3d10-641a-5ba4-bb43-5e12aed75954)
283 ]
284 interface ILanguage3 : IInspectable
285 {
286 [propget] HRESULT AbbreviatedName([out, retval] HSTRING *value);
287 }
288
289 [
290 contract(Windows.Foundation.UniversalApiContract, 1.0),
291 exclusiveto(Windows.Globalization.Language),
292 uuid(7d7daf45-368d-4364-852b-dec927037b85)
293 ]
294 interface ILanguageExtensionSubtags : IInspectable
295 {
296 HRESULT GetExtensionSubtags([in] HSTRING tag, [out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value);
297 }
298
299 [
300 contract(Windows.Foundation.UniversalApiContract, 1.0),
301 exclusiveto(Windows.Globalization.Language),
302 uuid(9b0252ac-0c27-44f8-b792-9793fb66c63e)
303 ]
304 interface ILanguageFactory : IInspectable
305 {
306 HRESULT CreateLanguage([in] HSTRING tag, [out, retval] Windows.Globalization.Language **value);
307 }
308
309 [
310 contract(Windows.Foundation.UniversalApiContract, 1.0),
311 exclusiveto(Windows.Globalization.Language),
312 uuid(b23cd557-0865-46d4-89b8-d59be8990f0d)
313 ]
314 interface ILanguageStatics : IInspectable
315 {
316 HRESULT IsWellFormed([in] HSTRING tag, [out, retval] BOOLEAN *result);
317 [propget] HRESULT CurrentInputMethodLanguageTag([out, retval] HSTRING *value);
318 }
319
320 [
321 contract(Windows.Foundation.UniversalApiContract, 1.0),
322 exclusiveto(Windows.Globalization.Language),
323 uuid(30199f6e-914b-4b2a-9d6e-e3b0e27dbe4f)
324 ]
325 interface ILanguageStatics2 : IInspectable
326 {
327 HRESULT TrySetInputMethodLanguageTag([in] HSTRING tag, [out, retval] BOOLEAN *result);
328 }
329
330 [
331 contract(Windows.Foundation.UniversalApiContract, 10.0),
332 exclusiveto(Windows.Globalization.Language),
333 uuid(d15ecb5a-71de-5752-9542-fac5b4f27261)
334 ]
335 interface ILanguageStatics3 : IInspectable
336 {
337 HRESULT GetMuiCompatibleLanguageListFromLanguageTags([in] Windows.Foundation.Collections.IIterable<HSTRING> *tags, [out, retval] Windows.Foundation.Collections.IVector<HSTRING> **result);
338 }
339
340 [
341 contract(Windows.Foundation.UniversalApiContract, 1.0),
342 exclusiveto(Windows.Globalization.GeographicRegion),
343 uuid(01e9a621-4a64-4ed9-954f-9edeb07bd903)
344 ]
345 interface IGeographicRegion : IInspectable
346 {
347 [propget] HRESULT Code([out, retval] HSTRING *value);
348 [propget] HRESULT CodeTwoLetter([out, retval] HSTRING *value);
349 [propget] HRESULT CodeThreeLetter([out, retval] HSTRING *value);
350 [propget] HRESULT CodeThreeDigit([out, retval] HSTRING *value);
351 [propget] HRESULT DisplayName([out, retval] HSTRING *value);
352 [propget] HRESULT NativeName([out, retval] HSTRING *value);
353 [propget] HRESULT CurrenciesInUse([out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value);
354 }
355
356 [
357 contract(Windows.Foundation.UniversalApiContract, 1.0),
358 exclusiveto(Windows.Globalization.GeographicRegion),
359 uuid(53425270-77b4-426b-859f-81e19d512546)
360 ]
361 interface IGeographicRegionFactory : IInspectable
362 {
363 HRESULT CreateGeographicRegion([in] HSTRING region_code, [out, retval] Windows.Globalization.GeographicRegion **result);
364 }
365
366 [
367 contract(Windows.Foundation.UniversalApiContract, 1.0),
368 exclusiveto(Windows.Globalization.GeographicRegion),
369 uuid(29e28974-7ad9-4ef4-8799-b3b44fadec08)
370 ]
371 interface IGeographicRegionStatics : IInspectable
372 {
373 HRESULT IsSupported([in] HSTRING region_code, [out, retval] boolean *result);
374 }
375
376 [
377 contract(Windows.Foundation.UniversalApiContract, 1.0),
378 exclusiveto(Windows.Globalization.Calendar),
379 uuid(bb3c25e5-46cf-4317-a3f5-02621ad54478)
380 ]
381 interface ITimeZoneOnCalendar : IInspectable
382 {
383 HRESULT GetTimeZone([out, retval] HSTRING *value);
384 HRESULT ChangeTimeZone([in] HSTRING time_zone_id);
385 [overload("TimeZoneAsString")] HRESULT TimeZoneAsFullString([out, retval] HSTRING *result);
386 [overload("TimeZoneAsString")] HRESULT TimeZoneAsString([in] INT32 ideal_length, [out, retval] HSTRING *result);
387 }
388
389 [
390 activatable(Windows.Foundation.UniversalApiContract, 1.0),
391 activatable(Windows.Globalization.ICalendarFactory, Windows.Foundation.UniversalApiContract, 1.0),
392 activatable(Windows.Globalization.ICalendarFactory2, Windows.Foundation.UniversalApiContract, 1.0),
393 contract(Windows.Foundation.UniversalApiContract, 1.0),
394 marshaling_behavior(agile),
395 threading(both)
396 ]
397 runtimeclass Calendar
398 {
399 [contract(Windows.Foundation.UniversalApiContract, 1.0)] [default] interface Windows.Globalization.ICalendar;
400 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Globalization.ITimeZoneOnCalendar;
401 }
402
403 [
404 contract(Windows.Foundation.UniversalApiContract, 1.0),
405 marshaling_behavior(agile),
406 static(Windows.Globalization.IApplicationLanguagesStatics, Windows.Foundation.UniversalApiContract, 1.0),
407 static(Windows.Globalization.IApplicationLanguagesStatics2, Windows.Foundation.UniversalApiContract, 6.0),
408 threading(both)
409 ]
410 runtimeclass ApplicationLanguages
411 {
412 }
413
414 [
415 activatable(Windows.Globalization.ILanguageFactory, Windows.Foundation.UniversalApiContract, 1.0),
416 contract(Windows.Foundation.UniversalApiContract, 1.0),
417 marshaling_behavior(agile),
418 static(Windows.Globalization.ILanguageStatics, Windows.Foundation.UniversalApiContract, 1.0),
419 static(Windows.Globalization.ILanguageStatics2, Windows.Foundation.UniversalApiContract, 1.0),
420 static(Windows.Globalization.ILanguageStatics3, Windows.Foundation.UniversalApiContract, 10.0),
421 threading(both)
422 ]
423 runtimeclass Language
424 {
425 [contract(Windows.Foundation.UniversalApiContract, 1.0), default] interface Windows.Globalization.ILanguage;
426 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Globalization.ILanguageExtensionSubtags;
427 [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Globalization.ILanguage2;
428 [contract(Windows.Foundation.UniversalApiContract, 10.0)] interface Windows.Globalization.ILanguage3;
429 }
430
431 [
432 activatable(Windows.Foundation.UniversalApiContract, 1.0),
433 activatable(Windows.Globalization.IGeographicRegionFactory, Windows.Foundation.UniversalApiContract, 1.0),
434 contract(Windows.Foundation.UniversalApiContract, 1.0),
435 marshaling_behavior(agile),
436 static(Windows.Globalization.IGeographicRegionStatics, Windows.Foundation.UniversalApiContract, 1.0),
437 threading(both)
438 ]
439 runtimeclass GeographicRegion
440 {
441 [contract(Windows.Foundation.UniversalApiContract, 1.0), default] interface Windows.Globalization.IGeographicRegion;
442 }
443 }
444 }