sync with en/mplayer.1 rev. 30936
[mplayer/glamo.git] / loader / wine / driver.h
blobe10934bc28093cf264044510be01341b503ef116
1 /*
2 * Drivers definitions
3 */
5 #ifndef MPLAYER_DRIVER_H
6 #define MPLAYER_DRIVER_H
8 #include "windef.h"
10 #define MMSYSERR_BASE 0
12 #define MMSYSERR_NOERROR 0 /* no error */
13 #define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
14 #define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
15 #define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
16 #define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
17 #define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
18 #define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
19 #define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
20 #define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
21 #define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
22 #define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
23 #define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
24 #define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */
26 #define DRV_LOAD 0x0001
27 #define DRV_ENABLE 0x0002
28 #define DRV_OPEN 0x0003
29 #define DRV_CLOSE 0x0004
30 #define DRV_DISABLE 0x0005
31 #define DRV_FREE 0x0006
32 #define DRV_CONFIGURE 0x0007
33 #define DRV_QUERYCONFIGURE 0x0008
34 #define DRV_INSTALL 0x0009
35 #define DRV_REMOVE 0x000A
36 #define DRV_EXITSESSION 0x000B
37 #define DRV_EXITAPPLICATION 0x000C
38 #define DRV_POWER 0x000F
40 #define DRV_RESERVED 0x0800
41 #define DRV_USER 0x4000
43 #define DRVCNF_CANCEL 0x0000
44 #define DRVCNF_OK 0x0001
45 #define DRVCNF_RESTART 0x0002
47 #define DRVEA_NORMALEXIT 0x0001
48 #define DRVEA_ABNORMALEXIT 0x0002
50 #define DRV_SUCCESS 0x0001
51 #define DRV_FAILURE 0x0000
53 #define GND_FIRSTINSTANCEONLY 0x00000001
55 #define GND_FORWARD 0x00000000
56 #define GND_REVERSE 0x00000002
58 typedef struct {
59 DWORD dwDCISize;
60 LPCSTR lpszDCISectionName;
61 LPCSTR lpszDCIAliasName;
62 } DRVCONFIGINFO16, *LPDRVCONFIGINFO16;
64 typedef struct {
65 DWORD dwDCISize;
66 LPCWSTR lpszDCISectionName;
67 LPCWSTR lpszDCIAliasName;
68 } DRVCONFIGINFO, *LPDRVCONFIGINFO;
71 /* GetDriverInfo16 references this structure, so this a struct defined
72 * in the Win16 API.
73 * GetDriverInfo has been deprecated in Win32.
75 typedef struct
77 UINT16 length;
78 HDRVR16 hDriver;
79 HINSTANCE16 hModule;
80 CHAR szAliasName[128];
81 } DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
83 LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
84 LPARAM dwParam1, LPARAM dwParam2);
85 LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr,
86 UINT Msg, LPARAM lParam1, LPARAM lParam2);
87 HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName,
88 LPARAM lParam2);
89 HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName,
90 LPARAM lParam2);
91 HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName,
92 LPARAM lParam2);
93 #define OpenDriver WINELIB_NAME_AW(OpenDriver)
94 LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
95 LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
96 LRESULT WINAPI SendDriverMessage16( HDRVR16 hDriver, UINT16 message,
97 LPARAM lParam1, LPARAM lParam2 );
98 LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message,
99 LPARAM lParam1, LPARAM lParam2 );
100 HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver);
101 HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
103 DWORD WINAPI GetDriverFlags( HDRVR hDriver );
104 /* this call (GetDriverFlags) is not documented, nor the flags returned.
105 * here are Wine only definitions
107 #define WINE_GDF_EXIST 0x80000000
108 #define WINE_GDF_16BIT 0x10000000
110 #endif /* MPLAYER_DRIVER_H */