Next: , Up: Output Library Types   [Index]


7.10.2.1 struct x1f4_datapipe_type

typedef struct x1f4_datapipe_type {
    const char *name;
    int (*copy)(void *, const char *, unsigned), type;
    unsigned size;
    void *text;
} x1f4_datapipe_type;

The x1f4_datapipe_type record describes an output device type. It details such (application and programming language) output device type attributes as prefix id and type id, and data operations such as byte string output.

See Referable Objects.

name

The name field is the output device prefix id, i.e. the string used for prefixing the device specific output routines.

size

The size field is the output device prefix id length, i.e. the number of characters (not including the terminal null) making up the output device prefix id.

type

The type field is the type id (the output devices are identified by data of this type).

text

The text field is the generic output context. It is passed to the copy output method and not used otherwise.

copy

The copy field is the address of the routine outputting some byte string on the device corresponding this very definition. When called, the copy routine is supplied an array of context pointers, the address at which the byte string to be output is stored and its size, in this order.

The array of pointers supplied as the method first argument is two long. The first pointer in the array is generic output context (the text field in this very record), the second is indicating the specific output device (the one indicated by data typed by type).

The method is expected to return zero for success, non zero for failure (one of the error class codes).

See Error Classes.


Next: struct x1f4_lxnear_type, Up: Output Library Types   [Index]