PEXFetchElements(3) — Subroutines
Name
PEXFetchElements - Fetch Elements
Synopsis
Status PEXFetchElements(Display ∗display, PEXStructure structure, int whence1, long offset1, int whence2, long offset2, int float_format, unsigned long ∗count_return, unsigned long ∗length_return, char ∗∗ocs_return)
Arguments
displayA pointer to a display structure returned by a successful XOpenDisplay call.
structureThe resource identifier of the structure.
whence1A value specifying, with offset1, the first limit of the range of elements to be fetched (PEXBeginning, PEXCurrent, PEXEnd).
offset1The offset from whence1 denoting the first limit of the range of elements to be fetched.
whence2A value specifying, with offset2, the second limit of the range of elements to be fetched (PEXBeginning, PEXCurrent, PEXEnd).
offset2The offset from whence2 denoting the second limit of the range of elements to be fetched.
float_formatThe floating point format to use when formatting the output commands to be fetched (PEXIEEE_754_32, PEXDEC_F_Floating, PEXIEEE_754_64, PEXDEC_D_Floating).
count_returnReturns the number of output commands returned.
length_return
Returns the length, in bytes, of the output commands fetched.
ocs_returnReturns a pointer to protocol-formatted output commands (structure elements).
Returns
Zero if unsuccessful, non-zero otherwise.
Description
This function fetches a range of structure elements from the specified structure.
If either computed offset is less than zero, it is set to zero before fetching the structure elements. If either computed offset is greater than the number of elements in the structure, it is set to the offset of the last structure element in the structure. The element pointer attribute of structure is not affected by this command. No information will be returned for inquiries on element offset zero.
An null pointer is returned is the requested floating point format is not supported.
Any text or annotation text output commands returned will be formatted as encoded text or encoded annotation text.
PEXlib allocates memory for the return value. XFree should be called to deallocate the memory.
Data Structures
typedef XID PEXStructure;
Errors
BadPEXFloatingPointFormat
The specified floating point format is invalid or unsupported.
BadPEXStructure
The specified structure resource identifier is invalid.
BadValueThe specified value for whence parameter is invalid.
See Also
PEXCreateStructure
PEXDecodeOCs, PEXEncodeOCs, PEXSendOCs