Skip to main content
Skip table of contents

(v13) Informing the Harlequin Core about device types

This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP

The device interface must let the interpreter know about all the device types that it has defined. The value associated with the tag SWDevTypesTag should point to a NULterminated array of DEVICETYPE pointers. This array should contain pointers to each of the DEVICETYPE structs of the device types supported by the implementation. The order of the elements is not significant.

The Harlequin Core uses the value of the /DeviceType parameter of a device to determine the device type number of a PostScript language device. When this parameter is set (with the operator setdevparams ), the Harlequin Core examines each element of the array of DEVICETYPE pointers looking for an element that points to a DEVICETYPE struct with the same device type number. This pointer is then used as the value of devicetype in the DEVICELIST structure for that device.

All devices, available to the PostScript language, except %os% are mounted and their type set by startup files or other PostScript language fragments supplied by the Harlequin Core integrator, using the devmount and setdevparams operators. See Device parameters and setdevparams in the Extensions manual for more details. The %os% d evice is mounted as the first device by the Harlequin Core, using code equivalent to:

  (%os%) dup devmount pop
  << /DeviceType OS_DEVICE_TYPE >> setdevparams

In this example, there is an exception. The name OS_DEVICE_TYPE is not a PostScript language name but is defined as a macro in swdevice.h .

There must be an implementation of a device type with the device type number


For example, a minimal UNIX implementation might use a declaration like:

  DEVICETYPE Unix_device_type= { ... };
  DEVICETYPE *Dev_Types[] = {
  &Unix_device_type, /* this must have device type number OS_DEVICE_TYPE */
  sw_args[i].tag = SWDevTypesTag; sw_args[i].value.pointer_value = (void *)Dev_types;

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.