Fixed TOOLBAR_DrawString() to offset button text if infoPtr->himlDef
[wine/gsoc_dplay.git] / include / cdrom.h
blob0de4797cd89e9cc2054e6dd97faf7b6f1aeffa5a
1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
2 /*
3 * Header file for CD-ROM support
5 * Copyright 1994 Martin Ayotte
6 * Copyright 1999 Eric Pouech
7 * Copyright 2000 Andreas Mohr
8 */
10 #ifndef __WINE_CDROM_H__
11 #define __WINE_CDROM_H__
13 #include <stdlib.h>
14 #include <unistd.h>
15 #include "windef.h"
17 #ifdef HAVE_LINUX_CDROM_H
18 # include <linux/cdrom.h>
19 #endif
20 #ifdef HAVE_LINUX_UCDROM_H
21 # include <linux/ucdrom.h>
22 #endif
23 #ifdef HAVE_SYS_CDIO_H
24 # include <sys/cdio.h>
25 #endif
27 typedef struct {
28 int unixdev;
29 #if defined(linux)
30 struct cdrom_subchnl sc;
31 #elif defined(__FreeBSD__) || defined(__NetBSD__)
32 struct cd_sub_channel_info sc;
33 #endif
34 /* those data reflect the cdaudio structure and
35 * don't change while playing
37 UINT16 nTracks;
38 UINT16 nFirstTrack;
39 UINT16 nLastTrack;
40 LPDWORD lpdwTrackLen;
41 LPDWORD lpdwTrackPos;
42 LPBYTE lpbTrackFlags;
43 DWORD dwFirstFrame;
44 DWORD dwLastFrame;
45 /* those data change while playing */
46 int cdaMode;
47 UINT16 nCurTrack;
48 DWORD dwCurFrame;
49 } WINE_CDAUDIO;
51 #define WINE_CDA_DONTKNOW 0x00
52 #define WINE_CDA_NOTREADY 0x01
53 #define WINE_CDA_OPEN 0x02
54 #define WINE_CDA_PLAY 0x03
55 #define WINE_CDA_STOP 0x04
56 #define WINE_CDA_PAUSE 0x05
58 int CDROM_Open(WINE_CDAUDIO* wcda, int drive);
59 int CDROM_GetMediaType(WINE_CDAUDIO* wcda);
60 int CDROM_Close(WINE_CDAUDIO* wcda);
61 int CDROM_Reset(WINE_CDAUDIO* wcda);
62 int CDROM_Audio_Play(WINE_CDAUDIO* wcda, DWORD start, DWORD stop);
63 int CDROM_Audio_Stop(WINE_CDAUDIO* wcda);
64 int CDROM_Audio_Pause(WINE_CDAUDIO* wcda, int pauseOn);
65 int CDROM_Audio_Seek(WINE_CDAUDIO* wcda, DWORD at);
66 int CDROM_SetDoor(WINE_CDAUDIO* wcda, int open);
67 UINT16 CDROM_Audio_GetNumberOfTracks(WINE_CDAUDIO* wcda);
68 BOOL CDROM_Audio_GetTracksInfo(WINE_CDAUDIO* wcda);
69 BOOL CDROM_Audio_GetCDStatus(WINE_CDAUDIO* wcda);
70 DWORD CDROM_Audio_GetSerial(WINE_CDAUDIO* wcda);
71 DWORD CDROM_Data_GetSerial(WINE_CDAUDIO* wcda);
72 DWORD CDROM_GetSerial(int drive);
74 #define CDFRAMES_PERSEC 75
75 #define SECONDS_PERMIN 60
76 #define CDFRAMES_PERMIN ((CDFRAMES_PERSEC) * (SECONDS_PERMIN))
78 #ifndef CDROM_DATA_TRACK
79 #define CDROM_DATA_TRACK 0x04
80 #endif
82 #define CDROM_MSF_MINUTE(msf) ((BYTE)(msf))
83 #define CDROM_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
84 #define CDROM_MSF_FRAME(msf) ((BYTE)((msf)>>16))
86 #define CDROM_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
87 ((WORD)(s)<<8)) | \
88 (((DWORD)(BYTE)(f))<<16)))
90 /* values borrowed from Linux 2.2.x cdrom.h */
91 #define CDS_NO_INFO 0
92 #define CDS_AUDIO 100
94 #endif