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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#include <Xw_Extension.h>
/* ifdef then trace on */
#ifdef TRACE
#define TRACE_GET_DISPLAY_INFO
#endif
/*
XW_STATUS Xw_get_display_info (adisplay,display,root,colormap,tclass,depth):
XW_EXT_DISPLAY *adisplay Extended Display structure
Aspect_Handle **display Display XID
Aspect_Handle *root Root XID
Aspect_Handle *colormap Default Colormap XID
Xw_TypeOfVisual *tclass Default Visual Class
int *depth Default Depth
Returns the X display attributes of a connexion
returns XW_ERROR if something is wrong
returns XW_SUCCESS else
*/
#ifdef XW_PROTOTYPE
XW_STATUS Xw_get_display_info (void *adisplay,Aspect_Handle **display,Aspect_Handle *root,Aspect_Handle *colormap,Xw_TypeOfVisual *tclass,int *depth)
#else
XW_STATUS Xw_get_display_info (adisplay,display,root,colormap,tclass,depth)
void *adisplay ;
Aspect_Handle **display;
Aspect_Handle *root;
Aspect_Handle *colormap;
Xw_TypeOfVisual *tclass;
int *depth ;
#endif /*XW_PROTOTYPE*/
{
XW_EXT_DISPLAY *pdisplay = (XW_EXT_DISPLAY*)adisplay ;
if( !Xw_isdefine_display(pdisplay) ) {
/*ERROR*Bad EXT_DISPLAY Address*/
Xw_set_error(96,"Xw_get_display_info",pdisplay) ;
return (XW_ERROR) ;
}
*display = (Aspect_Handle*) _DDISPLAY ;
*root = _DROOT ;
*tclass = (Xw_TypeOfVisual) _DCLASS ;
*colormap = _DCOLORMAP ;
*depth = DefaultDepthOfScreen(_DSCREEN) ;
#ifdef TRACE_GET_DISPLAY_INFO
if( Xw_get_trace() > 1 ) {
printf (" Xw_get_display_info(%lx,%lx,%lx,%lx,%d,%d)\n",
(long ) adisplay,(long ) *display,*root,*colormap,*tclass,*depth) ;
}
#endif
return (XW_SUCCESS) ;
}
|