00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef V_colormap_h
00024 #define V_colormap_h 1
00025
00026
00027 #include <X11/Xlib.h>
00028 #include <X11/Intrinsic.h>
00029
00030
00031 #include <X11/Xfuncproto.h>
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037
00038
00039
00040
00041
00042 typedef struct V_ColormapRec {
00043 Screen *screen;
00044 Atom property;
00045 XVisualInfo vinfo;
00046
00047
00048 XStandardColormap stdcmap;
00049
00050
00051
00052
00053 unsigned long *indcmap;
00054 VBoolean *indcmap_alloced;
00055
00056
00057 int ngrays;
00058 unsigned long *invgmap;
00059 VBoolean *invgmap_alloced;
00060 } *VColormap;
00061
00062
00063
00064
00065
00066
00067 #define VColormapColormap(vc) ((vc)->stdcmap.colormap)
00068 #define VColormapDepth(vc) ((vc)->vinfo.depth)
00069 #define VColormapProperty(vc) ((vc)->property)
00070 #define VColormapVisual(vc) ((vc)->vinfo.visual)
00071
00072
00073
00074
00075
00076
00077 extern VColormap VCreateColormap (
00078 #if NeedFunctionPrototypes
00079 Screen * ,
00080 Atom ,
00081 long ,
00082 XVisualInfo *
00083 #endif
00084 );
00085
00086 extern void VDestroyColormap (
00087 #if NeedFunctionPrototypes
00088 VColormap
00089 #endif
00090 );
00091
00092 extern void VColormapRGBPixel (
00093 #if NeedFunctionPrototypes
00094 VColormap ,
00095 XColor *
00096 #endif
00097 );
00098
00099 extern void VColormapGrayPixel (
00100 #if NeedFunctionPrototypes
00101 VColormap ,
00102 XColor *
00103 #endif
00104 );
00105
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109
00110 #endif