blob: ae60486e9ffedf672939450a1476ce9da9d7d7f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include <Xw_Extension.h>
/* ifdef then trace on */
#ifdef TRACE
#define TRACE_GET_COLORMAP_VISUAL
#endif
/*
Xw_TypeOfVisual Xw_get_colormap_visual (acolormap):
XW_EXT_COLORMAP *acolormap
Returns the colormap Visual class ,must be one of :
STATICGRAY,GRAYSCALE,STATICCOLOR,PSEUDOCOLOR,
TRUECOLOR,DIRECTCOLOR
*/
#ifdef XW_PROTOTYPE
Xw_TypeOfVisual Xw_get_colormap_visual (void* acolormap)
#else
Xw_TypeOfVisual Xw_get_colormap_visual (acolormap)
void *acolormap;
#endif /*XW_PROTOTYPE*/
{
XW_EXT_COLORMAP *pcolormap = (XW_EXT_COLORMAP*)acolormap;
if( !Xw_isdefine_colormap(pcolormap) ) {
/*ERROR*Bad EXT_COLORMAP Address*/
Xw_set_error(42,"Xw_get_colormap_visual",pcolormap) ;
return (Xw_TOV_DEFAULT) ;
}
#ifdef TRACE_GET_COLORMAP_VISUAL
if( Xw_get_trace() > 1 ) {
printf (" %d = Xw_get_colormap_visual(%lx)\n",_CCLASS,(long ) pcolormap) ;
}
#endif
return (Xw_TypeOfVisual) _CCLASS ;
}
|