summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/Graphics/shaderlib/wine/include/devicetopology.idl
blob: 413f636d5731391fcc936a5c1b4cb2d7c46399de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
/*
 * Core Audio device topology definitions
 *
 * Copyright 2009 Maarten Lankhorst
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 *
 */

/*
 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
 * a choice of LGPL license versions is made available with the language indicating
 * that LGPLv2 or any later version may be used, or where a choice of which version
 * of the LGPL is applied is otherwise unspecified.
 */

interface IPart;
interface IControlInterface;
interface IDeviceTopology;
interface IControlChangeNotify;

import "oaidl.idl";
import "ocidl.idl";
import "propidl.idl";

cpp_quote("#ifndef E_NOTFOUND")
cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
cpp_quote("#endif")

cpp_quote("#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 0x64726148 /* 'draH' */")
cpp_quote("DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xe2c2e9de, 0x09b1, 0x4b04,0x84,0xe5, 0x07, 0x93, 0x12, 0x25, 0xee, 0x04);")

cpp_quote("#define _IKsControl_")
cpp_quote("#include <ks.h>")
cpp_quote("#include <ksmedia.h>")
cpp_quote("#ifndef _KS_")

typedef struct {
    ULONG FormatSize;
    ULONG Flags;
    ULONG SampleSize;
    ULONG Reserved;
    GUID MajorFormat;
    GUID SubFormat;
    GUID Specifier;
} KSDATAFORMAT;

typedef KSDATAFORMAT *PKSDATAFORMAT;

typedef struct
{
    union
    {
        struct {
            GUID Set;
            ULONG Id;
            ULONG Flags;
        };
        LONGLONG Alignment;
    };
} KSIDENTIFIER;

typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY;
typedef KSIDENTIFIER KSMETHOD, *PKSMETHOD;
typedef KSIDENTIFIER KSEVENT, *PKSEVENT;

typedef enum
{
    eConnTypeUnknown = 0,
    eConnType3Point5mm,
    eConnTypeQuarter,
    eConnTypeAtapiInternal,
    eConnTypeRCA,
    eConnTypeOptical,
    eConnTypeOtherDigital,
    eConnTypeOtherAnalog,
    eConnTypeMultichannelAnalogDIN,
    eConnTypeXlrProfessional,
    eConnTypeRj11Modem,
    eConnTypeCombination
} EPcxConnectionType;

typedef enum
{
    eGeoLocRear = 1,
    eGeoLocFront,
    eGeoLocLeft,
    eGeoLocRight,
    eGeoLocTop,
    eGeoLocBottom,
    eGeoLocRearPanel,
    eGeoLocRiser,
    eGeoLocInsideMobileLid,
    eGeoLocDrivebay,
    eGeoLocHDMI,
    eGeoLocOutsideMobileLid,
    eGeoLocATAPI,
    eGeoLocReserved5,
    eGeoLocReserved6
} EPcxGeoLocation;

typedef enum
{
    eGenLocPrimaryBox = 0,
    eGenLocInternal,
    eGenLocSeparate,
    eGenLocOther
} EPcxGenLocation;

typedef enum
{
    ePortConnJack = 0,
    ePortConnIntegratedDevice,
    ePortConnBothIntegratedAndJack,
    ePortConnUnknown
} EPxcPortConnection;

typedef struct
{
    DWORD ChannelMapping;
    COLORREF Color;
    EPcxConnectionType ConnectionType;
    EPcxGeoLocation GeoLocation;
    EPcxGenLocation GenLocation;
    EPxcPortConnection PortConnection;
    BOOL IsConnected;
} KSJACK_DESCRIPTION;

typedef KSJACK_DESCRIPTION *PKSJACK_DESCRIPTION;

typedef struct _LUID
{
    DWORD LowPart;
    LONG HighPart;
} LUID;

typedef struct _LUID *PLUID;

typedef enum
{
    KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,
    KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT
} KSJACK_SINK_CONNECTIONTYPE;

typedef struct _tagKSJACK_SINK_INFORMATION
{
    KSJACK_SINK_CONNECTIONTYPE ConnType;
    WORD ManufacturerId;
    WORD ProductId;
    WORD AudioLatency;
    BOOL HDCPCapable;
    BOOL AICapable;
    UCHAR SinkDescriptionLength;
    WCHAR SinkDescription[32];
    LUID PortId;
} KSJACK_SINK_INFORMATION;

typedef struct _tagKSJACK_DESCRIPTION2
{
    DWORD DeviceStateInfo;
    DWORD JackCapabilities;
} KSJACK_DESCRIPTION2;

typedef struct _tagKSJACK_DESCRIPTION2 *PKSJACK_DESCRIPTION2;

cpp_quote("#endif")

typedef enum
{
    In = 0,
    Out
} DataFlow;

typedef enum
{
    Connector = 0,
    Subunit
} PartType;

typedef enum
{
    Unknown_Connector = 0,
    Physical_Internal,
    Physical_External,
    Software_IO,
    Software_Fixed,
    Network
} ConnectorType;

[
    pointer_default(unique),
    nonextensible,
    uuid(28f54685-06fd-11d2-b27a-00a0c9223196),
    local,
    object
]
interface IKsControl : IUnknown
{
    HRESULT KsProperty(
        [in] PKSPROPERTY Property,
        [in] ULONG PropertyLength,
        [in,out] void *PropertyData,
        [in] ULONG DataLength,
        [out] ULONG *BytesReturned
    );
    HRESULT KsMethod(
        [in] PKSMETHOD Method,
        [in] ULONG MethodLength,
        [in,out] void *MethodData,
        [in] ULONG DataLength,
        [out] ULONG *BytesReturned
    );
    HRESULT KsEvent(
        [in] PKSEVENT Event,
        [in] ULONG EventLength,
        [in,out] void *EventData,
        [in] ULONG DataLength,
        [out] ULONG *BytesReturned
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(c2f8e001-f205-4bc9-99bc-c13b1e048ccb),
    local,
    object
]
interface IPerChannelDbLevel : IUnknown
{
    HRESULT GetChannelCount(
        [out] UINT *pcChannels
    );
    HRESULT GetLevelRange(
        [in] UINT nChannel,
        [out] float *pfMinLevelDB,
        [out] float *pfMaxLevelDB,
        [out] float *pfStepping
    );
    HRESULT GetLevel(
        [in] UINT nChannel,
        [out] float *pfLevelDB
    );
    HRESULT SetLevel(
        [in] UINT nChannel,
        [in] float fLevelDB,
        [in,unique] LPCGUID pguidEventContext
    );
    HRESULT SetLevelUniform(
        [in] float fLevelDB,
        [in,unique] LPCGUID pguidEventContext
    );
    HRESULT SetLevelAllChannels(
        [size_is(cChannels),in] float *aLevelsDB,
        [in] ULONG cChannels,
        [in] LPCGUID pguidEventContext
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(7fb7b48f-531d-44a2-bcb3-5ad5a134b3dc),
    local,
    object
]
interface IAudioVolumeLevel : IPerChannelDbLevel
{
    /* Empty */
}

[
    pointer_default(unique),
    nonextensible,
    uuid(bb11c46f-ec28-493c-b88a-5db88062ce98),
    local,
    object
]
interface IAudioChannelConfig : IUnknown
{
    HRESULT SetChannelConfig(
        [in] DWORD dwConfig,
        [in] LPCGUID pguidEventContext
    );
    HRESULT GetChannelConfig(
        [in] DWORD dwConfig,
        [retval,out] DWORD *pdwConfig
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(7d8b1437-dd53-4350-9c1b-1ee2890bf938),
    local,
    object
]
interface IAudioLoudness : IUnknown
{
    HRESULT GetEnabled(
        [out] BOOL *pbEnabled
    );
    HRESULT SetEnabled(
        [in] BOOL bEnabled,
        [in] LPCGUID pguidEventContext
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(4f03dc02-5e6e-4653-8f72-a030c123d598),
    local,
    object
]
interface IAudioInputSelector : IUnknown
{
    HRESULT GetSelection(
        [out] UINT *pnIdSelected
    );
    HRESULT SetSelection(
        [in] UINT nIdSelect,
        [unique,in] LPCGUID pguidEventContext
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
    local,
    object
]
interface IAudioOutputSelector : IUnknown
{
    HRESULT GetSelection(
        [out] UINT *pnIdSelected
    );
    HRESULT SetSelection(
        [in] UINT nIdSelect,
        [unique,in] LPCGUID pguidEventContext
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
    local,
    object
]
interface IAudioMute : IUnknown
{
    HRESULT SetMute(
        [in] BOOL bMute,
        [unique,in] LPCGUID pguidEventContext
    );
    HRESULT GetMute(
        [out] BOOL *pbMute
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(a2b1a1d9-4db3-425d-a2b2-bd335cb3e2e5),
    local,
    object
]
interface IAudioBass : IPerChannelDbLevel
{
    /* Empty */
}

[
    pointer_default(unique),
    nonextensible,
    uuid(5e54b6d7-b44b-40d9-9a9e-e691d9ce6edf),
    local,
    object
]
interface IAudioMidRange : IPerChannelDbLevel
{
    /* Empty */
}

[
    pointer_default(unique),
    nonextensible,
    uuid(0a717812-694e-4907-b74b-bafa5cfdca7b),
    local,
    object
]
interface IAudioTreble : IPerChannelDbLevel
{
    /* Empty */
}

[
    pointer_default(unique),
    nonextensible,
    uuid(bb515f69-94a7-429e-8b9c-271b3f11a3ab),
    local,
    object
]
interface IAudioAutoGainControl : IUnknown
{
    HRESULT GetEnabled(
        [in] BOOL bEnabled,
        [unique,in] LPCGUID pguidEventContext
    );
    HRESULT GetMute(
        [out] BOOL *pbEnabled
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(dd79923c-0599-45e0-b8b6-c8df7db6e796),
    local,
    object
]
interface IAudioPeakMeter : IUnknown
{
    HRESULT GetChannelCount(
        [out] UINT *pcChannels
    );
    HRESULT GetLevel(
        [in] UINT nChannel,
        [out] float *pfLevel
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(3b22bcbf-2586-4af0-8583-205d391b807c),
    local,
    object
]
interface IDeviceSpecificProperty : IUnknown
{
    HRESULT GetType(
        [out] VARTYPE *pVType
    );
    HRESULT GetValue(
        [out] VARTYPE *pvType,
        [out,in] DWORD *pcbValue
    );
    HRESULT SetValue(
        [in] void *pvValue,
        [in] DWORD cbValue,
        [in] LPCGUID pguidEventContext
    );
    HRESULT Get4BRange(
        [out] LONG *plMin,
        [out] LONG *plMax,
        [out] LONG *plStepping
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(3cb4a69d-bb6f-4d2b-95b7-452d2c155db5),
    local,
    object
]
interface IKsFormatSupport : IUnknown
{
    HRESULT IsFormatSupported(
        [size_is(cbFormat),in] PKSDATAFORMAT pKsFormat,
        [in] DWORD cbFormat,
        [out] BOOL *pbSupported
    );
    HRESULT GetDevicePreferredFormat(
        [out] PKSDATAFORMAT *ppKsFormat
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(4509f757-2d46-4637-8e62-ce7db944f57b),
    local,
    object
]
interface IKsJackDescription : IUnknown
{
    HRESULT GetJackCount(
        [out] UINT *pcJacks
    );
    HRESULT GetJackDescription(
        [in] UINT nJack,
        [out] KSJACK_DESCRIPTION *pDescription
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(478f3a9b-e0c9-4827-9228-6f5505ffe76a),
    local,
    object
]
interface IKsJackDescription2 : IUnknown
{
    HRESULT GetJackCount(
        [out] UINT *pcJacks
    );
    HRESULT GetJackDescription2(
        [in] UINT nJack,
        [out] KSJACK_DESCRIPTION2 *pDescription2
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(d9bd72ed-290f-4581-9ff3-61027a8fe532),
    local,
    object
]
interface IKsJackSinkInformation : IUnknown
{
    HRESULT GetJackSinkInformation(
        [out] KSJACK_SINK_INFORMATION *pJackSinkInformation
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(6daa848c-5eb0-45cc-aea5-998a2cda1ffb),
    local,
    object
]
interface IPartsList : IUnknown
{
    HRESULT GetCount(
        [out] UINT *pCount
    );
    HRESULT GetPart(
        [in] UINT nIndex,
        [out] IPart **ppPart
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(ae2de0e4-5bca-4f2d-aa46-5d13f8fdb3a9),
    local,
    object
]
interface IPart : IUnknown
{
    HRESULT GetName(
        [out] LPWSTR *ppwstrName
    );
    HRESULT GetLocalId(
        [out] UINT *pnId
    );
    HRESULT GetGlobalId(
        [out] LPWSTR *ppwstrGlobalId
    );
    HRESULT GetPartType(
        [out] PartType *pPartType
    );
    HRESULT GetSubType(
        [out] GUID *pSubType
    );
    HRESULT GetControlInterfaceCount(
        [out] UINT *pCount
    );
    HRESULT GetControlInterface(
        [in] UINT nIndex,
        [out] IControlInterface **ppInterfaceDesc
    );
    HRESULT EnumPartsIncoming(
        [out] IPartsList **ppParts
    );
    HRESULT EnumPartsOutgoing(
        [out] IPartsList **ppParts
    );
    HRESULT GetTopologyObjects(
        [out] IDeviceTopology **ppTopology
    );
    HRESULT Activate(
        [in] DWORD dwClsContext,
        [in] REFIID refiid,
        [iid_is(refiid),out] void **ppvObject
    );
    HRESULT RegisterControlChangeCallback(
        [in] REFGUID riid,
        [in] IControlChangeNotify *pNotify
    );
    HRESULT UnregisterControlChangeCallback(
        [in] IControlChangeNotify *pNotify
    );
};

[
    pointer_default(unique),
    nonextensible,
    uuid(9c2c4058-23f5-41de-877a-df3af236a09e),
    local,
    object
]
interface IConnector : IUnknown
{
    HRESULT GetType(
        [out] ConnectorType *pType
    );
    HRESULT GetDataFlow(
        [out] DataFlow *pFlow
    );
    HRESULT ConnectTo(
        [in] IConnector *pConnectTo
    );
    HRESULT Disconnect(void);
    HRESULT IsConnected(
        [out] BOOL *pbConnected
    );
    HRESULT GetConnectedTo(
        [out] IConnector **ppConTo
    );
    HRESULT GetConnectorIdConnectedTo(
        [out] LPWSTR *ppwstrConnectorId
    );
    HRESULT GetDeviceIdConnectedTo(
        [out] LPWSTR *ppwstrDeviceId
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(82149a85-dba6-4487-86bb-ea8f7fefcc71),
    local,
    object
]
interface ISubUnit: IUnknown
{
    /* Empty IUnknown interface.. */
}

[
    pointer_default(unique),
    nonextensible,
    uuid(45d37c3f-5140-444a-ae24-400789f3cbf3),
    local,
    object
]
interface IControlInterface : IUnknown
{
    HRESULT GetName(
        [out] LPWSTR *ppwstrName
    );
    HRESULT GetIID(
        [out] GUID *pIID
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(a09513ed-c709-4d21-bd7b-5f34c47f3947),
    local,
    object
]
interface IControlChangeNotify : IUnknown
{
    HRESULT OnNotify(
        [in] DWORD dwSenderProcessId,
        [in] LPCGUID ppguidEventContext
    );
}

[
    pointer_default(unique),
    nonextensible,
    uuid(2a07407e-6497-4a18-9787-32f79bd0d98f),
    local,
    object
]
interface IDeviceTopology : IUnknown
{
    HRESULT GetConnectorCount(
        [out] UINT *pCount
    );
    HRESULT GetConnector(
        [in] UINT nIndex,
        [out] IConnector **ppConnector
    );
    HRESULT GetSubunitCount(
        [out] UINT *pCount
    );
    HRESULT GetSubunit(
        [in] UINT nIndex,
        [out] ISubUnit **ppConnector
    );
    HRESULT GetPartById(
        [in] UINT nId,
        [out] IPart **ppPart
    );
    HRESULT GetDeviceId(
        [out] LPWSTR *ppwstrDeviceId
    );
    HRESULT GetSignalPath(
        [in] IPart *pIPartFrom,
        [in] IPart *pIPartTo,
        [in] BOOL bRejectMixedPaths,
        [out] IPartsList **ppParts
    );
}

[
    version(1.0)
]
library DevTopologyLib
{
    [
        uuid(1df639d0-5ec1-47aa-9379-828dc1aa8c59),
    ]
    coclass DeviceTopology
    {
        interface IDeviceTopology;
    }
}