Chapter 9 X Property Library
© National Instruments Corporation 9-7 LabWindows/CVI Standard Libraries

Using the Library Outside of LabWindows/CVI

You can use the LabWindows/CVI X Property Library in applications developed outside of
LabWindows/CVI. By linking your program with the library file libxprop.a in the
misc/lib directory of the LabWindows/CVI installation directory, you can use all the
functions of the X Property Library in your program. You cannot use the libxprop.a library
within LabWindows/CVI. The following two functions are available only outside of
LabWindows/CVI:
• void _InitXPropertyLib(DisplayPtrX cviDisplay, WindowX rootWindow,
WindowX hiddenWindow)
This function sets the global variables CVIXDisplay, CVIXRootWindow,
CVIXHiddenWindow of the X Property Library.
• void HandlePropertyNotifyEvent(EventPtrX event)
This function calls the functions that are installed as property callbacks. You should call this
function whenever you receive an XPropertyNotify event to automatically invoke
callback functions. The event must be a valid XPropertyEvent.
X Property Library Function Reference
This section describes the functions in the LabWindows/CVI X Property Library. The
LabWindows/CVI X Property functions are arranged alphabetically.

ConnectToXDisplay

PropLibXErrType status = ConnectToXDisplay (const char *displayName,
DisplayPtrX *display,
WindowX *rootWindow);
Purpose
Connect to a remote X server.
Use this function to access an X server on a remote computer. This function returns a display
pointer and the root window, which you can use to read and write properties on the root window
of the remote X server.
If you want to communicate only with applications using the same display as your application,
you do not need this function. Instead, use the global variables CVIXDisplay and
CVIXRootWindow, which contain the display and root window of the X server used by
LabWindows/CVI.