PEXCopyElements - Copy Elements (5.0)


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

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

src_structure
The resource identifier of the source structure.

src_whence1
A value specifying, with src_offset1, the first limit of the range of elements to be copied (PEXBeginning, PEXCurrent or PEXEnd).

src_offset1
The offset from src_whence1 denoting the first limit of the range of elements to be copied.

src_whence2
A value specifying, with src_offset2, the second limit of the range of elements to be copied (PEXBeginning, PEXCurrent or PEXEnd).

src_offset2
The offset from src_whence2 denoting the second limit of the range of elements to be copied.

dst_structure
The resource identifier of the destination structure.

dst_whence
A value specifying, with dst_offset, the position at which the elements are inserted into the destination structure (PEXBeginning, PEXCurrent or PEXEnd).

dst_offset
The offset from dst_whence denoting the position at which the elements are inserted into the destination structure.

Returns

None.

Description

Invoke PEXCopyElements to copy a range of elements from src_structure to dst_structure.

If a computed offset is less than zero, then this function sets the offset to zero before obtaining the element information. If a computed offset is greater than the number of elements in the structure, then this function sets the offset to the offset of the last element in the structure. If element zero is specified as the start of the element range to be copied from src_structure, then the implementation ignores element zero and begins the copy operation with the first element.

The same structure can be named as src_structure and dst_ structure. 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, this function updates the element pointer of dst_structure to point at the last element copied into it. The editing mode attribute of dst_structure is ignored during this request. This function always inserts the copied elements into dst_structure and never uses them to replace existing structure elements.

Errors

BadPEXStructure
A specified structure resource identifier is invalid.

BadPEXStructurePermission
Elements in a structure with a permission of PEXStructureWriteOnly cannot be copied to a structure which has permission set to PEXStructureReadWrite. Structure elements also cannot be copied if the source structure or destination structure has the permission set to PEXStructureLocked.

BadValue
A specified value for a whence argument is invalid.

See Also

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