Carbon


ControlDataAccessRec

Header: Controls.h

struct ControlDataAccessRec {
    ResType tag; 
    ResType part; 
    Size size; 
    Ptr dataPtr;
};
typedef ControlDataAccessRec ControlDataAccessPtr;

Field descriptions

tag

A constant representing a piece of data that is passed in (in response to a kControlMsgSetData message) or returned (in response to a kControlMsgGetData message); see “Scrolling Text Box Control Data Tag Constants” for a description of these constants. The control definition function should return errDataNotSupported if the value in the tag parameter is unknown or invalid.

part

The part of the control that this data should be applied to. If the information is not tied to a specific part of the control or the control has no parts, pass 0.

size

On entry, the size of the buffer pointed to by the dataPtr field. In response to a kControlMsgGetData message, this field should be adjusted to reflect the actual size of the data that the control is maintaining. If the size of the buffer being passed in is smaller than the actual size of the data, the control definition function should return errDataSizeMismatch.

dataPtr

A pointer to a buffer to read or write the information requested. In response to a kControlMsgGetData message, this field could be NULL, indicating that you wish to return the size of the data in the size field.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)