PEXFetchElementsAndSend - Fetch Elements and Send to Display


Synopsis

 
   Status PEXFetchElementsAndSend(
          Display *src_display,
          PEXStructure structure,
          int whence1,
          long offset1,
          int whence2,
          long offset2,
          Display *dst_display,
          XID resource_id,
          PEXOCRequestType req_type
   )
 

Arguments

src_display
A pointer to a display structure returned by a successful XOpenDisplay call.

structure
The resource identifier of the structure.

whence1
A value specifying, with offset1, the first limit of the range of elements to be fetched (PEXBeginning, PEXCurrent or PEXEnd).

offset1
The offset from whence1 denoting the first limit of the range of elements to be fetched.

whence2
A value specifying, with offset2, the second limit of the range of elements to be fetched (PEXBeginning, PEXCurrent or PEXEnd).

offset2
The offset from whence2 denoting the second limit of the range of elements to be fetched.

dst_display
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id
The resource identifier of the renderer or structure.

req_type
The request type for the output commands (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).

Returns

Zero if unsuccessful; non-zero otherwise.

Description

Invoke PEXFetchElementsAndSend to get a range of structure elements from the specified structure. This function is like PEXFetchElements except this function does not return the list of output commands to the application but sends them directly to dst_display.

Invoking this function is similar to invoking PEXFetchElements, and then sending the returned list of output commands by invoking PEXStartOC, PEXCopyBytesToOC and PEXFinishOC.

If either computed offset is less than zero, then it is set to zero before getting the structure elements. If either computed offset is greater than the number of elements in the structure, then it is set to the offset of the last element in the structure. The element pointer attribute of structure is not affected by this command. No information is returned for inquiries on element offset zero.

If the dst_display does not support the same floating-point format as the format PEXlib is using with the src_display, and if PEXlib can not convert to a format supported by the dst_display, then the function returns unsuccessfully.

Sending output commands to a structure which has an editing mode of PEXStructureReplace is not really useful. The behavior is unpredictable unless you use a request type of PEXOCStoreSingle. And, if the request type is PEXOCStoreSingle, each output command simply replaces the previous one sent. Applications should ensure that the structure's editing mode is PEXStructureInsert when sending multiple output commands. If it is intended to replace multiple elements, then the application can delete those elements first, and then insert the new ones.

Errors

BadPEXStructure
A specified structure resource identifier is invalid.

BadPEXStructurePermission
The source structure's permission is PEXStructureLocked or PEXStructureWriteOnly, or the destination structure is PEXStructureLocked.
BadValue
The specified value for a whence or req_type argument is invalid.

See Also

For a list of all Structure functions and related topics, see Structures.