VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/gdipluspixelformats.h@ 85805

Last change on this file since 85805 was 53206, checked in by vboxsync, 10 years ago

Devices/vmsvga: header fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/*
2 * Copyright (C) 2007 Google (Evan Stade)
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef _GDIPLUSPIXELFORMATS_H
29#define _GDIPLUSPIXELFORMATS_H
30
31typedef DWORD ARGB;
32typedef INT PixelFormat;
33
34#define PixelFormatIndexed 0x00010000
35#define PixelFormatGDI 0x00020000
36#define PixelFormatAlpha 0x00040000
37#define PixelFormatPAlpha 0x00080000
38#define PixelFormatExtended 0x00100000
39#define PixelFormatCanonical 0x00200000
40
41#define PixelFormatUndefined 0
42#define PixelFormatDontCare 0
43
44#define PixelFormat1bppIndexed (1 | ( 1 << 8) | PixelFormatIndexed | PixelFormatGDI)
45#define PixelFormat4bppIndexed (2 | ( 4 << 8) | PixelFormatIndexed | PixelFormatGDI)
46#define PixelFormat8bppIndexed (3 | ( 8 << 8) | PixelFormatIndexed | PixelFormatGDI)
47#define PixelFormat16bppGrayScale (4 | (16 << 8) | PixelFormatExtended)
48#define PixelFormat16bppRGB555 (5 | (16 << 8) | PixelFormatGDI)
49#define PixelFormat16bppRGB565 (6 | (16 << 8) | PixelFormatGDI)
50#define PixelFormat16bppARGB1555 (7 | (16 << 8) | PixelFormatAlpha | PixelFormatGDI)
51#define PixelFormat24bppRGB (8 | (24 << 8) | PixelFormatGDI)
52#define PixelFormat32bppRGB (9 | (32 << 8) | PixelFormatGDI)
53#define PixelFormat32bppARGB (10 | (32 << 8) | PixelFormatAlpha | PixelFormatGDI | PixelFormatCanonical)
54#define PixelFormat32bppPARGB (11 | (32 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatGDI)
55#define PixelFormat48bppRGB (12 | (48 << 8) | PixelFormatExtended)
56#define PixelFormat64bppARGB (13 | (64 << 8) | PixelFormatAlpha | PixelFormatCanonical | PixelFormatExtended)
57#define PixelFormat64bppPARGB (14 | (64 << 8) | PixelFormatAlpha | PixelFormatPAlpha | PixelFormatExtended)
58#define PixelFormat32bppCMYK (15 | (32 << 8))
59#define PixelFormatMax 16
60
61static inline BOOL IsIndexedPixelFormat(PixelFormat format)
62{
63 return (format & PixelFormatIndexed) != 0;
64}
65
66static inline BOOL IsAlphaPixelFormat(PixelFormat format)
67{
68 return (format & PixelFormatAlpha) != 0;
69}
70
71static inline BOOL IsCanonicalPixelFormat(PixelFormat format)
72{
73 return (format & PixelFormatCanonical) != 0;
74}
75
76static inline BOOL IsExtendedPixelFormat(PixelFormat format)
77{
78 return (format & PixelFormatExtended) != 0;
79}
80
81static inline UINT GetPixelFormatSize(PixelFormat format)
82{
83 return (format >> 8) & 0xff;
84}
85
86enum PaletteFlags
87{
88 PaletteFlagsHasAlpha = 1,
89 PaletteFlagsGrayScale = 2,
90 PaletteFlagsHalftone = 4
91};
92
93#ifdef __cplusplus
94
95struct ColorPalette
96{
97public:
98 UINT Flags;
99 UINT Count;
100 ARGB Entries[1];
101};
102
103#else /* end of c++ typedefs */
104
105typedef struct ColorPalette
106{
107 UINT Flags;
108 UINT Count;
109 ARGB Entries[1];
110} ColorPalette;
111
112#endif /* end of c typedefs */
113
114#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette