makefiles: Don't use standard libs for programs that specify -nodefaultlibs.
[wine/zf.git] / include / interactioncontext.h
blobc0892855fd7dccf71ce0f80fc7ceb875cd15cbbd
1 /*
2 * Copyright 2018 Józef Kucia
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 #ifndef INTERACTION_CONTEXT_H
20 #define INTERACTION_CONTEXT_H
22 #include <windows.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
28 DECLARE_HANDLE(HINTERACTIONCONTEXT);
30 typedef enum INTERACTION_CONTEXT_PROPERTY
32 INTERACTION_CONTEXT_PROPERTY_MEASUREMENT_UNITS = 1,
33 INTERACTION_CONTEXT_PROPERTY_INTERACTION_UI_FEEDBACK = 2,
34 INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS = 3,
35 INTERACTION_CONTEXT_PROPERTY_MAX = 0xffffffff,
36 } INTERACTION_CONTEXT_PROPERTY;
38 typedef enum INTERACTION_ID
40 INTERACTION_ID_NONE = 0,
41 INTERACTION_ID_MANIPULATION = 1,
42 INTERACTION_ID_TAP = 2,
43 INTERACTION_ID_SECONDARY_TAP = 3,
44 INTERACTION_ID_HOLD = 4,
45 INTERACTION_ID_DRAG = 5,
46 INTERACTION_ID_CROSS_SLIDE = 6,
47 INTERACTION_ID_MAX = 0xffffffff,
48 } INTERACTION_ID;
50 typedef enum INTERACTION_FLAGS
52 INTERACTION_FLAG_NONE = 0x00000000,
53 INTERACTION_FLAG_BEGIN = 0x00000001,
54 INTERACTION_FLAG_END = 0x00000002,
55 INTERACTION_FLAG_CANCEL = 0x00000004,
56 INTERACTION_FLAG_INERTIA = 0x00000008,
57 INTERACTION_FLAG_MAX = 0xffffffff,
58 } INTERACTION_FLAGS;
60 typedef enum INTERACTION_CONFIGURATION_FLAGS
62 INTERACTION_CONFIGURATION_FLAG_NONE = 0x00000000,
64 INTERACTION_CONFIGURATION_FLAG_MANIPULATION = 0x00000001,
65 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_X = 0x00000002,
66 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_Y = 0x00000004,
67 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_ROTATION = 0x00000008,
68 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_SCALING = 0x00000010,
69 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_INERTIA = 0x00000020,
70 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_ROTATION_INERTIA = 0x00000040,
71 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_SCALING_INERTIA = 0x00000080,
72 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_RAILS_X = 0x00000100,
73 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_RAILS_Y = 0x00000200,
74 INTERACTION_CONFIGURATION_FLAG_MANIPULATION_EXACT = 0x00000400,
76 INTERACTION_CONFIGURATION_FLAG_TAP = 0x00000001,
77 INTERACTION_CONFIGURATION_FLAG_TAP_DOUBLE = 0x00000002,
79 INTERACTION_CONFIGURATION_FLAG_SECONDARY_TAP = 0x00000001,
81 INTERACTION_CONFIGURATION_FLAG_HOLD = 0x00000001,
82 INTERACTION_CONFIGURATION_FLAG_HOLD_MOUSE = 0x00000002,
84 INTERACTION_CONFIGURATION_FLAG_DRAG = 0x00000001,
86 INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE = 0x00000001,
87 INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_HORIZONTAL = 0x00000002,
88 INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_SELECT = 0x00000004,
89 INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_SPEED_BUMP = 0x00000008,
90 INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_REARRANGE = 0x00000010,
91 INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_EXACT = 0x00000020,
93 INTERACTION_CONFIGURATION_FLAG_MAX = 0xffffffff,
94 } INTERACTION_CONFIGURATION_FLAGS;
96 typedef struct INTERACTION_CONTEXT_CONFIGURATION
98 INTERACTION_ID interactionId;
99 INTERACTION_CONFIGURATION_FLAGS enable;
101 } INTERACTION_CONTEXT_CONFIGURATION;
103 typedef struct MANIPULATION_TRANSFORM
105 float translationX;
106 float translationY;
107 float scale;
108 float expansion;
109 float rotation;
110 } MANIPULATION_TRANSFORM;
112 typedef struct MANIPULATION_VELOCITY
114 float velocityX;
115 float velocityY;
116 float velocityExpansion;
117 float velocityAngular;
118 } MANIPULATION_VELOCITY;
120 typedef enum MANIPULATION_RAILS_STATE
122 MANIPULATION_RAILS_STATE_UNDECIDED = 0,
123 MANIPULATION_RAILS_STATE_FREE = 1,
124 MANIPULATION_RAILS_STATE_RAILED = 2,
125 MANIPULATION_RAILS_STATE_MAX = 0xffffffff,
126 } MANIPULATION_RAILS_STATE;
128 typedef struct INTERACTION_ARGUMENTS_MANIPULATION
130 MANIPULATION_TRANSFORM delta;
131 MANIPULATION_TRANSFORM cumulative;
132 MANIPULATION_VELOCITY veolcity;
133 MANIPULATION_RAILS_STATE railsState;
134 } INTERACTION_ARGUMENTS_MANIPULATION;
136 typedef struct INTERACTION_ARGUMENTS_TAP
138 UINT32 count;
139 } INTERACTION_ARGUMENTS_TAP;
141 typedef enum CROSS_SLIDE_FLAGS
143 CROSS_SLIDE_FLAGS_NONE = 0x00000000,
144 CROSS_SLIDE_FLAGS_SELECT = 0x00000001,
145 CROSS_SLIDE_FLAGS_SPEED_BUMP = 0x00000002,
146 CROSS_SLIDE_FLAGS_REARRANGE = 0x00000004,
147 CROSS_SLIDE_FLAGS_MAX = 0xffffffff,
148 } CROSS_SLIDE_FLAGS;
150 typedef struct INTERACTION_ARGUMENTS_CROSS_SLIDE
152 CROSS_SLIDE_FLAGS flags;
153 } INTERACTION_ARGUMENTS_CROSS_SLIDE;
155 typedef struct INTERACTION_CONTEXT_OUTPUT
157 INTERACTION_ID interactionId;
158 INTERACTION_FLAGS interactionFlags;
159 POINTER_INPUT_TYPE inputType;
160 float x;
161 float y;
162 union
164 INTERACTION_ARGUMENTS_MANIPULATION manipulation;
165 INTERACTION_ARGUMENTS_TAP tap;
166 INTERACTION_ARGUMENTS_CROSS_SLIDE crossSlide;
167 } arguments;
168 } INTERACTION_CONTEXT_OUTPUT;
170 typedef void (CALLBACK *INTERACTION_CONTEXT_OUTPUT_CALLBACK)(void *data,
171 const INTERACTION_CONTEXT_OUTPUT *output);
173 HRESULT WINAPI CreateInteractionContext(HINTERACTIONCONTEXT *context);
174 HRESULT WINAPI DestroyInteractionContext(HINTERACTIONCONTEXT context);
176 HRESULT WINAPI ProcessInertiaInteractionContext(HINTERACTIONCONTEXT context);
178 HRESULT WINAPI RegisterOutputCallbackInteractionContext(HINTERACTIONCONTEXT context,
179 INTERACTION_CONTEXT_OUTPUT_CALLBACK callback, void *data);
181 HRESULT WINAPI GetInteractionConfigurationInteractionContext(HINTERACTIONCONTEXT context,
182 UINT32 count, INTERACTION_CONTEXT_CONFIGURATION *configuration);
183 HRESULT WINAPI SetInteractionConfigurationInteractionContext(HINTERACTIONCONTEXT context,
184 UINT32 count, const INTERACTION_CONTEXT_CONFIGURATION *configuration);
186 HRESULT WINAPI GetPropertyInteractionContext(HINTERACTIONCONTEXT context,
187 INTERACTION_CONTEXT_PROPERTY property, UINT32 *value);
188 HRESULT WINAPI SetPropertyInteractionContext(HINTERACTIONCONTEXT context,
189 INTERACTION_CONTEXT_PROPERTY property, UINT32 value);
191 #ifdef __cplusplus
192 } /* extern "C" */
193 #endif /* defined(__cplusplus) */
195 #endif