comparison src/video/Xext/extensions/StdCmap.h @ 2185:2032348afed1

This code adds support for DirectColor visuals to SDL 1.3. The support uses part of the Xmu library. To ensure that the library is available and to keep people form having to install yet another library I have added the essential parts of Xmu in src/video/extensions/XmuStdCmap and an include file in src/video/extensions. The support makes use of standard X11 mechanisms to create color maps and make sure that an application uses the same color map for each window/visual combination. This should make it possible for gamma support to be implemented based on a single color map per application. Hurm... it looks like "make indent" modified a few extra files. Those are getting committed too.
author Bob Pendleton <bob@pendleton.com>
date Thu, 12 Jul 2007 20:00:50 +0000
parents
children
comparison
equal deleted inserted replaced
2184:8f8516e79a13 2185:2032348afed1
1 /* $Xorg: StdCmap.h,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */
2
3 /*
4
5 Copyright 1988, 1998 The Open Group
6
7 Permission to use, copy, modify, distribute, and sell this software and its
8 documentation for any purpose is hereby granted without fee, provided that
9 the above copyright notice appear in all copies and that both that
10 copyright notice and this permission notice appear in supporting
11 documentation.
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the name of The Open Group shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from The Open Group.
26
27 */
28 /* $XFree86: xc/lib/Xmu/StdCmap.h,v 1.8 2001/01/23 17:38:14 keithp Exp $ */
29
30 /*
31 * The interfaces described by this header file are for miscellaneous utilities
32 * and are not part of the Xlib standard.
33 */
34
35 #ifndef _XMU_STDCMAP_H_
36 #define _XMU_STDCMAP_H_
37
38 #include <X11/Xfuncproto.h>
39 #include "SDL_name.h"
40
41 _XFUNCPROTOBEGIN extern Status XmuAllStandardColormaps(Display * dpy);
42
43 extern Status XmuCreateColormap(Display * dpy, XStandardColormap * colormap);
44
45 extern void XmuDeleteStandardColormap
46 (Display * dpy, int screen, Atom property);
47
48 extern Status XmuGetColormapAllocation
49 (XVisualInfo * vinfo,
50 Atom property,
51 unsigned long *red_max_return,
52 unsigned long *green_max_return, unsigned long *blue_max_return);
53
54 extern Status XmuLookupStandardColormap
55 (Display * dpy,
56 int screen,
57 VisualID visualid,
58 unsigned int depth, Atom property, Bool replace, Bool retain);
59
60 extern XStandardColormap *XmuStandardColormap
61 (Display * dpy,
62 int screen,
63 VisualID visualid,
64 unsigned int depth,
65 Atom property,
66 Colormap cmap,
67 unsigned long red_max, unsigned long green_max, unsigned long blue_max);
68
69 extern Status XmuVisualStandardColormaps
70 (Display * dpy,
71 int screen,
72 VisualID visualid, unsigned int depth, Bool replace, Bool retain);
73
74 extern Bool XmuDistinguishableColors(XColor * colors, int count);
75
76 extern Bool XmuDistinguishablePixels
77 (Display * dpy, Colormap cmap, unsigned long *pixels, int count);
78
79 _XFUNCPROTOEND
80 #endif /* _XMU_STDCMAP_H_ */