12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFTVendorRelease (display)int XVendorRelease (display)Display *display;displaySpecifies the connection to the X server.Both return a number related to a vendor’s release of the X server.2.2.2. Image Format Functions and MacrosApplications are required to present data to the X server in a format that the server demands. Tohelp simplify applications, most of the work required to convert the data is provided by <strong>Xlib</strong> (seesections 8.7 and 16.8).The XPixmapFormatValues structure provides an interface to the pixmap format informationthat is returned at the time of a connection setup. It contains:typedef struct {int depth;int bits_per_pixel;int scanline_pad;}XPixmapFormatValues;To obtain the pixmap format information for a given display, use XListPixmapFormats.XPixmapFormatValues *XListPixmapFormats (display, count_return)Display *display;int *count_return;displaycount_returnSpecifies the connection to the X server.Returns the number of pixmap formats that are supported by the display.The XListPixmapFormats function returns an array of XPixmapFormatValues structures thatdescribe the types of Z format images supported by the specified display. Ifinsufficient memoryis available, XListPixmapFormats returns NULL. To free the allocated storage for theXPixmapFormatValues structures, use XFree.The following lists the C language macros, their corresponding function equivalents that are forother language bindings, and what data they both return for the specified server and screen.These are often used by toolkits as well as by simple applications.18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!