(v13) get_param return (next) device parameter
This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP
int32 get_param ( DEVICELIST *dev , DEVICEPARAM *param);
This routine has two functions. If, when called, the paramname
field of the param
structure is NULL,
the next parameter name and value should be returned through the DEVICEPARAM
structure. If the field is not NULL
then it points to a parameter name. The length of the name is then in the paramnamelen
field. The value of this parameter should be returned through the DEVICEPARAM
structure.
If in the second case the parameter name is not recognized the routine should return ParamIgnored
, otherwise it should return ParamAccepted
. If an error occurs, ParamError
should be returned and last_error
will be called to determine what error that was.
If not returning ParamIgnored
, the type
field must be set to one of ParamBoolean
, ParamInteger
, ParamString
, or ParamFloat
. The appropriate union field should be set to the value of the parameter. If a string value is returned, the strval f
ield should point to the device's local copy of the string, and strvallen
is set to the length of the string. The interpreter will copy the string into its own storage.
If returning the next parameter (paramname
is NULL
on function entry) the paramname
field should be set to point to the name of the parameter being returned, and the paramnamelen
field set to the length of that name. The value should be returned in the same way as above.
NOTE: The iteration cannot be thread-safe, so can generally only be used from PostScript language code, or code called from the PostScript language.