Added flag and notification definitions for ComboBoxEx.
[wine.git] / include / cdrom.h
blobd8ba48d9a8bab5855e20bed6c50655d2e4ff4e0d
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"
16 #include "wine/windef16.h"
18 #ifdef HAVE_LINUX_CDROM_H
19 # include <linux/cdrom.h>
20 #endif
21 #ifdef HAVE_LINUX_UCDROM_H
22 # include <linux/ucdrom.h>
23 #endif
24 #ifdef HAVE_SYS_CDIO_H
25 # include <sys/cdio.h>
26 #endif
28 typedef struct {
29 int unixdev;
30 #if defined(linux)
31 struct cdrom_subchnl sc;
32 #elif defined(__FreeBSD__) || defined(__NetBSD__)
33 struct cd_sub_channel_info sc;
34 #endif
35 /* those data reflect the cdaudio structure and
36 * don't change while playing
38 UINT16 nTracks;
39 UINT16 nFirstTrack;
40 UINT16 nLastTrack;
41 LPDWORD lpdwTrackLen;
42 LPDWORD lpdwTrackPos;
43 LPBYTE lpbTrackFlags;
44 DWORD dwFirstFrame;
45 DWORD dwLastFrame;
46 /* those data change while playing */
47 int cdaMode;
48 UINT16 nCurTrack;
49 DWORD dwCurFrame;
50 } WINE_CDAUDIO;
52 #define WINE_CDA_DONTKNOW 0x00
53 #define WINE_CDA_NOTREADY 0x01
54 #define WINE_CDA_OPEN 0x02
55 #define WINE_CDA_PLAY 0x03
56 #define WINE_CDA_STOP 0x04
57 #define WINE_CDA_PAUSE 0x05
59 int CDROM_Open(WINE_CDAUDIO* wcda, int drive);
60 int CDROM_GetMediaType(WINE_CDAUDIO* wcda);
61 int CDROM_Close(WINE_CDAUDIO* wcda);
62 int CDROM_Reset(WINE_CDAUDIO* wcda);
63 int CDROM_Audio_Play(WINE_CDAUDIO* wcda, DWORD start, DWORD stop);
64 int CDROM_Audio_Stop(WINE_CDAUDIO* wcda);
65 int CDROM_Audio_Pause(WINE_CDAUDIO* wcda, int pauseOn);
66 int CDROM_Audio_Seek(WINE_CDAUDIO* wcda, DWORD at);
67 int CDROM_SetDoor(WINE_CDAUDIO* wcda, int open);
68 UINT16 CDROM_Audio_GetNumberOfTracks(WINE_CDAUDIO* wcda);
69 BOOL CDROM_Audio_GetTracksInfo(WINE_CDAUDIO* wcda);
70 BOOL CDROM_Audio_GetCDStatus(WINE_CDAUDIO* wcda);
71 WORD CDROM_Data_FindBestVoldesc(int fd);
72 DWORD CDROM_Audio_GetSerial(WINE_CDAUDIO* wcda);
73 DWORD CDROM_Data_GetSerial(WINE_CDAUDIO* wcda);
74 DWORD CDROM_GetSerial(int drive);
75 DWORD CDROM_GetLabel(int drive, char *label);
77 #define CDFRAMES_PERSEC 75
78 #define SECONDS_PERMIN 60
79 #define CDFRAMES_PERMIN ((CDFRAMES_PERSEC) * (SECONDS_PERMIN))
81 #ifndef CDROM_DATA_TRACK
82 #define CDROM_DATA_TRACK 0x04
83 #endif
85 #define CDROM_MSF_MINUTE(msf) ((BYTE)(msf))
86 #define CDROM_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
87 #define CDROM_MSF_FRAME(msf) ((BYTE)((msf)>>16))
89 #define CDROM_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
90 ((WORD)(s)<<8)) | \
91 (((DWORD)(BYTE)(f))<<16)))
93 /* values borrowed from Linux 2.2.x cdrom.h */
94 #define CDS_NO_INFO 0
95 #define CDS_AUDIO 100
97 #endif