1
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996, 2000 The Open Group
3
.\" Permission is hereby granted, free of charge, to any person obtaining
4
.\" a copy of this software and associated documentation files (the
5
.\" "Software"), to deal in the Software without restriction, including
6
.\" without limitation the rights to use, copy, modify, merge, publish,
7
.\" distribute, sublicense, and/or sell copies of the Software, and to
8
.\" permit persons to whom the Software is furnished to do so, subject to
9
.\" the following conditions:
11
.\" The above copyright notice and this permission notice shall be included
12
.\" in all copies or substantial portions of the Software.
14
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
18
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20
.\" OTHER DEALINGS IN THE SOFTWARE.
22
.\" Except as contained in this notice, the name of The Open Group shall
23
.\" not be used in advertising or otherwise to promote the sale, use or
24
.\" other dealings in this Software without prior written authorization
25
.\" from The Open Group.
27
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
28
.\" Digital Equipment Corporation
30
.\" Portions Copyright \(co 1990, 1991 by
33
.\" Permission to use, copy, modify and distribute this documentation for
34
.\" any purpose and without fee is hereby granted, provided that the above
35
.\" copyright notice appears in all copies and that both that copyright notice
36
.\" and this permission notice appear in all copies, and that the names of
37
.\" Digital and Tektronix not be used in in advertising or publicity pertaining
38
.\" to this documentation without specific, written prior permission.
39
.\" Digital and Tektronix makes no representations about the suitability
40
.\" of this documentation for any purpose.
41
.\" It is provided ``as is'' without express or implied warranty.
47
\s+1\fBChapter 2\fP\s-1
49
\s+1\fBDisplay Functions\fP\s-1
59
Chapter 2: Display Functions
61
Before your program can use a display, you must establish a connection
63
Once you have established a connection,
64
you then can use the Xlib macros and functions discussed in this chapter
65
to return information about the display.
66
This chapter discusses how to:
68
Open (connect to) the display
70
Obtain information about the display, image formats, or screens
76
Free client-created data
78
Close (disconnect from) a display
80
Use X Server connection close operations
84
Use internal connections
88
\*(SN Opening the Display
91
To open a connection to the X server that controls a display, use
93
.IN "XOpenDisplay" "" "@DEF@"
97
Display *XOpenDisplay\^(\^\fIdisplay_name\fP\^)
99
char *\fIdisplay_name\fP\^;
101
.IP \fIdisplay_name\fP 1i
102
Specifies the hardware display name, which determines the display
103
and communications domain to be used.
104
On a POSIX-conformant system, if the display_name is NULL,
105
it defaults to the value of the DISPLAY environment variable.
106
.IN "Environment" "DISPLAY"
109
The encoding and interpretation of the display name are
110
implementation-dependent.
111
Strings in the Host Portable Character Encoding are supported;
112
support for other characters is implementation-dependent.
113
On POSIX-conformant systems,
114
the display name or DISPLAY environment variable can be a string in the format:
120
\fIprotocol\fP\^/\^\fIhostname\fP\^:\^\fInumber\fP\^.\^\fIscreen_number\fP
122
.IP \fIprotocol\fP 1i
123
Specifies a protocol family or an alias for a protocol family. Supported
124
protocol families are implementation dependent. The protocol entry is
125
optional. If protocol is not specified, the / separating protocol and
126
hostname must also not be specified.
127
.IP \fIhostname\fP 1i
128
Specifies the name of the host machine on which the display is physically
130
You follow the hostname with either a single colon (:) or a double colon (::).
132
Specifies the number of the display server on that host machine.
133
You may optionally follow this display number with a period (.).
134
A single CPU can have more than one display.
135
Multiple displays are usually numbered starting with zero.
137
.IP \fIscreen_number\fP 1i
138
Specifies the screen to be used on that server.
139
Multiple screens can be controlled by a single X server.
140
The screen_number sets an internal variable that can be accessed by
145
function if you are using languages other than C (see section 2.2.1).
148
For example, the following would specify screen 1 of display 0 on the
149
machine named ``dual-headed'':
159
structure that serves as the
160
connection to the X server and that contains all the information
163
connects your application to the X server through TCP
164
or DECnet communications protocols,
165
or through some local inter-process communication protocol.
167
.IN "Protocol" "DECnet"
168
If the protocol is specified as "tcp", "inet", or "inet6", or
169
if no protocol is specified and the hostname is a host machine name and a single colon (:)
170
separates the hostname and display number,
172
connects using TCP streams. (If the protocol is specified as "inet", TCP over
173
IPv4 is used. If the protocol is specified as "inet6", TCP over IPv6 is used.
174
Otherwise, the implementation determines which IP version is used.)
175
If the hostname and protocol are both not specified,
176
Xlib uses whatever it believes is the fastest transport.
177
If the hostname is a host machine name and a double colon (::)
178
separates the hostname and display number,
180
connects using DECnet.
181
A single X server can support any or all of these transport mechanisms
183
A particular Xlib implementation can support many more of these transport
189
returns a pointer to a
196
does not succeed, it returns NULL.
197
After a successful call to
199
all of the screens in the display can be used by the client.
200
The screen number specified in the display_name argument is returned
206
You can access elements of the
210
structures only by using the information macros or functions.
211
For information about using macros and functions to obtain information from
217
X servers may implement various types of access control mechanisms
220
Obtaining Information about the Display, Image Formats, or Screens
222
\*(SN Obtaining Information about the Display, Image Formats, or Screens
225
The Xlib library provides a number of useful macros
226
and corresponding functions that return data from the
229
The macros are used for C programming,
230
and their corresponding function equivalents are for other language bindings.
231
This section discusses the:
235
Image format functions and macros
237
Screen information macros
239
.IN "Display" "data structure"
240
All other members of the
242
structure (that is, those for which no macros are defined) are private to Xlib
243
and must not be used.
244
Applications must never directly modify or inspect these private members of the
253
.PN XDisplayWidthMM ,
256
functions in the next sections are misnamed.
257
These functions really should be named Screen\fIwhatever\fP
258
and XScreen\fIwhatever\fP, not Display\fIwhatever\fP or XDisplay\fIwhatever\fP.
259
Our apologies for the resulting confusion.
267
Applications should not directly modify any part of the
272
The members should be considered read-only,
273
although they may change as the result of other operations on the display.
275
The following lists the C language macros,
276
their corresponding function equivalents that are for other language bindings,
277
and what data both can return.
284
unsigned long XAllPlanes(\^)
288
.IN "AllPlanes" "" "@DEF@"
289
.IN "XAllPlanes" "" "@DEF@"
290
Both return a value with all bits set to 1 suitable for use in a plane argument to
298
can be used in implementing a monochrome application.
299
These pixel values are for permanently allocated entries in the default
301
The actual RGB (red, green, and blue) values are settable on some screens
302
and, in any case, may not actually be black or white.
303
The names are intended to convey the expected relative intensity of the colors.
306
BlackPixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
308
unsigned long XBlackPixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
310
Display *\fIdisplay\fP\^;
312
int \fIscreen_number\fP\^;
315
Specifies the connection to the X server.
316
.IP \fIscreen_number\fP 1i
317
Specifies the appropriate screen number on the host server.
320
.IN "BlackPixel" "" "@DEF@"
321
.IN "XBlackPixel" "" "@DEF@"
322
Both return the black pixel value for the specified screen.
327
WhitePixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
329
unsigned long XWhitePixel\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
331
Display *\fIdisplay\fP\^;
333
int \fIscreen_number\fP\^;
336
Specifies the connection to the X server.
337
.IP \fIscreen_number\fP 1i
338
Specifies the appropriate screen number on the host server.
341
.IN "WhitePixel" "" "@DEF@"
342
.IN "XWhitePixel" "" "@DEF@"
343
Both return the white pixel value for the specified screen.
348
ConnectionNumber\^(\^\fIdisplay\fP\^)
350
int XConnectionNumber\^(\^\fIdisplay\fP\^)
352
Display *\fIdisplay\fP\^;
355
Specifies the connection to the X server.
358
.IN "ConnectionNumber" "" "@DEF@"
359
.IN "XConnectionNumber" "" "@DEF@"
360
Both return a connection number for the specified display.
361
On a POSIX-conformant system,
362
this is the file descriptor of the connection.
367
DefaultColormap\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
369
Colormap XDefaultColormap\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
371
Display *\fIdisplay\fP\^;
373
int \fIscreen_number\fP\^;
376
Specifies the connection to the X server.
377
.IP \fIscreen_number\fP 1i
378
Specifies the appropriate screen number on the host server.
381
.IN "DefaultColormap" "" "@DEF@"
382
.IN "XDefaultColormap" "" "@DEF@"
383
Both return the default colormap ID for allocation on the specified screen.
384
Most routine allocations of color should be made out of this colormap.
389
DefaultDepth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
391
int XDefaultDepth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
393
Display *\fIdisplay\fP\^;
395
int \fIscreen_number\fP\^;
398
Specifies the connection to the X server.
399
.IP \fIscreen_number\fP 1i
400
Specifies the appropriate screen number on the host server.
403
.IN "DefaultDepth" "" "@DEF@"
404
.IN "XDefaultDepth" "" "@DEF@"
405
Both return the depth (number of planes) of the default root window for the
407
Other depths may also be supported on this screen (see
408
.PN XMatchVisualInfo ).
411
.IN "XListDepths" "" "@DEF@"
412
To determine the number of depths that are available on a given screen, use
416
int *XListDepths\^(\^\fIdisplay\fP, \fIscreen_number\fP, \fIcount_return\fP\^)
418
Display *\fIdisplay\fP;
420
int \fIscreen_number\fP;
422
int *\fIcount_return\fP;
425
Specifies the connection to the X server.
426
.IP \fIscreen_number\fP 1i
427
Specifies the appropriate screen number on the host server.
429
.IP \fIcount_return\fP 1i
430
Returns the number of \*(Cn.
435
function returns the array of depths
436
that are available on the specified screen.
437
If the specified screen_number is valid and sufficient memory for the array
440
sets count_return to the number of available depths.
441
Otherwise, it does not set count_return and returns NULL.
442
To release the memory allocated for the array of depths, use
448
DefaultGC\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
450
GC XDefaultGC\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
452
Display *\fIdisplay\fP\^;
454
int \fIscreen_number\fP\^;
457
Specifies the connection to the X server.
458
.IP \fIscreen_number\fP 1i
459
Specifies the appropriate screen number on the host server.
462
.IN "DefaultGC" "" "@DEF@"
463
.IN "XDefaultGC" "" "@DEF@"
464
Both return the default graphics context for the root window of the
466
This GC is created for the convenience of simple applications
467
and contains the default GC components with the foreground and
468
background pixel values initialized to the black and white
469
pixels for the screen, respectively.
470
You can modify its contents freely because it is not used in any Xlib
472
This GC should never be freed.
477
DefaultRootWindow\^(\^\fIdisplay\fP\^)
479
Window XDefaultRootWindow\^(\^\fIdisplay\fP\^)
481
Display *\fIdisplay\fP\^;
484
Specifies the connection to the X server.
487
.IN "DefaultRootWindow" "" "@DEF@"
488
.IN "XDefaultRootWindow" "" "@DEF@"
489
Both return the root window for the default screen.
494
DefaultScreenOfDisplay\^(\^\fIdisplay\fP\^)
496
Screen *XDefaultScreenOfDisplay\^(\^\fIdisplay\fP\^)
498
Display *\fIdisplay\fP\^;
501
Specifies the connection to the X server.
504
.IN "DefaultScreenOfDisplay" "" "@DEF@"
505
.IN "XDefaultScreenOfDisplay" "" "@DEF@"
506
Both return a pointer to the default screen.
511
ScreenOfDisplay\^(\^\fIdisplay\fP, \fIscreen_number\fP\^)
513
Screen *XScreenOfDisplay\^(\^\fIdisplay\fP, \fIscreen_number\fP\^)
515
Display *\fIdisplay\fP\^;
517
int \fIscreen_number\fP\^;
520
Specifies the connection to the X server.
521
.IP \fIscreen_number\fP 1i
522
Specifies the appropriate screen number on the host server.
525
.IN "ScreenOfDisplay" "" "@DEF@"
526
.IN "XScreenOfDisplay" "" "@DEF@"
527
Both return a pointer to the indicated screen.
532
DefaultScreen\^(\^\fIdisplay\fP\^)
534
int XDefaultScreen\^(\^\fIdisplay\fP\^)
536
Display *\fIdisplay\fP\^;
539
Specifies the connection to the X server.
542
.IN "DefaultScreen" "" "@DEF@"
543
.IN "XDefaultScreen" "" "@DEF@"
544
Both return the default screen number referenced by the
547
This macro or function should be used to retrieve the screen number
548
in applications that will use only a single screen.
553
DefaultVisual\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
555
Visual *XDefaultVisual\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
557
Display *\fIdisplay\fP\^;
559
int \fIscreen_number\fP\^;
562
Specifies the connection to the X server.
563
.IP \fIscreen_number\fP 1i
564
Specifies the appropriate screen number on the host server.
567
.IN "DefaultVisual" "" "@DEF@"
568
.IN "XDefaultVisual" "" "@DEF@"
569
Both return the default visual type for the specified screen.
570
For further information about visual types,
576
DisplayCells\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
578
int XDisplayCells\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
580
Display *\fIdisplay\fP\^;
582
int \fIscreen_number\fP\^;
585
Specifies the connection to the X server.
586
.IP \fIscreen_number\fP 1i
587
Specifies the appropriate screen number on the host server.
590
.IN "DisplayCells" "" "@DEF@"
591
.IN "XDisplayCells" "" "@DEF@"
592
Both return the number of entries in the default colormap.
597
DisplayPlanes\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
599
int XDisplayPlanes\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
601
Display *\fIdisplay\fP\^;
603
int \fIscreen_number\fP\^;
606
Specifies the connection to the X server.
607
.IP \fIscreen_number\fP 1i
608
Specifies the appropriate screen number on the host server.
611
.IN "DisplayPlanes" "" "@DEF@"
612
.IN "XDisplayPlanes" "" "@DEF@"
613
Both return the depth of the root window of the specified screen.
614
For an explanation of depth,
620
DisplayString\^(\^\fIdisplay\fP\^)
622
char *XDisplayString\^(\^\fIdisplay\fP\^)
624
Display *\fIdisplay\fP\^;
627
Specifies the connection to the X server.
630
.IN "DisplayString" "" "@DEF@"
631
.IN "XDisplayString" "" "@DEF@"
632
Both return the string that was passed to
634
when the current display was opened.
635
On POSIX-conformant systems,
636
if the passed string was NULL, these return the value of
637
the DISPLAY environment variable when the current display was opened.
638
.IN "POSIX System Call" "fork"
639
These are useful to applications that invoke the
641
system call and want to open a new connection to the same display from the
642
child process as well as for printing error messages.
647
long XExtendedMaxRequestSize(\^\fIdisplay\fP\^)
648
Display *\fIdisplay\fP\^;
651
Specifies the connection to the X server.
654
.IN "XExtendedMaxRequestSize" "" "@DEF@"
656
.PN XExtendedMaxRequestSize
657
function returns zero if the specified display does not support an
658
extended-length protocol encoding; otherwise,
659
it returns the maximum request size (in 4-byte units) supported
660
by the server using the extended-length encoding.
665
.PN XChangeProperty ,
666
.PN XSetClipRectangles ,
669
will use the extended-length encoding as necessary, if supported
670
by the server. Use of the extended-length encoding in other Xlib
671
functions (for example,
673
.PN XDrawRectangles ,
676
.PN XFillRectangles ,
678
is permitted but not required; an Xlib implementation may choose to
679
split the data across multiple smaller requests instead.
684
long XMaxRequestSize(\^\fIdisplay\fP\^)
685
Display *\fIdisplay\fP\^;
688
Specifies the connection to the X server.
691
.IN "XMaxRequestSize" "" "@DEF@"
694
function returns the maximum request size (in 4-byte units) supported
695
by the server without using an extended-length protocol encoding.
696
Single protocol requests to the server can be no larger than this size
697
unless an extended-length protocol encoding is supported by the server.
698
The protocol guarantees the size to be no smaller than 4096 units
700
Xlib automatically breaks data up into multiple protocol requests
701
as necessary for the following functions:
703
.PN XDrawRectangles ,
706
.PN XFillRectangles ,
713
LastKnownRequestProcessed\^(\^\fIdisplay\fP\^)
715
unsigned long XLastKnownRequestProcessed\^(\^\fIdisplay\fP\^)
717
Display *\fIdisplay\fP\^;
720
Specifies the connection to the X server.
723
.IN "LastKnownRequestProcessed" "" "@DEF@"
724
.IN "XLastKnownRequestProcessed" "" "@DEF@"
725
Both extract the full serial number of the last request known by Xlib
726
to have been processed by the X server.
727
Xlib automatically sets this number when replies, events, and errors
733
NextRequest\^(\^\fIdisplay\fP\^)
735
unsigned long XNextRequest\^(\^\fIdisplay\fP\^)
737
Display *\fIdisplay\fP\^;
740
Specifies the connection to the X server.
743
.IN "NextRequest" "" "@DEF@"
744
.IN "XNextRequest" "" "@DEF@"
745
Both extract the full serial number that is to be used for the next
747
Serial numbers are maintained separately for each display connection.
752
ProtocolVersion\^(\^\fIdisplay\fP\^)
754
int XProtocolVersion\^(\^\fIdisplay\fP\^)
756
Display *\fIdisplay\fP\^;
759
Specifies the connection to the X server.
762
.IN "ProtocolVersion" "" "@DEF@"
763
.IN "XProtocolVersion" "" "@DEF@"
764
Both return the major version number (11) of the X protocol associated with
765
the connected display.
770
ProtocolRevision\^(\^\fIdisplay\fP\^)
772
int XProtocolRevision\^(\^\fIdisplay\fP\^)
774
Display *\fIdisplay\fP\^;
777
Specifies the connection to the X server.
780
.IN "ProtocolRevision" "" "@DEF@"
781
.IN "XProtocolRevision" "" "@DEF@"
782
Both return the minor protocol revision number of the X server.
787
QLength\^(\^\fIdisplay\fP\^)
789
int XQLength\^(\^\fIdisplay\fP\^)
791
Display *\fIdisplay\fP\^;
794
Specifies the connection to the X server.
797
.IN "QLength" "" "@DEF@"
798
.IN "XQLength" "" "@DEF@"
799
Both return the length of the event queue for the connected display.
800
Note that there may be more events that have not been read into
807
RootWindow\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
809
Window XRootWindow\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
811
Display *\fIdisplay\fP\^;
813
int \fIscreen_number\fP\^;
816
Specifies the connection to the X server.
817
.IP \fIscreen_number\fP 1i
818
Specifies the appropriate screen number on the host server.
821
.IN "Window" "RootWindow"
822
.IN "RootWindow" "" "@DEF@"
823
.IN "Window" "XRootWindow"
824
.IN "XRootWindow" "" "@DEF@"
825
Both return the root window.
826
These are useful with functions that need a drawable of a particular screen
827
and for creating top-level windows.
832
ScreenCount\^(\^\fIdisplay\fP\^)
834
int XScreenCount\^(\^\fIdisplay\fP\^)
836
Display *\fIdisplay\fP\^;
839
Specifies the connection to the X server.
842
.IN "ScreenCount" "" "@DEF@"
843
.IN "XScreenCount" "" "@DEF@"
844
Both return the number of available screens.
849
ServerVendor\^(\^\fIdisplay\fP\^)
851
char *XServerVendor\^(\^\fIdisplay\fP\^)
853
Display *\fIdisplay\fP\^;
856
Specifies the connection to the X server.
859
.IN "ServerVendor" "" "@DEF@"
860
.IN "XServerVendor" "" "@DEF@"
861
Both return a pointer to a null-terminated string that provides
862
some identification of the owner of the X server implementation.
863
If the data returned by the server is in the Latin Portable Character Encoding,
864
then the string is in the Host Portable Character Encoding.
865
Otherwise, the contents of the string are implementation-dependent.
870
VendorRelease\^(\^\fIdisplay\fP\^)
872
int XVendorRelease\^(\^\fIdisplay\fP\^)
874
Display *\fIdisplay\fP\^;
877
Specifies the connection to the X server.
880
.IN "VendorRelease" "" "@DEF@"
881
.IN "XVendorRelease" "" "@DEF@"
882
Both return a number related to a vendor's release of the X server.
884
Image Format Functions and Macros
886
\*(SN Image Format Functions and Macros
889
Applications are required to present data to the X server
890
in a format that the server demands.
891
To help simplify applications,
892
most of the work required to convert the data is provided by Xlib
893
(see sections 8.7 and 16.8).
896
.PN XPixmapFormatValues
897
structure provides an interface to the pixmap format information
898
that is returned at the time of a connection setup.
909
} XPixmapFormatValues;
914
To obtain the pixmap format information for a given display, use
915
.PN XListPixmapFormats .
916
.IN "XListPixmapFormats" "" "@DEF@"
919
XPixmapFormatValues *XListPixmapFormats\^(\^\fIdisplay\fP, \fIcount_return\fP\^)
921
Display *\fIdisplay\fP\^;
923
int *\fIcount_return\fP\^;
926
Specifies the connection to the X server.
927
.ds Cn pixmap formats that are supported by the display
928
.IP \fIcount_return\fP 1i
929
Returns the number of \*(Cn.
933
.PN XListPixmapFormats
934
function returns an array of
935
.PN XPixmapFormatValues
936
structures that describe the types of Z format images supported
937
by the specified display.
938
If insufficient memory is available,
939
.PN XListPixmapFormats
941
To free the allocated storage for the
942
.PN XPixmapFormatValues
946
The following lists the C language macros,
947
their corresponding function equivalents that are for other language bindings,
948
and what data they both return for the specified server and screen.
949
These are often used by toolkits as well as by simple applications.
954
ImageByteOrder\^(\^\fIdisplay\fP\^)
956
int XImageByteOrder\^(\^\fIdisplay\fP\^)
958
Display *\fIdisplay\fP\^;
961
Specifies the connection to the X server.
964
.IN "ImageByteOrder" "" "@DEF@"
965
.IN "XImageByteOrder" "" "@DEF@"
966
Both specify the required byte order for images for each scanline unit in
967
XY format (bitmap) or for each pixel value in
969
The macro or function can return either
977
BitmapUnit\^(\^\fIdisplay\fP\^)
979
int XBitmapUnit\^(\^\fIdisplay\fP\^)
981
Display *\fIdisplay\fP\^;
984
Specifies the connection to the X server.
987
.IN "BitmapUnit" "" "@DEF@"
988
.IN "XBitmapUnit" "" "@DEF@"
989
Both return the size of a bitmap's scanline unit in bits.
990
The scanline is calculated in multiples of this value.
995
BitmapBitOrder\^(\^\fIdisplay\fP\^)
997
int XBitmapBitOrder\^(\^\fIdisplay\fP\^)
999
Display *\fIdisplay\fP\^;
1001
.IP \fIdisplay\fP 1i
1002
Specifies the connection to the X server.
1005
.IN "BitmapBitOrder" "" "@DEF@"
1006
.IN "XBitmapBitOrder" "" "@DEF@"
1007
Within each bitmap unit, the left-most bit in the bitmap as displayed
1008
on the screen is either the least significant or most significant bit in the
1010
This macro or function can return
1018
BitmapPad\^(\^\fIdisplay\fP\^)
1020
int XBitmapPad\^(\^\fIdisplay\fP\^)
1022
Display *\fIdisplay\fP\^;
1024
.IP \fIdisplay\fP 1i
1025
Specifies the connection to the X server.
1028
.IN "BitmapPad" "" "@DEF@"
1029
.IN "XBitmapPad" "" "@DEF@"
1030
Each scanline must be padded to a multiple of bits returned
1031
by this macro or function.
1036
DisplayHeight\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1038
int XDisplayHeight\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1040
Display *\fIdisplay\fP\^;
1042
int \fIscreen_number\fP\^;
1044
.IP \fIdisplay\fP 1i
1045
Specifies the connection to the X server.
1046
.IP \fIscreen_number\fP 1i
1047
Specifies the appropriate screen number on the host server.
1050
.IN "DisplayHeight" "" "@DEF@"
1051
.IN "XDisplayHeight" "" "@DEF@"
1052
Both return an integer that describes the height of the screen
1058
DisplayHeightMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1060
int XDisplayHeightMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1062
Display *\fIdisplay\fP\^;
1064
int \fIscreen_number\fP\^;
1066
.IP \fIdisplay\fP 1i
1067
Specifies the connection to the X server.
1068
.IP \fIscreen_number\fP 1i
1069
Specifies the appropriate screen number on the host server.
1072
.IN "DisplayHeightMM" "" "@DEF@"
1073
.IN "XDisplayHeightMM" "" "@DEF@"
1074
Both return the height of the specified screen in millimeters.
1079
DisplayWidth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1081
int XDisplayWidth\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1083
Display *\fIdisplay\fP\^;
1085
int \fIscreen_number\fP\^;
1087
.IP \fIdisplay\fP 1i
1088
Specifies the connection to the X server.
1089
.IP \fIscreen_number\fP 1i
1090
Specifies the appropriate screen number on the host server.
1093
.IN "DisplayWidth" "" "@DEF@"
1094
.IN "XDisplayWidth" "" "@DEF@"
1095
Both return the width of the screen in pixels.
1100
DisplayWidthMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1102
int XDisplayWidthMM\^(\^\fIdisplay\fP\^, \^\fIscreen_number\fP\^)
1104
Display *\fIdisplay\fP\^;
1106
int \fIscreen_number\fP\^;
1108
.IP \fIdisplay\fP 1i
1109
Specifies the connection to the X server.
1110
.IP \fIscreen_number\fP 1i
1111
Specifies the appropriate screen number on the host server.
1114
.IN "DisplayWidthMM" "" "@DEF@"
1115
.IN "XDisplayWidthMM" "" "@DEF@"
1116
Both return the width of the specified screen in millimeters.
1118
Screen Information Macros
1120
\*(SN Screen Information Macros
1123
The following lists the C language macros,
1124
their corresponding function equivalents that are for other language bindings,
1125
and what data they both can return.
1126
These macros or functions all take a pointer to the appropriate screen
1132
BlackPixelOfScreen\^(\^\fIscreen\fP\^)
1134
unsigned long XBlackPixelOfScreen\^(\^\fIscreen\fP\^)
1136
Screen *\fIscreen\fP\^;
1139
Specifies the appropriate
1144
.IN "BlackPixelOfScreen" "" "@DEF@"
1145
.IN "XBlackPixelOfScreen" "" "@DEF@"
1146
Both return the black pixel value of the specified screen.
1151
WhitePixelOfScreen\^(\^\fIscreen\fP\^)
1153
unsigned long XWhitePixelOfScreen\^(\^\fIscreen\fP\^)
1155
Screen *\fIscreen\fP\^;
1158
Specifies the appropriate
1163
.IN "WhitePixelOfScreen" "" "@DEF@"
1164
.IN "XWhitePixelOfScreen" "" "@DEF@"
1165
Both return the white pixel value of the specified screen.
1170
CellsOfScreen\^(\^\fIscreen\fP\^)
1172
int XCellsOfScreen\^(\^\fIscreen\fP\^)
1174
Screen *\fIscreen\fP\^;
1177
Specifies the appropriate
1182
.IN "CellsOfScreen" "" "@DEF@"
1183
.IN "XCellsOfScreen" "" "@DEF@"
1184
Both return the number of colormap cells in the default colormap
1185
of the specified screen.
1190
DefaultColormapOfScreen\^(\^\fIscreen\fP\^)
1192
Colormap XDefaultColormapOfScreen\^(\^\fIscreen\fP\^)
1194
Screen *\fIscreen\fP\^;
1197
Specifies the appropriate
1202
.IN "DefaultColormapOfScreen" "" "@DEF@"
1203
.IN "XDefaultColormapOfScreen" "" "@DEF@"
1204
Both return the default colormap of the specified screen.
1209
DefaultDepthOfScreen\^(\^\fIscreen\fP\^)
1211
int XDefaultDepthOfScreen\^(\^\fIscreen\fP\^)
1213
Screen *\fIscreen\fP\^;
1216
Specifies the appropriate
1221
.IN "DefaultDepthOfScreen" "" "@DEF@"
1222
.IN "XDefaultDepthOfScreen" "" "@DEF@"
1223
Both return the depth of the root window.
1228
DefaultGCOfScreen\^(\^\fIscreen\fP\^)
1230
GC XDefaultGCOfScreen\^(\^\fIscreen\fP\^)
1232
Screen *\fIscreen\fP\^;
1235
Specifies the appropriate
1240
.IN "DefaultGCOfScreen" "" "@DEF@"
1241
.IN "XDefaultGCOfScreen" "" "@DEF@"
1242
Both return a default graphics context (GC) of the specified screen,
1243
which has the same depth as the root window of the screen.
1244
The GC must never be freed.
1249
DefaultVisualOfScreen\^(\^\fIscreen\fP\^)
1251
Visual *XDefaultVisualOfScreen\^(\^\fIscreen\fP\^)
1253
Screen *\fIscreen\fP\^;
1256
Specifies the appropriate
1261
.IN "DefaultVisualOfScreen" "" "@DEF@"
1262
.IN "XDefaultVisualOfScreen" "" "@DEF@"
1263
Both return the default visual of the specified screen.
1264
For information on visual types,
1270
DoesBackingStore\^(\^\fIscreen\fP\^)
1272
int XDoesBackingStore\^(\^\fIscreen\fP\^)
1274
Screen *\fIscreen\fP\^;
1277
Specifies the appropriate
1282
.IN "DoesBackingStore" "" "@DEF@"
1283
.IN "XDoesBackingStore" "" "@DEF@"
1284
Both return a value indicating whether the screen supports backing
1286
The value returned can be one of
1291
(see section 3.2.4).
1296
DoesSaveUnders\^(\^\fIscreen\fP\^)
1298
Bool XDoesSaveUnders\^(\^\fIscreen\fP\^)
1300
Screen *\fIscreen\fP\^;
1303
Specifies the appropriate
1308
.IN "DoesSaveUnders" "" "@DEF@"
1309
.IN "XDoesSaveUnders" "" "@DEF@"
1310
Both return a Boolean value indicating whether the
1311
screen supports save unders.
1314
the screen supports save unders.
1317
the screen does not support save unders (see section 3.2.5).
1322
DisplayOfScreen\^(\^\fIscreen\fP\^)
1324
Display *XDisplayOfScreen\^(\^\fIscreen\fP\^)
1326
Screen *\fIscreen\fP\^;
1329
Specifies the appropriate
1334
.IN "DisplayOfScreen" "" "@DEF@"
1335
.IN "XDisplayOfScreen" "" "@DEF@"
1336
Both return the display of the specified screen.
1340
.IN "XScreenNumberOfScreen" "" "@DEF@"
1342
int XScreenNumberOfScreen\^(\^\fIscreen\fP\^)
1344
Screen *\fIscreen\fP\^;
1347
Specifies the appropriate
1353
.PN XScreenNumberOfScreen
1354
function returns the screen index number of the specified screen.
1359
EventMaskOfScreen\^(\^\fIscreen\fP\^)
1361
long XEventMaskOfScreen\^(\^\fIscreen\fP\^)
1363
Screen *\fIscreen\fP\^;
1366
Specifies the appropriate
1371
.IN "EventMaskOfScreen" "" "@DEF@"
1372
.IN "XEventMaskOfScreen" "" "@DEF@"
1373
Both return the event mask of the root window for the specified screen
1374
at connection setup time.
1379
WidthOfScreen\^(\^\fIscreen\fP\^)
1381
int XWidthOfScreen\^(\^\fIscreen\fP\^)
1383
Screen *\fIscreen\fP\^;
1386
Specifies the appropriate
1391
.IN "WidthOfScreen" "" "@DEF@"
1392
.IN "XWidthOfScreen" "" "@DEF@"
1393
Both return the width of the specified screen in pixels.
1398
HeightOfScreen\^(\^\fIscreen\fP\^)
1400
int XHeightOfScreen\^(\^\fIscreen\fP\^)
1402
Screen *\fIscreen\fP\^;
1405
Specifies the appropriate
1410
.IN "HeightOfScreen" "" "@DEF@"
1411
.IN "XHeightOfScreen" "" "@DEF@"
1412
Both return the height of the specified screen in pixels.
1417
WidthMMOfScreen\^(\^\fIscreen\fP\^)
1419
int XWidthMMOfScreen\^(\^\fIscreen\fP\^)
1421
Screen *\fIscreen\fP\^;
1424
Specifies the appropriate
1429
.IN "WidthMMOfScreen" "" "@DEF@"
1430
.IN "XWidthMMOfScreen" "" "@DEF@"
1431
Both return the width of the specified screen in millimeters.
1436
HeightMMOfScreen\^(\^\fIscreen\fP\^)
1438
int XHeightMMOfScreen\^(\^\fIscreen\fP\^)
1440
Screen *\fIscreen\fP\^;
1443
Specifies the appropriate
1448
.IN "HeightMMOfScreen" "" "@DEF@"
1449
.IN "XHeightMMOfScreen" "" "@DEF@"
1450
Both return the height of the specified screen in millimeters.
1455
MaxCmapsOfScreen\^(\^\fIscreen\fP\^)
1457
int XMaxCmapsOfScreen\^(\^\fIscreen\fP\^)
1459
Screen *\fIscreen\fP\^;
1462
Specifies the appropriate
1467
.IN "MaxCmapsOfScreen" "" "@DEF@"
1468
.IN "XMaxCmapsOfScreen" "" "@DEF@"
1469
Both return the maximum number of installed colormaps supported
1470
by the specified screen (see section 9.3).
1475
MinCmapsOfScreen\^(\^\fIscreen\fP\^)
1477
int XMinCmapsOfScreen\^(\^\fIscreen\fP\^)
1479
Screen *\fIscreen\fP\^;
1482
Specifies the appropriate
1487
.IN "MinCmapsOfScreen" "" "@DEF@"
1488
.IN "XMinCmapsOfScreen" "" "@DEF@"
1489
Both return the minimum number of installed colormaps supported
1490
by the specified screen (see section 9.3).
1495
PlanesOfScreen\^(\^\fIscreen\fP\^)
1497
int XPlanesOfScreen\^(\^\fIscreen\fP\^)
1499
Screen *\fIscreen\fP\^;
1502
Specifies the appropriate
1507
.IN "PlanesOfScreen" "" "@DEF@"
1508
.IN "XPlanesOfScreen" "" "@DEF@"
1509
Both return the depth of the root window.
1514
RootWindowOfScreen\^(\^\fIscreen\fP\^)
1516
Window XRootWindowOfScreen\^(\^\fIscreen\fP\^)
1518
Screen *\fIscreen\fP\^;
1521
Specifies the appropriate
1526
.IN "RootWindowOfScreen" "" "@DEF@"
1527
.IN "XRootWindowOfScreen" "" "@DEF@"
1528
Both return the root window of the specified screen.
1530
Generating a NoOperation Protocol Request
1532
\*(SN Generating a NoOperation Protocol Request
1537
protocol request, use
1539
.IN "XNoOp" "" "@DEF@"
1542
XNoOp\^(\^\fIdisplay\fP\^)
1544
Display *\fIdisplay\fP\^;
1546
.IP \fIdisplay\fP 1i
1547
Specifies the connection to the X server.
1554
protocol request to the X server,
1555
thereby exercising the connection.
1557
Freeing Client-Created Data
1559
\*(SN Freeing Client-Created Data
1562
To free in-memory data that was created by an Xlib function, use
1564
.IN "XFree" "" "@DEF@"
1567
XFree\^(\^\fIdata\fP\^)
1572
Specifies the data that is to be freed.
1577
function is a general-purpose Xlib routine that frees the specified data.
1578
You must use it to free any objects that were allocated by Xlib,
1579
unless an alternate function is explicitly specified for the object.
1580
A NULL pointer cannot be passed to this function.
1584
\*(SN Closing the Display
1587
To close a display or disconnect from the X server, use
1589
.IN "XCloseDisplay" "" "@DEF@"
1593
XCloseDisplay\^(\fIdisplay\fP\^)
1595
Display *\fIdisplay\fP\^;
1597
.IP \fIdisplay\fP 1i
1598
Specifies the connection to the X server.
1603
function closes the connection to the X server for the display specified in the
1605
structure and destroys all windows, resource IDs
1613
or other resources that the client has created
1614
on this display, unless the close-down mode of the resource has been changed
1616
.PN XSetCloseDownMode ).
1617
Therefore, these windows, resource IDs, and other resources should never be
1618
referenced again or an error will be generated.
1619
Before exiting, you should call
1621
explicitly so that any pending errors are reported as
1635
Xlib provides a function to permit the resources owned by a client
1636
to survive after the client's connection is closed.
1637
To change a client's close-down mode, use
1638
.PN XSetCloseDownMode .
1639
.IN "XSetCloseDownMode" "" "@DEF@"
1642
XSetCloseDownMode\^(\^\fIdisplay\fP, \fIclose_mode\fP\^)
1644
Display *\fIdisplay\fP\^;
1646
int \fIclose_mode\fP\^;
1648
.IP \fIdisplay\fP 1i
1649
Specifies the connection to the X server.
1650
.IP \fIclose_mode\fP 1i
1651
Specifies the client close-down mode.
1654
.PN RetainPermanent ,
1656
.PN RetainTemporary .
1660
.PN XSetCloseDownMode
1661
defines what will happen to the client's resources at connection close.
1662
A connection starts in
1665
For information on what happens to the client's resources when the
1666
close_mode argument is
1669
.PN RetainTemporary ,
1672
.PN XSetCloseDownMode
1677
Using X Server Connection Close Operations
1679
\*(SN Using X Server Connection Close Operations
1682
When the X server's connection to a client is closed
1683
either by an explicit call to
1685
or by a process that exits, the X server performs the following
1686
automatic operations:
1688
It disowns all selections owned by the client
1690
.PN XSetSelectionOwner ).
1696
if the client has actively grabbed the pointer
1701
if the client has grabbed the server.
1703
It releases all passive grabs made by the client.
1705
It marks all resources (including colormap entries) allocated
1706
by the client either as permanent or temporary,
1707
depending on whether the close-down mode is
1710
.PN RetainTemporary .
1711
However, this does not prevent other client applications from explicitly
1712
destroying the resources (see
1713
.PN XSetCloseDownMode ).
1715
When the close-down mode is
1717
the X server destroys all of a client's resources as follows:
1719
It examines each window in the client's save-set to determine if it is an inferior
1720
(subwindow) of a window created by the client.
1721
(The save-set is a list of other clients' windows
1722
that are referred to as save-set windows.)
1723
If so, the X server reparents the save-set window to the closest ancestor so
1724
that the save-set window is not an inferior of a window created by the client.
1725
The reparenting leaves unchanged the absolute coordinates (with respect to
1726
the root window) of the upper-left outer corner of the save-set
1731
request on the save-set window if the save-set window is unmapped.
1732
The X server does this even if the save-set window was not an inferior of
1733
a window created by the client.
1735
It destroys all windows created by the client.
1737
It performs the appropriate free request on each nonwindow resource created by
1738
the client in the server (for example,
1746
It frees all colors and colormap entries allocated by a client application.
1748
Additional processing occurs when the last connection to the X server closes.
1749
An X server goes through a cycle of having no connections and having some
1751
When the last connection to the X server closes as a result of a connection
1752
closing with the close_mode of
1754
the X server does the following:
1756
It resets its state as if it had just been
1758
The X server begins by destroying all lingering resources from
1759
clients that have terminated in
1765
It deletes all but the predefined atom identifiers.
1767
It deletes all properties on all root windows (see section 4.3).
1769
It resets all device maps and attributes
1770
(for example, key click, bell volume, and acceleration)
1771
as well as the access control list.
1773
It restores the standard root tiles and cursors.
1775
It restores the default font path.
1777
It restores the input focus to state
1780
However, the X server does not reset if you close a connection with a close-down
1784
.PN RetainTemporary .
1786
Using Xlib with Threads
1788
\*(SN Using Xlib with Threads
1791
On systems that have threads, support may be provided to permit
1792
multiple threads to use Xlib concurrently.
1795
To initialize support for concurrent threads, use
1797
.IN "XInitThreads" "" "@DEF@"
1800
Status XInitThreads\^(\|);
1806
function initializes Xlib support for concurrent threads.
1807
This function must be the first Xlib function a
1808
multi-threaded program calls, and it must complete
1809
before any other Xlib call is made.
1810
This function returns a nonzero status if initialization was
1811
successful; otherwise, it returns zero.
1812
On systems that do not support threads, this function always returns zero.
1814
It is only necessary to call this function if multiple threads
1815
might use Xlib concurrently. If all calls to Xlib functions
1816
are protected by some other access mechanism (for example,
1817
a mutual exclusion lock in a toolkit or through explicit client
1818
programming), Xlib thread initialization is not required.
1819
It is recommended that single-threaded programs not call this function.
1823
To lock a display across several Xlib calls, use
1825
.IN "XLockDisplay" "" "@DEF@"
1828
void XLockDisplay\^(\^\fIdisplay\fP\^)
1830
Display *\fIdisplay\fP\^;
1832
.IP \fIdisplay\fP 1i
1833
Specifies the connection to the X server.
1838
function locks out all other threads from using the specified display.
1839
Other threads attempting to use the display will block until
1840
the display is unlocked by this thread.
1843
work correctly; the display will not actually be unlocked until
1845
has been called the same number of times as
1847
This function has no effect unless Xlib was successfully initialized
1852
To unlock a display, use
1853
.PN XUnlockDisplay .
1854
.IN "XUnlockDisplay" "" "@DEF@"
1857
void XUnlockDisplay\^(\^\fIdisplay\fP\^)
1859
Display *\fIdisplay\fP\^;
1861
.IP \fIdisplay\fP 1i
1862
Specifies the connection to the X server.
1867
function allows other threads to use the specified display again.
1868
Any threads that have blocked on the display are allowed to continue.
1869
Nested locking works correctly; if
1871
has been called multiple times by a thread, then
1873
must be called an equal number of times before the display is
1875
This function has no effect unless Xlib was successfully initialized
1879
Using Internal Connections
1881
\*(SN Using Internal Connections
1884
In addition to the connection to the X server, an Xlib implementation
1885
may require connections to other kinds of servers (for example, to
1886
input method servers as described in chapter 13). Toolkits and clients
1887
that use multiple displays, or that use displays in combination with
1888
other inputs, need to obtain these additional connections to correctly
1889
block until input is available and need to process that input
1890
when it is available. Simple clients that use a single display and
1891
block for input in an Xlib event function do not need to use these
1894
To track internal connections for a display, use
1895
.PN XAddConnectionWatch .
1897
.IN "XWatchProc" "" "@DEF@"
1898
.IN "XAddConnectionWatch" "" "@DEF@"
1901
typedef void (*XConnectionWatchProc)\^(\^\fIdisplay\fP, \fIclient_data\fP, \fIfd\fP, \fIopening\fP, \fIwatch_data\fP\^)
1903
Display *\fIdisplay\fP\^;
1905
XPointer \fIclient_data\fP\^;
1909
Bool \fIopening\fP\^;
1911
XPointer *\fIwatch_data\fP\^;
1913
Status XAddConnectionWatch\^(\^\fIdisplay\fP, \fIprocedure\fP\^, \fIclient_data\fP\^)
1915
Display *\fIdisplay\fP\^;
1917
XWatchProc \fIprocedure\fP\^;
1919
XPointer \fIclient_data\fP\^;
1921
.IP \fIdisplay\fP 1i
1922
Specifies the connection to the X server.
1923
.IP \fIprocedure\fP 1i
1924
Specifies the procedure to be called.
1925
.IP \fIclient_data\fP 1i
1926
Specifies the additional client data.
1930
.PN XAddConnectionWatch
1931
function registers a procedure to be called each time Xlib opens or closes an
1932
internal connection for the specified display. The procedure is passed the
1933
display, the specified client_data, the file descriptor for the connection,
1934
a Boolean indicating whether the connection is being opened or closed, and a
1935
pointer to a location for private watch data. If opening is
1937
the procedure can store a pointer to private data in the location pointed
1939
when the procedure is later called for this same connection and opening is
1941
the location pointed to by watch_data will hold this same private data pointer.
1943
This function can be called at any time after a display is opened.
1944
If internal connections already exist, the registered procedure will
1945
immediately be called for each of them, before
1946
.PN XAddConnectionWatch
1948
.PN XAddConnectionWatch
1949
returns a nonzero status if the procedure is successfully registered;
1950
otherwise, it returns zero.
1952
The registered procedure should not call any Xlib functions.
1953
If the procedure directly or indirectly causes the state of internal
1954
connections or watch procedures to change, the result is not defined.
1955
If Xlib has been initialized for threads, the procedure is called with
1956
the display locked and the result of a call by the procedure to any
1957
Xlib function that locks the display is not defined unless the executing
1958
thread has externally locked the display using
1962
To stop tracking internal connections for a display, use
1963
.PN XRemoveConnectionWatch .
1964
.IN "XRemoveConnectionWatch" "" "@DEF@"
1967
Status XRemoveConnectionWatch\^(\^\fIdisplay\fP, \fIprocedure\fP\^, \fIclient_data\fP\^)
1969
Display *\fIdisplay\fP\^;
1971
XWatchProc \fIprocedure\fP\^;
1973
XPointer \fIclient_data\fP\^;
1975
.IP \fIdisplay\fP 1i
1976
Specifies the connection to the X server.
1977
.IP \fIprocedure\fP 1i
1978
Specifies the procedure to be called.
1979
.IP \fIclient_data\fP 1i
1980
Specifies the additional client data.
1984
.PN XRemoveConnectionWatch
1985
function removes a previously registered connection watch procedure.
1986
The client_data must match the client_data used when the procedure
1987
was initially registered.
1991
To process input on an internal connection, use
1992
.PN XProcessInternalConnection .
1993
.IN "XProcessInternalConnection" "" "@DEF@"
1996
void XProcessInternalConnection\^(\^\fIdisplay\fP, \fIfd\fP\^)
1998
Display *\fIdisplay\fP\^;
2002
.IP \fIdisplay\fP 1i
2003
Specifies the connection to the X server.
2005
Specifies the file descriptor.
2009
.PN XProcessInternalConnection
2010
function processes input available on an internal connection.
2011
This function should be called for an internal connection only
2012
after an operating system facility (for example,
2016
has indicated that input is available; otherwise,
2017
the effect is not defined.
2020
To obtain all of the current internal connections for a display, use
2021
.PN XInternalConnectionNumbers .
2022
.IN "XInternalConnectionNumbers" "" "@DEF@"
2025
Status XInternalConnectionNumbers\^(\^\fIdisplay\fP, \fIfd_return\fP\^, \fIcount_return\fP\^)
2027
Display *\fIdisplay\fP\^;
2029
int **\fIfd_return\fP\^;
2031
int *\fIcount_return\fP\^;
2033
.IP \fIdisplay\fP 1i
2034
Specifies the connection to the X server.
2035
.IP \fIfd_return\fP 1i
2036
Returns the file descriptors.
2037
.ds Cn file descriptors
2038
.IP \fIcount_return\fP 1i
2039
Returns the number of \*(Cn.
2043
.PN XInternalConnectionNumbers
2044
function returns a list of the file descriptors for all internal
2045
connections currently open for the specified display.
2046
When the allocated list is no longer needed,
2049
This functions returns a nonzero status if the list is successfully allocated;
2050
otherwise, it returns zero.