devenum/tests: Get rid of strchrW() and strncmpW().
[wine.git] / include / directmanipulation.idl
blobdf7a09f55b629ad33c304019b994a9b0d28dafac
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;
35 typedef enum DIRECTMANIPULATION_STATUS
37 DIRECTMANIPULATION_BUILDING,
38 DIRECTMANIPULATION_ENABLED,
39 DIRECTMANIPULATION_DISABLED,
40 DIRECTMANIPULATION_RUNNING,
41 DIRECTMANIPULATION_INERTIA,
42 DIRECTMANIPULATION_READY,
43 DIRECTMANIPULATION_SUSPENDED
44 } DIRECTMANIPULATION_STATUS;
46 typedef enum DIRECTMANIPULATION_VIEWPORT_OPTIONS
48 DIRECTMANIPULATION_VIEWPORT_OPTIONS_DEFAULT = 0x00000000,
49 DIRECTMANIPULATION_VIEWPORT_OPTIONS_AUTODISABLE = 0x00000001,
50 DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE = 0x00000002,
51 DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT = 0x00000004,
52 DIRECTMANIPULATION_VIEWPORT_OPTIONS_EXPLICITHITTEST = 0x00000008,
53 DIRECTMANIPULATION_VIEWPORT_OPTIONS_DISABLEPIXELSNAPPING = 0x00000010,
54 } DIRECTMANIPULATION_VIEWPORT_OPTIONS;
56 typedef enum DIRECTMANIPULATION_CONFIGURATION
58 DIRECTMANIPULATION_CONFIGURATION_NONE = 0x00000000,
59 DIRECTMANIPULATION_CONFIGURATION_INTERACTION = 0x00000001,
60 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X = 0x00000002,
61 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_Y = 0x00000004,
62 DIRECTMANIPULATION_CONFIGURATION_SCALING = 0x00000010,
63 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA = 0x00000020,
64 DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA = 0x00000080,
65 DIRECTMANIPULATION_CONFIGURATION_RAILS_X = 0x00000100,
66 DIRECTMANIPULATION_CONFIGURATION_RAILS_Y = 0x00000200,
67 } DIRECTMANIPULATION_CONFIGURATION;
69 typedef enum DIRECTMANIPULATION_GESTURE_CONFIGURATION
71 DIRECTMANIPULATION_GESTURE_NONE = 0x00000000,
72 DIRECTMANIPULATION_GESTURE_DEFAULT = 0x00000000,
73 DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_VERTICAL = 0x00000008,
74 DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_HORIZONTAL = 0x00000010,
75 DIRECTMANIPULATION_GESTURE_PINCH_ZOOM = 0x00000020,
76 } DIRECTMANIPULATION_GESTURE_CONFIGURATION;
78 typedef enum DIRECTMANIPULATION_MOTION_TYPES
80 DIRECTMANIPULATION_MOTION_NONE = 0x00000000,
81 DIRECTMANIPULATION_MOTION_TRANSLATEX = 0x00000001,
82 DIRECTMANIPULATION_MOTION_TRANSLATEY = 0x00000002,
83 DIRECTMANIPULATION_MOTION_ZOOM = 0x00000004,
84 DIRECTMANIPULATION_MOTION_CENTERX = 0x00000010,
85 DIRECTMANIPULATION_MOTION_CENTERY = 0x00000020,
86 DIRECTMANIPULATION_MOTION_ALL = DIRECTMANIPULATION_MOTION_TRANSLATEX | DIRECTMANIPULATION_MOTION_TRANSLATEY |
87 DIRECTMANIPULATION_MOTION_ZOOM | DIRECTMANIPULATION_MOTION_CENTERX |
88 DIRECTMANIPULATION_MOTION_CENTERY
89 } DIRECTMANIPULATION_MOTION_TYPES;
91 typedef enum DIRECTMANIPULATION_SNAPPOINT_TYPE
93 DIRECTMANIPULATION_SNAPPOINT_MANDATORY,
94 DIRECTMANIPULATION_SNAPPOINT_OPTIONAL,
95 DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE,
96 DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE
97 } DIRECTMANIPULATION_SNAPPOINT_TYPE;
99 typedef enum DIRECTMANIPULATION_SNAPPOINT_COORDINATE
101 DIRECTMANIPULATION_COORDINATE_BOUNDARY = 0x00000000,
102 DIRECTMANIPULATION_COORDINATE_ORIGIN = 0x00000001,
103 DIRECTMANIPULATION_COORDINATE_MIRRORED = 0x00000010
104 } DIRECTMANIPULATION_SNAPPOINT_COORDINATE;
106 typedef enum DIRECTMANIPULATION_HORIZONTALALIGNMENT
108 DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE = 0x00000000,
109 DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT = 0x00000001,
110 DIRECTMANIPULATION_HORIZONTALALIGNMENT_CENTER = 0x00000002,
111 DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT = 0x00000004,
112 DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER = 0x00000008
113 } DIRECTMANIPULATION_HORIZONTALALIGNMENT;
115 typedef enum DIRECTMANIPULATION_VERTICALALIGNMENT
117 DIRECTMANIPULATION_VERTICALALIGNMENT_NONE = 0x00000000,
118 DIRECTMANIPULATION_VERTICALALIGNMENT_TOP = 0x00000001,
119 DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER = 0x00000002,
120 DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM = 0x00000004,
121 DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER = 0x00000008
122 } DIRECTMANIPULATION_VERTICALALIGNMENT;
124 typedef enum DIRECTMANIPULATION_INPUT_MODE
126 DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC,
127 DIRECTMANIPULATION_INPUT_MODE_MANUAL
128 } DIRECTMANIPULATION_INPUT_MODE;
131 local,
132 object,
133 uuid(fb759dba-6f4c-4c01-874e-19c8a05907f9),
134 pointer_default(unique)
136 interface IDirectManipulationFrameInfoProvider : IUnknown
138 HRESULT GetNextFrameInfo([out] ULONGLONG *time, [out] ULONGLONG *process, [out] ULONGLONG *composition);
142 local,
143 object,
144 uuid(fbf5d3b4-70c7-4163-9322-5a6f660d6fbc),
145 pointer_default(unique)
147 interface IDirectManipulationManager : IUnknown
149 HRESULT Activate([in] HWND window);
151 HRESULT Deactivate([in] HWND window);
153 HRESULT RegisterHitTestTarget([in] HWND window, [in] HWND hittest, [in] DIRECTMANIPULATION_HITTEST_TYPE type);
155 HRESULT ProcessInput([in] const MSG *msg, [out, retval] BOOL *handled);
157 HRESULT GetUpdateManager([in] REFIID riid, [out, iid_is(riid), retval,] void **obj);
159 HRESULT CreateViewport([in] IDirectManipulationFrameInfoProvider *frame, [in] HWND window,
160 [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
162 HRESULT CreateContent([in] IDirectManipulationFrameInfoProvider *frame, [in] REFCLSID clsid,
163 [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
167 local,
168 object,
169 uuid(b89962cb-3d89-442b-bb58-5098fa0f9f16),
170 pointer_default(unique)
172 interface IDirectManipulationContent : IUnknown
174 HRESULT GetContentRect([out] RECT *size);
176 HRESULT SetContentRect([in] const RECT *size);
178 HRESULT GetViewport([in] REFIID riid, [out, iid_is(riid)] void **object);
180 HRESULT GetTag([in] REFIID riid, [out, iid_is(riid)] void **object, [out] UINT32 *id);
182 HRESULT SetTag([in, unique] IUnknown *object, [in] UINT32 id);
184 HRESULT GetOutputTransform([out] float *matrix, [in] DWORD count);
186 HRESULT GetContentTransform([out] float *matrix, [in] DWORD count);
188 HRESULT SyncContentTransform([in] const float *matrix, [in] DWORD count);
192 local,
193 object,
194 uuid(790b6337-64f8-4ff5-a269-b32bc2af27a7),
195 pointer_default(unique)
197 interface IDirectManipulationUpdateHandler : IUnknown
199 HRESULT Update();
203 local,
204 object,
205 uuid(b0ae62fd-be34-46e7-9caa-d361facbb9cc),
206 pointer_default(unique)
208 interface IDirectManipulationUpdateManager : IUnknown
210 HRESULT RegisterWaitHandleCallback([in] HANDLE handle, [in] IDirectManipulationUpdateHandler *handler,
211 [out] DWORD *cookie);
213 HRESULT UnregisterWaitHandleCallback([in] DWORD cookie);
215 HRESULT Update([in] IDirectManipulationFrameInfoProvider *provider);
219 local,
220 object,
221 uuid(537a0825-0387-4efa-b62f-71eb1f085a7e),
222 pointer_default(unique)
224 interface IDirectManipulationCompositor : IUnknown
226 HRESULT AddContent([in] IDirectManipulationContent *content, [in] IUnknown *device,
227 [in] IUnknown *parent, [in] IUnknown *child);
229 HRESULT RemoveContent([in] IDirectManipulationContent *content);
231 HRESULT SetUpdateManager([in] IDirectManipulationUpdateManager *manager);
233 HRESULT Flush();
237 local,
238 object,
239 uuid(28b85a3d-60a0-48bd-9ba1-5ce8d9ea3a6d),
240 pointer_default(unique)
242 interface IDirectManipulationViewport : IUnknown
244 HRESULT Enable();
246 HRESULT Disable();
248 HRESULT SetContact([in] UINT32 id);
250 HRESULT ReleaseContact([in] UINT32 id);
252 HRESULT ReleaseAllContacts();
254 HRESULT GetStatus([out] DIRECTMANIPULATION_STATUS *status);
256 HRESULT GetTag([in] REFIID riid, [out, iid_is(riid)] void **object, [out] UINT32 *id);
258 HRESULT SetTag([in, unique] IUnknown *object, [in] UINT32 id);
260 HRESULT GetViewportRect([out, retval] RECT *viewport);
262 HRESULT SetViewportRect([in] const RECT *viewport);
264 HRESULT ZoomToRect([in] const float left, [in] const float top, [in] const float right,
265 [in] const float bottom, [in] BOOL animate);
267 HRESULT SetViewportTransform([in] const float *matrix, [in] DWORD count);
269 HRESULT SyncDisplayTransform([in] const float *matrix, [in] DWORD count);
271 HRESULT GetPrimaryContent([in] REFIID riid, [out, iid_is(riid)] void **object);
273 HRESULT AddContent([in, unique] IDirectManipulationContent *content);
275 HRESULT RemoveContent([in, unique] IDirectManipulationContent *content);
277 HRESULT SetViewportOptions([in] DIRECTMANIPULATION_VIEWPORT_OPTIONS options);
279 HRESULT AddConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
281 HRESULT RemoveConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
283 HRESULT ActivateConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
285 HRESULT SetManualGesture([in] DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration);
287 HRESULT SetChaining([in] DIRECTMANIPULATION_MOTION_TYPES enabledTypes);
289 HRESULT AddEventHandler([in] HWND window, [in] IDirectManipulationViewportEventHandler *eventHandler,
290 [out, retval] DWORD *cookie);
292 HRESULT RemoveEventHandler([in] DWORD cookie);
294 HRESULT SetInputMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
296 HRESULT SetUpdateMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
298 HRESULT Stop();
300 HRESULT Abandon();
304 local,
305 object,
306 uuid(923ccaac-61e1-4385-b726-017af189882a),
307 pointer_default(unique)
309 interface IDirectManipulationViewport2 : IDirectManipulationViewport
311 HRESULT AddBehavior([in] IUnknown *behavior, [out, retval] DWORD *cookie);
313 HRESULT RemoveBehavior([in] DWORD cookie);
315 HRESULT RemoveAllBehaviors();
319 local,
320 object,
321 uuid(952121DA-D69F-45F9-B0F9-F23944321A6D),
322 pointer_default(unique)
324 interface IDirectManipulationViewportEventHandler : IUnknown
326 HRESULT OnViewportStatusChanged([in] IDirectManipulationViewport *viewport, [in] DIRECTMANIPULATION_STATUS current,
327 [in] DIRECTMANIPULATION_STATUS previous);
329 HRESULT OnViewportUpdated([in] IDirectManipulationViewport *viewport);
331 HRESULT OnContentUpdated([in] IDirectManipulationViewport *viewport, [in] IDirectManipulationContent *content);
335 local,
336 object,
337 uuid(fa1005e9-3d16-484c-bfc9-62b61e56ec4e),
338 pointer_default(unique)
340 interface IDirectManipulationManager2 : IDirectManipulationManager
342 HRESULT CreateBehavior([in] REFCLSID clsid, [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
346 local,
347 object,
348 uuid(c12851e4-1698-4625-b9b1-7ca3ec18630b),
349 pointer_default(unique)
351 interface IDirectManipulationPrimaryContent : IUnknown
353 HRESULT SetSnapInterval([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] float interval, [in] float offset);
355 HRESULT SetSnapPoints([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] const float *points, [in] DWORD count);
357 HRESULT SetSnapType([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_TYPE type);
359 HRESULT SetSnapCoordinate([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate,
360 [in] float origin);
362 HRESULT SetZoomBoundaries([in] float minimum, [in] float maximum);
364 HRESULT SetHorizontalAlignment([in] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment);
366 HRESULT SetVerticalAlignment([in] DIRECTMANIPULATION_VERTICALALIGNMENT alignment);
368 HRESULT GetInertiaEndTransform([out] float *matrix, [in] DWORD count);
370 HRESULT GetCenterPoint([out] float *x, [out] float *y);
374 uuid(9fbedf98-f6d8-4e3b-b488-fa66dbf5e9f3),
375 version(1.0)
377 library DirectManipulation
380 uuid(54e211b6-3650-4f75-8334-fa359598e1c5)
382 coclass DirectManipulationManager
384 interface IDirectManipulationManager2;
385 [default] interface IDirectManipulationManager;
389 uuid(99793286-77cc-4b57-96db-3b354f6f9fb5)
391 coclass DirectManipulationSharedManager
393 interface IDirectManipulationManager2;
394 [default] interface IDirectManipulationManager;
398 uuid(79dea627-a08a-43ac-8ef5-6900b9299126)
400 coclass DCompManipulationCompositor
402 [default] interface IDirectManipulationCompositor;
403 interface IDirectManipulationFrameInfoProvider;
407 noncreatable,
408 hidden,
409 uuid(34e211b6-3650-4f75-8334-fa359598e1c5)
411 coclass DirectManipulationViewport
413 interface IDirectManipulationViewport2;
414 [default] interface IDirectManipulationViewport;