ddraw/tests: Move the capability tests for enumerated devices.
[wine.git] / dlls / joy.cpl / joy.h
blob64df21963b9f1cc113e1a3723a132ad77cd1f69b
1 /*
2 * Joystick testing control panel applet resources and definitions
4 * Copyright 2012 Lucas Fialho Zawacki
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __WINE_JOYSTICKCPL__
23 #define __WINE_JOYSTICKCPL__
25 #include <winuser.h>
26 #include <windef.h>
27 #include <commctrl.h>
28 #include <dinput.h>
30 extern HMODULE hcpl;
32 struct Effect {
33 IDirectInputEffect *effect;
34 DIEFFECT params;
35 DIEFFECTINFOW info;
38 struct Joystick {
39 IDirectInputDevice8W *device;
40 DIDEVICEINSTANCEW instance;
41 int num_buttons;
42 int num_axes;
43 BOOL forcefeedback;
44 BOOL is_xinput;
45 BOOL has_override;
46 int num_effects;
47 int cur_effect;
48 int chosen_effect;
49 struct Effect *effects;
52 #define TEST_MAX_BUTTONS 32
53 #define TEST_MAX_AXES 4
55 struct Graphics {
56 HWND hwnd;
57 HWND buttons[TEST_MAX_BUTTONS];
58 HWND axes[TEST_MAX_AXES];
59 HWND ff_axis;
62 struct JoystickData {
63 IDirectInput8W *di;
64 struct Joystick *joysticks;
65 int num_joysticks;
66 int num_ff;
67 int cur_joystick;
68 int chosen_joystick;
69 struct Graphics graphics;
70 BOOL stop;
73 #define NUM_PROPERTY_PAGES 3
75 /* strings */
76 #define IDS_CPL_NAME 1
77 #define IDS_CPL_INFO 2
79 /* dialogs */
80 #define IDC_STATIC -1
82 #define IDD_LIST 1000
83 #define IDD_TEST 1001
84 #define IDD_FORCEFEEDBACK 1002
86 #define IDC_JOYSTICKLIST 2000
87 #define IDC_DISABLEDLIST 2001
88 #define IDC_XINPUTLIST 2002
89 #define IDC_BUTTONDISABLE 2010
90 #define IDC_BUTTONENABLE 2011
91 #define IDC_BUTTONRESET 2012
92 #define IDC_BUTTONOVERRIDE 2013
94 #define IDC_TESTSELECTCOMBO 2100
95 #define IDC_TESTGROUPXY 2101
96 #define IDC_TESTGROUPRXRY 2102
97 #define IDC_TESTGROUPZRZ 2103
98 #define IDC_TESTGROUPPOV 2104
100 #define IDC_FFSELECTCOMBO 2200
101 #define IDC_FFEFFECTLIST 2201
103 #define ICO_MAIN 100
105 /* constants */
106 #define TEST_POLL_TIME 100
108 #define TEST_BUTTON_COL_MAX 8
109 #define TEST_BUTTON_X 8
110 #define TEST_BUTTON_Y 122
111 #define TEST_NEXT_BUTTON_X 30
112 #define TEST_NEXT_BUTTON_Y 25
113 #define TEST_BUTTON_SIZE_X 20
114 #define TEST_BUTTON_SIZE_Y 18
116 #define TEST_AXIS_X 43
117 #define TEST_AXIS_Y 60
118 #define TEST_NEXT_AXIS_X 77
119 #define TEST_AXIS_SIZE_X 3
120 #define TEST_AXIS_SIZE_Y 3
121 #define TEST_AXIS_MIN -25
122 #define TEST_AXIS_MAX 25
124 #define FF_AXIS_X 248
125 #define FF_AXIS_Y 60
126 #define FF_AXIS_SIZE_X 3
127 #define FF_AXIS_SIZE_Y 3
129 #define FF_PLAY_TIME 2*DI_SECONDS
130 #define FF_PERIOD_TIME FF_PLAY_TIME/4
132 #endif