Debian Codegraph @

mingw-w64-headers/include/windows.ui.input.idl

raw
1 /*
2 * Copyright (C) 2024 Zhiyi Zhang 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 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 import "windows.devices.input.idl";
29 import "windows.system.idl";
30 import "windows.ui.core.idl";
31
32 namespace Windows.UI.Input {
33 typedef enum PointerUpdateKind PointerUpdateKind;
34
35 interface IPointerPoint;
36 interface IPointerPointProperties;
37 interface IPointerPointProperties2;
38 interface IPointerPointStatics;
39 interface IPointerPointTransform;
40
41 runtimeclass PointerPoint;
42 runtimeclass PointerPointProperties;
43
44 declare {
45 interface Windows.Foundation.Collections.IVectorView<Windows.UI.Input.PointerPoint *>;
46 interface Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *>;
47 }
48
49 [
50 contract(Windows.Foundation.UniversalApiContract, 1.0)
51 ]
52 enum PointerUpdateKind
53 {
54 Other = 0,
55 LeftButtonPressed = 1,
56 LeftButtonReleased = 2,
57 RightButtonPressed = 3,
58 RightButtonReleased = 4,
59 MiddleButtonPressed = 5,
60 MiddleButtonReleased = 6,
61 XButton1Pressed = 7,
62 XButton1Released = 8,
63 XButton2Pressed = 9,
64 XButton2Released = 10
65 };
66
67 [
68 contract(Windows.Foundation.UniversalApiContract, 1.0),
69 exclusiveto(Windows.UI.Input.PointerPoint),
70 uuid(e995317d-7296-42d9-8233-c5be73b74a4a)
71 ]
72 interface IPointerPoint : IInspectable
73 {
74 [propget] HRESULT PointerDevice([out, retval] Windows.Devices.Input.PointerDevice **value);
75 [propget] HRESULT Position([out, retval] Windows.Foundation.Point *value);
76 [propget] HRESULT RawPosition([out, retval] Windows.Foundation.Point *value);
77 [propget] HRESULT pointer_id([out, retval] UINT32 *value);
78 [propget] HRESULT FrameId([out, retval] UINT32 *value);
79 [propget] HRESULT Timestamp([out, retval] UINT64 *value);
80 [propget] HRESULT IsInContact([out, retval] boolean *value);
81 [propget] HRESULT Properties([out, retval] Windows.UI.Input.PointerPointProperties **value);
82 }
83
84 [
85 contract(Windows.Foundation.UniversalApiContract, 1.0),
86 exclusiveto(Windows.UI.Input.PointerPointProperties),
87 uuid(c79d8a4b-c163-4ee7-803f-67ce79f9972d)
88 ]
89 interface IPointerPointProperties : IInspectable
90 {
91 [propget] HRESULT Pressure([out, retval] FLOAT *value);
92 [propget] HRESULT IsInverted([out, retval] boolean *value);
93 [propget] HRESULT IsEraser([out, retval] boolean *value);
94 [propget] HRESULT Orientation([out, retval] FLOAT *value);
95 [propget] HRESULT XTilt([out, retval] FLOAT *value);
96 [propget] HRESULT YTilt([out, retval] FLOAT *value);
97 [propget] HRESULT Twist([out, retval] FLOAT *value);
98 [propget] HRESULT ContactRect([out, retval] Windows.Foundation.Rect *value);
99 [propget] HRESULT ContactRectRaw([out, retval] Windows.Foundation.Rect *value);
100 [propget] HRESULT TouchConfidence([out, retval] boolean *value);
101 [propget] HRESULT IsLeftButtonPressed([out, retval] boolean *value);
102 [propget] HRESULT IsRightButtonPressed([out, retval] boolean *value);
103 [propget] HRESULT IsMiddleButtonPressed([out, retval] boolean *value);
104 [propget] HRESULT MouseWheelDelta([out, retval] INT32 *value);
105 [propget] HRESULT IsHorizontalMouseWheel([out, retval] boolean *value);
106 [propget] HRESULT IsPrimary([out, retval] boolean *value);
107 [propget] HRESULT IsInRange([out, retval] boolean *value);
108 [propget] HRESULT IsCanceled([out, retval] boolean *value);
109 [propget] HRESULT IsBarrelButtonPressed([out, retval] boolean *value);
110 [propget] HRESULT IsXButton1Pressed([out, retval] boolean *value);
111 [propget] HRESULT IsXButton2Pressed([out, retval] boolean *value);
112 [propget] HRESULT PointerUpdateKind([out, retval] Windows.UI.Input.PointerUpdateKind *value);
113 HRESULT HasUsage([in] UINT32 usage_page, [in] UINT32 usage_id, [out, retval] boolean *value);
114 HRESULT GetUsageValue([in] UINT32 usage_page, [in] UINT32 usage_id, [out, retval] INT32 *value);
115 }
116
117 [
118 contract(Windows.Foundation.UniversalApiContract, 1.0),
119 exclusiveto(Windows.UI.Input.PointerPointProperties),
120 uuid(22c3433a-c83b-41c0-a296-5e232d64d6af)
121 ]
122 interface IPointerPointProperties2 : IInspectable
123 {
124 [propget] HRESULT ZDistance([out, retval] Windows.Foundation.IReference<FLOAT> **value);
125 }
126
127 [
128 contract(Windows.Foundation.UniversalApiContract, 1.0),
129 exclusiveto(Windows.UI.Input.PointerPoint),
130 uuid(a506638d-2a1a-413e-bc75-9f38381cc069)
131 ]
132 interface IPointerPointStatics : IInspectable
133 {
134 [overload("GetCurrentPoint")] HRESULT GetCurrentPoint([in] UINT32 pointer_id, [out, retval] Windows.UI.Input.PointerPoint **point);
135 [overload("GetIntermediatePoints")] HRESULT GetIntermediatePoints([in] UINT32 pointer_id, [out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **points);
136 [overload("GetCurrentPoint")] HRESULT GetCurrentPointTransformed([in] UINT32 pointer_id, [in] Windows.UI.Input.IPointerPointTransform *transform, [out, retval] Windows.UI.Input.PointerPoint **point);
137 [overload("GetIntermediatePoints")] HRESULT GetIntermediatePointsTransformed([in] UINT32 pointer_id, [in] Windows.UI.Input.IPointerPointTransform *transform, [out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **points);
138 }
139
140 [
141 contract(Windows.Foundation.UniversalApiContract, 1.0),
142 uuid(4d5fe14f-b87c-4028-bc9c-59e9947fb056)
143 ]
144 interface IPointerPointTransform : IInspectable
145 {
146 [propget] HRESULT Inverse([out, retval] Windows.UI.Input.IPointerPointTransform **value);
147 HRESULT TryTransform([in] Windows.Foundation.Point in_point, [out] Windows.Foundation.Point *out_point, [out, retval] boolean *value);
148 HRESULT TransformBounds([in] Windows.Foundation.Rect rect, [out, retval] Windows.Foundation.Rect *value);
149 }
150
151 [
152 contract(Windows.Foundation.UniversalApiContract, 1.0),
153 marshaling_behavior(none),
154 static(Windows.UI.Input.IPointerPointStatics, Windows.Foundation.UniversalApiContract, 1.0)
155 ]
156 runtimeclass PointerPoint
157 {
158 [default] interface Windows.UI.Input.IPointerPoint;
159 }
160
161 [
162 contract(Windows.Foundation.UniversalApiContract, 1.0),
163 marshaling_behavior(none)
164 ]
165 runtimeclass PointerPointProperties
166 {
167 [default] interface Windows.UI.Input.IPointerPointProperties;
168 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.Input.IPointerPointProperties2;
169 }
170 }