riched20: Make richedit control IME aware.
[wine] / dlls / quartz / fourcc.h
1 /*
2  * Common FOURCC
3  *
4  * Copyright 2003 Robert Shearman
5  *
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.
10  *
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.
15  *
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
19  */
20
21 #define FromHex(n)  (((n) >= 'A') ? ((n) + 10 - 'A') : ((n) - '0'))
22 #define StreamFromFOURCC(fcc) ((WORD) ((FromHex(LOBYTE(LOWORD(fcc))) << 4) + (FromHex(HIBYTE(LOWORD(fcc))))))
23 #define TWOCCFromFOURCC(fcc)    HIWORD(fcc)
24
25 #ifndef aviTWOCC
26 #define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
27 #endif
28
29 /* FIXME: endianess? */
30 #define aviFCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch3) << 24 | (DWORD)(BYTE)(ch2) << 16 | (DWORD)(BYTE)(ch1) << 8 | ((DWORD)(BYTE)(ch0)))
31
32 /* four character codes used in AVI files */
33 #define ckidAVI               aviFCC('A','V','I',' ')
34 #define ckidRIFF              aviFCC('R','I','F','F')
35 #define ckidLIST              aviFCC('L','I','S','T')
36 #define ckidJUNK              aviFCC('J','U','N','K')
37 #define ckidINFO              aviFCC('I','N','F','O')
38 #define ckidHEADERLIST        aviFCC('h','d','r','l')
39 #define ckidAVIMOVIE          aviFCC('m','o','v','i')
40 #define ckidSTREAMNAME        aviFCC('s','t','r','n')
41 #define ckidSTREAMHANDLERDATA aviFCC('s','t','r','d')
42 #ifndef ckidMAINAVIHEADER
43 # define ckidMAINAVIHEADER    aviFCC('a','v','i','h')
44 # define ckidODML             aviFCC('o','d','m','l')
45 # define ckidAVIEXTHEADER     aviFCC('d','m','l','h')
46 # define ckidSTREAMLIST       aviFCC('s','t','r','l')
47 # define ckidSTREAMHEADER     aviFCC('s','t','r','h')
48 # define ckidSTREAMFORMAT     aviFCC('s','t','r','f')
49 # define ckidAVIOLDINDEX      aviFCC('i','d','x','1')
50 # define ckidAVISUPERINDEX    aviFCC('i','n','d','x')
51 #endif
52 #ifndef streamtypeVIDEO
53 #define streamtypeVIDEO       aviFCC('v','i','d','s')
54 #define streamtypeAUDIO       aviFCC('a','u','d','s')
55 #define streamtypeMIDI        aviFCC('m','i','d','s')
56 #define streamtypeTEXT        aviFCC('t','x','t','s')
57 #endif
58 #define cktypeDIBbits         aviTWOCC('d','b')
59 #define cktypeDIBcompressed   aviTWOCC('d','c')
60 #define cktypePALchange       aviTWOCC('p','c')
61 #define cktypeWAVEbytes       aviTWOCC('w','b')