webservices: Add support for union types in the writer.
[wine.git] / dlls / winejoystick.drv / joystick.c
blob3e140b91175ae675ba044aad57b1378debdae58b
1 /*
2 * WinMM joystick driver common code
4 * Copyright 1997 Andreas Mohr
5 * Copyright 2000 Wolfgang Schwotzer
6 * Copyright 2002 David Hagood
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "joystick.h"
26 /**************************************************************************
27 * DriverProc (JOYSTICK.@)
29 LRESULT CALLBACK JSTCK_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg, LPARAM dwParam1, LPARAM dwParam2)
31 switch(wMsg) {
32 case DRV_LOAD: return 1;
33 case DRV_FREE: return 1;
34 case DRV_OPEN: return driver_open((LPSTR)dwParam1, dwParam2);
35 case DRV_CLOSE: return driver_close(dwDevID);
36 case DRV_ENABLE: return 1;
37 case DRV_DISABLE: return 1;
38 case DRV_QUERYCONFIGURE: return 1;
39 case DRV_CONFIGURE: MessageBoxA(0, "JoyStick MultiMedia Driver !", "JoyStick Driver", MB_OK); return 1;
40 case DRV_INSTALL: return DRVCNF_RESTART;
41 case DRV_REMOVE: return DRVCNF_RESTART;
43 case JDD_GETNUMDEVS: return 1;
44 case JDD_GETDEVCAPS: return driver_joyGetDevCaps(dwDevID, (LPJOYCAPSW)dwParam1, dwParam2);
45 case JDD_GETPOS: return driver_joyGetPos(dwDevID, (LPJOYINFO)dwParam1);
46 case JDD_SETCALIBRATION:
47 case JDD_CONFIGCHANGED: return JOYERR_NOCANDO;
48 case JDD_GETPOSEX: return driver_joyGetPosEx(dwDevID, (LPJOYINFOEX)dwParam1);
49 default:
50 return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);