winepulse: Move session_wrapper_create into mmdevapi.
[wine.git] / include / directmanipulation.idl
bloba48aa640fd43637c0d83b1ffee0fd8aabdba00b7
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;
138 typedef enum DIRECTMANIPULATION_INTERACTION_TYPE
140 DIRECTMANIPULATION_INTERACTION_BEGIN = 0,
141 DIRECTMANIPULATION_INTERACTION_TYPE_MANIPULATION = 1,
142 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_TAP = 2,
143 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_HOLD = 3,
144 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_CROSS_SLIDE = 4,
145 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_PINCH_ZOOM = 5,
146 DIRECTMANIPULATION_INTERACTION_END = 100
147 } DIRECTMANIPULATION_INTERACTION_TYPE;
150 local,
151 object,
152 uuid(fb759dba-6f4c-4c01-874e-19c8a05907f9),
153 pointer_default(unique)
155 interface IDirectManipulationFrameInfoProvider : IUnknown
157 HRESULT GetNextFrameInfo([out] ULONGLONG *time, [out] ULONGLONG *process, [out] ULONGLONG *composition);
161 local,
162 object,
163 uuid(fbf5d3b4-70c7-4163-9322-5a6f660d6fbc),
164 pointer_default(unique)
166 interface IDirectManipulationManager : IUnknown
168 HRESULT Activate([in] HWND window);
170 HRESULT Deactivate([in] HWND window);
172 HRESULT RegisterHitTestTarget([in] HWND window, [in] HWND hittest, [in] DIRECTMANIPULATION_HITTEST_TYPE type);
174 HRESULT ProcessInput([in] const MSG *msg, [out, retval] BOOL *handled);
176 HRESULT GetUpdateManager([in] REFIID riid, [out, iid_is(riid), retval,] void **obj);
178 HRESULT CreateViewport([in] IDirectManipulationFrameInfoProvider *frame, [in] HWND window,
179 [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
181 HRESULT CreateContent([in] IDirectManipulationFrameInfoProvider *frame, [in] REFCLSID clsid,
182 [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
186 local,
187 object,
188 uuid(b89962cb-3d89-442b-bb58-5098fa0f9f16),
189 pointer_default(unique)
191 interface IDirectManipulationContent : IUnknown
193 HRESULT GetContentRect([out] RECT *size);
195 HRESULT SetContentRect([in] const RECT *size);
197 HRESULT GetViewport([in] REFIID riid, [out, iid_is(riid)] void **object);
199 HRESULT GetTag([in] REFIID riid, [out, iid_is(riid)] void **object, [out] UINT32 *id);
201 HRESULT SetTag([in, unique] IUnknown *object, [in] UINT32 id);
203 HRESULT GetOutputTransform([out] float *matrix, [in] DWORD count);
205 HRESULT GetContentTransform([out] float *matrix, [in] DWORD count);
207 HRESULT SyncContentTransform([in] const float *matrix, [in] DWORD count);
211 local,
212 object,
213 uuid(790b6337-64f8-4ff5-a269-b32bc2af27a7),
214 pointer_default(unique)
216 interface IDirectManipulationUpdateHandler : IUnknown
218 HRESULT Update();
222 local,
223 object,
224 uuid(b0ae62fd-be34-46e7-9caa-d361facbb9cc),
225 pointer_default(unique)
227 interface IDirectManipulationUpdateManager : IUnknown
229 HRESULT RegisterWaitHandleCallback([in] HANDLE handle, [in] IDirectManipulationUpdateHandler *handler,
230 [out] DWORD *cookie);
232 HRESULT UnregisterWaitHandleCallback([in] DWORD cookie);
234 HRESULT Update([in] IDirectManipulationFrameInfoProvider *provider);
238 local,
239 object,
240 uuid(537a0825-0387-4efa-b62f-71eb1f085a7e),
241 pointer_default(unique)
243 interface IDirectManipulationCompositor : IUnknown
245 HRESULT AddContent([in] IDirectManipulationContent *content, [in] IUnknown *device,
246 [in] IUnknown *parent, [in] IUnknown *child);
248 HRESULT RemoveContent([in] IDirectManipulationContent *content);
250 HRESULT SetUpdateManager([in] IDirectManipulationUpdateManager *manager);
252 HRESULT Flush();
256 local,
257 object,
258 uuid(28b85a3d-60a0-48bd-9ba1-5ce8d9ea3a6d),
259 pointer_default(unique)
261 interface IDirectManipulationViewport : IUnknown
263 HRESULT Enable();
265 HRESULT Disable();
267 HRESULT SetContact([in] UINT32 id);
269 HRESULT ReleaseContact([in] UINT32 id);
271 HRESULT ReleaseAllContacts();
273 HRESULT GetStatus([out] DIRECTMANIPULATION_STATUS *status);
275 HRESULT GetTag([in] REFIID riid, [out, iid_is(riid)] void **object, [out] UINT32 *id);
277 HRESULT SetTag([in, unique] IUnknown *object, [in] UINT32 id);
279 HRESULT GetViewportRect([out, retval] RECT *viewport);
281 HRESULT SetViewportRect([in] const RECT *viewport);
283 HRESULT ZoomToRect([in] const float left, [in] const float top, [in] const float right,
284 [in] const float bottom, [in] BOOL animate);
286 HRESULT SetViewportTransform([in] const float *matrix, [in] DWORD count);
288 HRESULT SyncDisplayTransform([in] const float *matrix, [in] DWORD count);
290 HRESULT GetPrimaryContent([in] REFIID riid, [out, iid_is(riid)] void **object);
292 HRESULT AddContent([in, unique] IDirectManipulationContent *content);
294 HRESULT RemoveContent([in, unique] IDirectManipulationContent *content);
296 HRESULT SetViewportOptions([in] DIRECTMANIPULATION_VIEWPORT_OPTIONS options);
298 HRESULT AddConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
300 HRESULT RemoveConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
302 HRESULT ActivateConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
304 HRESULT SetManualGesture([in] DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration);
306 HRESULT SetChaining([in] DIRECTMANIPULATION_MOTION_TYPES enabledTypes);
308 HRESULT AddEventHandler([in] HWND window, [in] IDirectManipulationViewportEventHandler *eventHandler,
309 [out, retval] DWORD *cookie);
311 HRESULT RemoveEventHandler([in] DWORD cookie);
313 HRESULT SetInputMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
315 HRESULT SetUpdateMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
317 HRESULT Stop();
319 HRESULT Abandon();
323 local,
324 object,
325 uuid(923ccaac-61e1-4385-b726-017af189882a),
326 pointer_default(unique)
328 interface IDirectManipulationViewport2 : IDirectManipulationViewport
330 HRESULT AddBehavior([in] IUnknown *behavior, [out, retval] DWORD *cookie);
332 HRESULT RemoveBehavior([in] DWORD cookie);
334 HRESULT RemoveAllBehaviors();
338 local,
339 object,
340 uuid(952121DA-D69F-45F9-B0F9-F23944321A6D),
341 pointer_default(unique)
343 interface IDirectManipulationViewportEventHandler : IUnknown
345 HRESULT OnViewportStatusChanged([in] IDirectManipulationViewport *viewport, [in] DIRECTMANIPULATION_STATUS current,
346 [in] DIRECTMANIPULATION_STATUS previous);
348 HRESULT OnViewportUpdated([in] IDirectManipulationViewport *viewport);
350 HRESULT OnContentUpdated([in] IDirectManipulationViewport *viewport, [in] IDirectManipulationContent *content);
354 local,
355 object,
356 uuid(fa1005e9-3d16-484c-bfc9-62b61e56ec4e),
357 pointer_default(unique)
359 interface IDirectManipulationManager2 : IDirectManipulationManager
361 HRESULT CreateBehavior([in] REFCLSID clsid, [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
365 local,
366 object,
367 uuid(c12851e4-1698-4625-b9b1-7ca3ec18630b),
368 pointer_default(unique)
370 interface IDirectManipulationPrimaryContent : IUnknown
372 HRESULT SetSnapInterval([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] float interval, [in] float offset);
374 HRESULT SetSnapPoints([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] const float *points, [in] DWORD count);
376 HRESULT SetSnapType([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_TYPE type);
378 HRESULT SetSnapCoordinate([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate,
379 [in] float origin);
381 HRESULT SetZoomBoundaries([in] float minimum, [in] float maximum);
383 HRESULT SetHorizontalAlignment([in] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment);
385 HRESULT SetVerticalAlignment([in] DIRECTMANIPULATION_VERTICALALIGNMENT alignment);
387 HRESULT GetInertiaEndTransform([out] float *matrix, [in] DWORD count);
389 HRESULT GetCenterPoint([out] float *x, [out] float *y);
393 local,
394 object,
395 uuid(d38c7822-f1cb-43cb-b4b9-ac0c767a412e),
396 pointer_default(unique)
398 interface IDirectManipulationCompositor2 : IDirectManipulationCompositor
400 HRESULT AddContentWithCrossProcessChaining([in] IDirectManipulationPrimaryContent *content, [in] IUnknown *device,
401 [in] IUnknown *parentVisual, [in] IUnknown *childVisual);
405 local,
406 object,
407 uuid(e43f45b8-42b4-403e-b1f2-273b8f510830),
408 pointer_default(unique)
410 interface IDirectManipulationInteractionEventHandler : IUnknown
412 HRESULT OnInteraction([in] IDirectManipulationViewport2 *viewport,
413 [in] DIRECTMANIPULATION_INTERACTION_TYPE interaction);
417 uuid(9fbedf98-f6d8-4e3b-b488-fa66dbf5e9f3),
418 version(1.0)
420 library DirectManipulation
423 uuid(54e211b6-3650-4f75-8334-fa359598e1c5)
425 coclass DirectManipulationManager
427 interface IDirectManipulationManager2;
428 [default] interface IDirectManipulationManager;
432 uuid(99793286-77cc-4b57-96db-3b354f6f9fb5)
434 coclass DirectManipulationSharedManager
436 interface IDirectManipulationManager2;
437 [default] interface IDirectManipulationManager;
441 uuid(79dea627-a08a-43ac-8ef5-6900b9299126)
443 coclass DCompManipulationCompositor
445 [default] interface IDirectManipulationCompositor;
446 interface IDirectManipulationCompositor2;
447 interface IDirectManipulationFrameInfoProvider;
451 noncreatable,
452 hidden,
453 uuid(34e211b6-3650-4f75-8334-fa359598e1c5)
455 coclass DirectManipulationViewport
457 interface IDirectManipulationViewport2;
458 [default] interface IDirectManipulationViewport;