win32u: Move NtUserGetMessage implementation from user32.
[wine.git] / include / directmanipulation.idl
blobb478b16a6b88ca874101c75ef51024265a72de8a
1 /*
2 * Copyright 2019 Alistair Leslie-Hughes
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.
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.
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
19 import "oaidl.idl";
20 import "ocidl.idl";
22 cpp_quote("#if 0")
23 typedef void* HWND;
24 cpp_quote("#endif")
26 interface IDirectManipulationViewportEventHandler;
28 typedef enum DIRECTMANIPULATION_HITTEST_TYPE
30 DIRECTMANIPULATION_HITTEST_TYPE_ASYNCHRONOUS = 0x00000000,
31 DIRECTMANIPULATION_HITTEST_TYPE_SYNCHRONOUS = 0x00000001,
32 DIRECTMANIPULATION_HITTEST_TYPE_AUTO_SYNCHRONOUS = 0x00000002
33 } DIRECTMANIPULATION_HITTEST_TYPE;
34 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_HITTEST_TYPE)")
36 typedef enum DIRECTMANIPULATION_STATUS
38 DIRECTMANIPULATION_BUILDING,
39 DIRECTMANIPULATION_ENABLED,
40 DIRECTMANIPULATION_DISABLED,
41 DIRECTMANIPULATION_RUNNING,
42 DIRECTMANIPULATION_INERTIA,
43 DIRECTMANIPULATION_READY,
44 DIRECTMANIPULATION_SUSPENDED
45 } DIRECTMANIPULATION_STATUS;
47 typedef enum DIRECTMANIPULATION_VIEWPORT_OPTIONS
49 DIRECTMANIPULATION_VIEWPORT_OPTIONS_DEFAULT = 0x00000000,
50 DIRECTMANIPULATION_VIEWPORT_OPTIONS_AUTODISABLE = 0x00000001,
51 DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE = 0x00000002,
52 DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT = 0x00000004,
53 DIRECTMANIPULATION_VIEWPORT_OPTIONS_EXPLICITHITTEST = 0x00000008,
54 DIRECTMANIPULATION_VIEWPORT_OPTIONS_DISABLEPIXELSNAPPING = 0x00000010,
55 } DIRECTMANIPULATION_VIEWPORT_OPTIONS;
56 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_VIEWPORT_OPTIONS)")
58 typedef enum DIRECTMANIPULATION_CONFIGURATION
60 DIRECTMANIPULATION_CONFIGURATION_NONE = 0x00000000,
61 DIRECTMANIPULATION_CONFIGURATION_INTERACTION = 0x00000001,
62 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X = 0x00000002,
63 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_Y = 0x00000004,
64 DIRECTMANIPULATION_CONFIGURATION_SCALING = 0x00000010,
65 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA = 0x00000020,
66 DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA = 0x00000080,
67 DIRECTMANIPULATION_CONFIGURATION_RAILS_X = 0x00000100,
68 DIRECTMANIPULATION_CONFIGURATION_RAILS_Y = 0x00000200,
69 } DIRECTMANIPULATION_CONFIGURATION;
70 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_CONFIGURATION)")
72 typedef enum DIRECTMANIPULATION_GESTURE_CONFIGURATION
74 DIRECTMANIPULATION_GESTURE_NONE = 0x00000000,
75 DIRECTMANIPULATION_GESTURE_DEFAULT = 0x00000000,
76 DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_VERTICAL = 0x00000008,
77 DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_HORIZONTAL = 0x00000010,
78 DIRECTMANIPULATION_GESTURE_PINCH_ZOOM = 0x00000020,
79 } DIRECTMANIPULATION_GESTURE_CONFIGURATION;
80 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_GESTURE_CONFIGURATION)")
82 typedef enum DIRECTMANIPULATION_MOTION_TYPES
84 DIRECTMANIPULATION_MOTION_NONE = 0x00000000,
85 DIRECTMANIPULATION_MOTION_TRANSLATEX = 0x00000001,
86 DIRECTMANIPULATION_MOTION_TRANSLATEY = 0x00000002,
87 DIRECTMANIPULATION_MOTION_ZOOM = 0x00000004,
88 DIRECTMANIPULATION_MOTION_CENTERX = 0x00000010,
89 DIRECTMANIPULATION_MOTION_CENTERY = 0x00000020,
90 DIRECTMANIPULATION_MOTION_ALL = DIRECTMANIPULATION_MOTION_TRANSLATEX | DIRECTMANIPULATION_MOTION_TRANSLATEY |
91 DIRECTMANIPULATION_MOTION_ZOOM | DIRECTMANIPULATION_MOTION_CENTERX |
92 DIRECTMANIPULATION_MOTION_CENTERY
93 } DIRECTMANIPULATION_MOTION_TYPES;
94 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_MOTION_TYPES)")
96 typedef enum DIRECTMANIPULATION_SNAPPOINT_TYPE
98 DIRECTMANIPULATION_SNAPPOINT_MANDATORY,
99 DIRECTMANIPULATION_SNAPPOINT_OPTIONAL,
100 DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE,
101 DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE
102 } DIRECTMANIPULATION_SNAPPOINT_TYPE;
104 typedef enum DIRECTMANIPULATION_SNAPPOINT_COORDINATE
106 DIRECTMANIPULATION_COORDINATE_BOUNDARY = 0x00000000,
107 DIRECTMANIPULATION_COORDINATE_ORIGIN = 0x00000001,
108 DIRECTMANIPULATION_COORDINATE_MIRRORED = 0x00000010
109 } DIRECTMANIPULATION_SNAPPOINT_COORDINATE;
110 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_SNAPPOINT_COORDINATE)")
112 typedef enum DIRECTMANIPULATION_HORIZONTALALIGNMENT
114 DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE = 0x00000000,
115 DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT = 0x00000001,
116 DIRECTMANIPULATION_HORIZONTALALIGNMENT_CENTER = 0x00000002,
117 DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT = 0x00000004,
118 DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER = 0x00000008
119 } DIRECTMANIPULATION_HORIZONTALALIGNMENT;
120 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_HORIZONTALALIGNMENT)")
122 typedef enum DIRECTMANIPULATION_VERTICALALIGNMENT
124 DIRECTMANIPULATION_VERTICALALIGNMENT_NONE = 0x00000000,
125 DIRECTMANIPULATION_VERTICALALIGNMENT_TOP = 0x00000001,
126 DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER = 0x00000002,
127 DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM = 0x00000004,
128 DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER = 0x00000008
129 } DIRECTMANIPULATION_VERTICALALIGNMENT;
130 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_VERTICALALIGNMENT)")
132 typedef enum DIRECTMANIPULATION_INPUT_MODE
134 DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC,
135 DIRECTMANIPULATION_INPUT_MODE_MANUAL
136 } DIRECTMANIPULATION_INPUT_MODE;
139 local,
140 object,
141 uuid(fb759dba-6f4c-4c01-874e-19c8a05907f9),
142 pointer_default(unique)
144 interface IDirectManipulationFrameInfoProvider : IUnknown
146 HRESULT GetNextFrameInfo([out] ULONGLONG *time, [out] ULONGLONG *process, [out] ULONGLONG *composition);
150 local,
151 object,
152 uuid(fbf5d3b4-70c7-4163-9322-5a6f660d6fbc),
153 pointer_default(unique)
155 interface IDirectManipulationManager : IUnknown
157 HRESULT Activate([in] HWND window);
159 HRESULT Deactivate([in] HWND window);
161 HRESULT RegisterHitTestTarget([in] HWND window, [in] HWND hittest, [in] DIRECTMANIPULATION_HITTEST_TYPE type);
163 HRESULT ProcessInput([in] const MSG *msg, [out, retval] BOOL *handled);
165 HRESULT GetUpdateManager([in] REFIID riid, [out, iid_is(riid), retval,] void **obj);
167 HRESULT CreateViewport([in] IDirectManipulationFrameInfoProvider *frame, [in] HWND window,
168 [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
170 HRESULT CreateContent([in] IDirectManipulationFrameInfoProvider *frame, [in] REFCLSID clsid,
171 [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
175 local,
176 object,
177 uuid(b89962cb-3d89-442b-bb58-5098fa0f9f16),
178 pointer_default(unique)
180 interface IDirectManipulationContent : IUnknown
182 HRESULT GetContentRect([out] RECT *size);
184 HRESULT SetContentRect([in] const RECT *size);
186 HRESULT GetViewport([in] REFIID riid, [out, iid_is(riid)] void **object);
188 HRESULT GetTag([in] REFIID riid, [out, iid_is(riid)] void **object, [out] UINT32 *id);
190 HRESULT SetTag([in, unique] IUnknown *object, [in] UINT32 id);
192 HRESULT GetOutputTransform([out] float *matrix, [in] DWORD count);
194 HRESULT GetContentTransform([out] float *matrix, [in] DWORD count);
196 HRESULT SyncContentTransform([in] const float *matrix, [in] DWORD count);
200 local,
201 object,
202 uuid(790b6337-64f8-4ff5-a269-b32bc2af27a7),
203 pointer_default(unique)
205 interface IDirectManipulationUpdateHandler : IUnknown
207 HRESULT Update();
211 local,
212 object,
213 uuid(b0ae62fd-be34-46e7-9caa-d361facbb9cc),
214 pointer_default(unique)
216 interface IDirectManipulationUpdateManager : IUnknown
218 HRESULT RegisterWaitHandleCallback([in] HANDLE handle, [in] IDirectManipulationUpdateHandler *handler,
219 [out] DWORD *cookie);
221 HRESULT UnregisterWaitHandleCallback([in] DWORD cookie);
223 HRESULT Update([in] IDirectManipulationFrameInfoProvider *provider);
227 local,
228 object,
229 uuid(537a0825-0387-4efa-b62f-71eb1f085a7e),
230 pointer_default(unique)
232 interface IDirectManipulationCompositor : IUnknown
234 HRESULT AddContent([in] IDirectManipulationContent *content, [in] IUnknown *device,
235 [in] IUnknown *parent, [in] IUnknown *child);
237 HRESULT RemoveContent([in] IDirectManipulationContent *content);
239 HRESULT SetUpdateManager([in] IDirectManipulationUpdateManager *manager);
241 HRESULT Flush();
245 local,
246 object,
247 uuid(28b85a3d-60a0-48bd-9ba1-5ce8d9ea3a6d),
248 pointer_default(unique)
250 interface IDirectManipulationViewport : IUnknown
252 HRESULT Enable();
254 HRESULT Disable();
256 HRESULT SetContact([in] UINT32 id);
258 HRESULT ReleaseContact([in] UINT32 id);
260 HRESULT ReleaseAllContacts();
262 HRESULT GetStatus([out] DIRECTMANIPULATION_STATUS *status);
264 HRESULT GetTag([in] REFIID riid, [out, iid_is(riid)] void **object, [out] UINT32 *id);
266 HRESULT SetTag([in, unique] IUnknown *object, [in] UINT32 id);
268 HRESULT GetViewportRect([out, retval] RECT *viewport);
270 HRESULT SetViewportRect([in] const RECT *viewport);
272 HRESULT ZoomToRect([in] const float left, [in] const float top, [in] const float right,
273 [in] const float bottom, [in] BOOL animate);
275 HRESULT SetViewportTransform([in] const float *matrix, [in] DWORD count);
277 HRESULT SyncDisplayTransform([in] const float *matrix, [in] DWORD count);
279 HRESULT GetPrimaryContent([in] REFIID riid, [out, iid_is(riid)] void **object);
281 HRESULT AddContent([in, unique] IDirectManipulationContent *content);
283 HRESULT RemoveContent([in, unique] IDirectManipulationContent *content);
285 HRESULT SetViewportOptions([in] DIRECTMANIPULATION_VIEWPORT_OPTIONS options);
287 HRESULT AddConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
289 HRESULT RemoveConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
291 HRESULT ActivateConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
293 HRESULT SetManualGesture([in] DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration);
295 HRESULT SetChaining([in] DIRECTMANIPULATION_MOTION_TYPES enabledTypes);
297 HRESULT AddEventHandler([in] HWND window, [in] IDirectManipulationViewportEventHandler *eventHandler,
298 [out, retval] DWORD *cookie);
300 HRESULT RemoveEventHandler([in] DWORD cookie);
302 HRESULT SetInputMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
304 HRESULT SetUpdateMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
306 HRESULT Stop();
308 HRESULT Abandon();
312 local,
313 object,
314 uuid(923ccaac-61e1-4385-b726-017af189882a),
315 pointer_default(unique)
317 interface IDirectManipulationViewport2 : IDirectManipulationViewport
319 HRESULT AddBehavior([in] IUnknown *behavior, [out, retval] DWORD *cookie);
321 HRESULT RemoveBehavior([in] DWORD cookie);
323 HRESULT RemoveAllBehaviors();
327 local,
328 object,
329 uuid(952121DA-D69F-45F9-B0F9-F23944321A6D),
330 pointer_default(unique)
332 interface IDirectManipulationViewportEventHandler : IUnknown
334 HRESULT OnViewportStatusChanged([in] IDirectManipulationViewport *viewport, [in] DIRECTMANIPULATION_STATUS current,
335 [in] DIRECTMANIPULATION_STATUS previous);
337 HRESULT OnViewportUpdated([in] IDirectManipulationViewport *viewport);
339 HRESULT OnContentUpdated([in] IDirectManipulationViewport *viewport, [in] IDirectManipulationContent *content);
343 local,
344 object,
345 uuid(fa1005e9-3d16-484c-bfc9-62b61e56ec4e),
346 pointer_default(unique)
348 interface IDirectManipulationManager2 : IDirectManipulationManager
350 HRESULT CreateBehavior([in] REFCLSID clsid, [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
354 local,
355 object,
356 uuid(c12851e4-1698-4625-b9b1-7ca3ec18630b),
357 pointer_default(unique)
359 interface IDirectManipulationPrimaryContent : IUnknown
361 HRESULT SetSnapInterval([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] float interval, [in] float offset);
363 HRESULT SetSnapPoints([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] const float *points, [in] DWORD count);
365 HRESULT SetSnapType([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_TYPE type);
367 HRESULT SetSnapCoordinate([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate,
368 [in] float origin);
370 HRESULT SetZoomBoundaries([in] float minimum, [in] float maximum);
372 HRESULT SetHorizontalAlignment([in] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment);
374 HRESULT SetVerticalAlignment([in] DIRECTMANIPULATION_VERTICALALIGNMENT alignment);
376 HRESULT GetInertiaEndTransform([out] float *matrix, [in] DWORD count);
378 HRESULT GetCenterPoint([out] float *x, [out] float *y);
382 local,
383 object,
384 uuid(d38c7822-f1cb-43cb-b4b9-ac0c767a412e),
385 pointer_default(unique)
387 interface IDirectManipulationCompositor2 : IDirectManipulationCompositor
389 HRESULT AddContentWithCrossProcessChaining([in] IDirectManipulationPrimaryContent *content, [in] IUnknown *device,
390 [in] IUnknown *parentVisual, [in] IUnknown *childVisual);
394 uuid(9fbedf98-f6d8-4e3b-b488-fa66dbf5e9f3),
395 version(1.0)
397 library DirectManipulation
400 uuid(54e211b6-3650-4f75-8334-fa359598e1c5)
402 coclass DirectManipulationManager
404 interface IDirectManipulationManager2;
405 [default] interface IDirectManipulationManager;
409 uuid(99793286-77cc-4b57-96db-3b354f6f9fb5)
411 coclass DirectManipulationSharedManager
413 interface IDirectManipulationManager2;
414 [default] interface IDirectManipulationManager;
418 uuid(79dea627-a08a-43ac-8ef5-6900b9299126)
420 coclass DCompManipulationCompositor
422 [default] interface IDirectManipulationCompositor;
423 interface IDirectManipulationCompositor2;
424 interface IDirectManipulationFrameInfoProvider;
428 noncreatable,
429 hidden,
430 uuid(34e211b6-3650-4f75-8334-fa359598e1c5)
432 coclass DirectManipulationViewport
434 interface IDirectManipulationViewport2;
435 [default] interface IDirectManipulationViewport;