X Property Library Chapter 9
LabWindows/CVI Standard Libraries 9-4 © National Instruments Corporation
not delete it, the property remains there indefinitely. Second, because there is only one root
window, there may be conflicts when multiple applications attempt to access the same properties.
To overcome those disadvantages, LabWindows/CVI provides a hidden window. Before it runs
your program, LabWindows/CVI creates a window that never displays. The X window ID for
this window is available in the X Property Library from the global variable
CVIXHiddenWindow. This window ID is always available to your program for reading and
writing properties. When your program terminates, LabWindows/CVI removes the window and
all of its properties.
Property Callback Functions
You can use the X Property Library to instruct LabWindows/CVI to notify your program
whenever a property (or set of properties) on a window (or set of windows) changes. The
function InstallPropertyCallback registers a function that is called whenever any of the
specified properties changes. The callback function must have the type
PropertyCallbackTypeX as defined in xproplib.h. LabWindows/CVI passes the X
display, window, and property that changed to the callback function. The state parameter of the
callback function will be either NewValueX, if the property value changed, or DeleteX, if the
property was deleted. The function UninstallPropertyCallback disables the callback
function.
Error Codes
PropLibXErrType is the data type of all return values in the X Property Library functions.
PropLibXErrType is an enumerated (enum) type containing descriptive constant names and
numeric values for the errors. PropLibXErrType and its enumerated values are all integers.
All error values are negative numbers.
The following table lists all the enumerated constant names and their corresponding numeric
values. Detailed descriptions of these error types appear in the function descriptions in the
following section.