PEXCopyElements(3) — Subroutines
Name
PEXCopyElements - Copy Elements
Synopsis
void PEXCopyElements(Display ∗display, PEXStructure src_structure, int src_whence1, long src_offset1, int src_whence2, long src_offset2, PEXStructure dst_structure, int dst_whence, long dst_offset)
Arguments
displayA pointer to a display structure returned by a successful XOpenDisplay call.
src_structureThe resource identifier of the source structure.
src_whence1A value specifying, with src_offset1, the first limit of the range of elements to be copied (PEXBeginning, PEXCurrent, PEXEnd).
src_offset1The offset from src_whence1 denoting the first limit of the range of elements to be copied.
src_whence2A value specifying, with src_offset2, the second limit of the range of elements to be copied (PEXBeginning, PEXCurrent, PEXEnd).
src_offset2The offset from src_whence2 denoting the second limit of the range of elements to be copied.
dst_structureThe resource identifier of the destination structure.
dst_whenceA value specifying, with dst_offset, the position at which the elements are inserted into the destination structure (PEXBeginning, PEXCurrent, PEXEnd).
dst_offsetThe offset from dst_whence denoting the position at which the elements are inserted into the destination structure.
Returns
None
Description
This function copies a range of elements from the specified source structure to the specified destination structure.
If a computed offset is less than zero, it is set to zero before obtaining the element information. If a computed offset is greater than the number of elements in the structure, the offset is set to the offset of the last element in the structure.
The source structure and destination structure can be the same. In this case, the copy operation proceeds as though the indicated range were copied to a temporary location and then inserted relative to the destination position.
After the copy operation, the element pointer of the destination structure is updated to point at the last element copied into the destination structure. The editing mode attribute of the destination structure is ignored during this request. The copied elements are always inserted into the destination structure and are never used to replace existing structure elements.
Data Structures
typedef XID PEXStructure;
Errors
BadPEXStructure
The specified structure resource identifier is invalid.
BadValueThe specified value for whence parameter is invalid.
See Also
PEXCreateStructure