As you integrate the Harlequin RIP into your own application, you may need to develop and add your own raster backends, color management modules, halftone modules, configuration devices, or other devices, or call Harlequin RIP SDK functions from your application code. To do this, you will need to add the Harlequin header file locations to your build system, include the appropriate header files in your C or C++ code, and link with the Harlequin RIP SDK library.
There are two main directories containing header files for the Harlequin RIP SDK, and additional header file directories for examples, extra libraries, and the Scalable RIP interface.
If you are integrating the Harlequin RIP into your application using the Scalable RIP interface (see Integrating by linking to the RIP Farm API), then there is just one header file directory that you need to add to your build system:
If you are modifying the application layer, integrating the Harlequin RIP into your application as a library (see Integrating by linking to the Harlequin RIP SDK), then these are the header file directories that you need to add to your build system:
This directory contains header files for the SDK library component (see SDK library and Linking the SDK library). The SDK library provides a number of devices and functions to integrate the core library with the operating system.
There are a large number of header files in this directory, specific to the functions and definitions they provide. It can be difficult to determine which header files are required for the functions that you may need to call. To make this easier, there is a single combined header file called hhrsdk.h
which includes all of the other functional header files in this directory. Global Graphics recommend that you include hhrsdk.h
in your application code if you are directly using SDK library functions or definitions, instead of including each header file separately.
The hhrsdk.h
header file also includes the corresponding hhrcore.h
header file for the core library. If you include hhrsdk.h
, you do not need to include hhrcore.h
or most other Harlequin SDK header files. See hhrsdk.h
for the full list of files included.
This directory contains header files for the core library component (see Core library and Linking corelib). The core library contains the core of the Harlequin RIP, but also a number of utility functions that you may find useful in your code.
The Harlequin RIP SDK shares a set of standard type definitions used by the core library, the SDK library and the application layers. These type definitions, and functions that manipulate them, are defined appropriately for each platform in this directory.
There are a large number of header files in this directory, specific to the functions and definitions they provide. It can be difficult to determine which header files are required for the functions that you may need to call. To make this easier, there is a single combined header file called hhrcore.h
which includes nearly all of the other header files in this directory. Global Graphics recommend that you include hhrcore.h
in your code if you are directly using core library features, instead of including each header file separately.
A few header files are not included in hhrcore.h
, and you may need to include these separately if you use functionality they provide. The header files not included in hhrcore.h
are:
hqwindows.h
header that safely includes the subset of the Windows API that the Harlequin RIP SDK uses.See hhrcore.h
for the full list of files included.
On Windows, this include directory contains the header files for the Pthreads library. On Windows, the pthreads library must be loaded explicitly (see Linking pthreads). On Linux and MacOS, this directory will not be provided in the distribution, because pthreads is built-in to the operating system.
The Pthreads library is used to provide a uniform interface to thread creation, mutexes, condition variables, and thread-local storage. The Harlequin RIP SDK calls a subset of pthreads through a threading API (see Threads interface). However, this header directory is still needed on the include path when compiling functions that use the threading API.
If you are modifying or replacing the application layer (see Application layer), and are using the color management module examples, halftone module examples, or the TIFF raster output backend, there are some additional header file directories you may need to add to your build system. For the color management and halftone module examples, you may consider copying the code into your application directories and modifying it there instead of adding these directories:
NO_CMMEG
to exclude these examples from your build.NO_HTMEG
to exclude these examples from your build.skintest.c
to remove the TIFF raster backend preprocessor include directives and registration function calls.The Harlequin RIP defines a set of standard sized integer and boolean types and generic handle and result types (see Standard integer and Bool types). These will be made available to your code by including the hhrsdk.h
or hhrcore.h
header files. As well as the ubiquitous sized-integer type definitions, these definitions include HqBool, HqnFileDescriptor, HqnIdent, and HqnResult.
The HqnResult type is an important type to understand. It is used as a base type for success and error return values by many of the interfaces in the Harlequin RIP SDK. Many API-specific result types are based on HqnResult, but add a set of API-specific result values. Interfaces using API-specific result values also provide an error translation function that can be used to convert the API-specific values to the base HqnResult type, which can then be used to signal errors to the RIP or application layer.
The core library interface also provides:
hq32x2.h
.hqbitvector.h
. The bitvector type uses macros for parameterisation to allow bitvectors of known sizes to be stack or statically allocated.rbthuff.h
.Four calling-convention macro labels are used in the Harlequin interfaces:
These calling convention macros use the same definitions, but are separate textually because of library reuse and modularity boundaries.
The calling-convention labels are mostly obsolete, and are not applied to new interfaces. They were relevant on 32-bit Windows to indicate the correct method for marshalling parameters in registers. The calling convention labels should be used for consistency when defining callback functions that are declared with them, but otherwise ignored.
The Harlequin RIP has a set of custom assert and trace macros, used by Global Graphics to ensure code quality by testing for invalid states. These are described in Harlequin standard "assert" and "trace" macros. The assertion and traces macros are ultimately handled through a pair of handler functions, set by the application using the SDK library SwLeSetHqAssertHandlers() function. The assertion macros and their interface are in hqassert.h
, the handler function interface in hqcstass.h
.
Neither the assert nor trace handler functions will be called unless the RIP is built with assertions enabled. This is not normally the case for customer distributions, but Global Graphics may provide assertion enabled builds on occasion to help diagnose difficult problems. Assertion enabled builds should not be used in production. It is possible to rebuild the skin (Harlequin SDK library and application layers) with assertions enabled by defining ASSERT
in the Makefile
(to set the C compiler symbol ASSERT_BUILD
), even if the core library was not built with assertions enabled. In this case, only assertions in the skin layers will be evaluated.
The Harlequin core library provides some utility functions that the SDK and application layers use. You may find these useful in your code.
hqstr.h
for copying strings, with and without truncation, and also variants of some of the standard C library functions with type conversion casts and assertion checks to convert between the Harlequin RIP string type and standard C strings. The Harlequin RIP and SDK has used unsigned char arrays and pointers for representing strings since before the C language was standardized. Using these variants isolates type casting to these few functions and macros, where it can be checked.hhrcore.h
header file, because they define static inline functions:pjwhash.h
defines an implementation of Peter Weinberger's non-cryptographic hash. This is a non-incremental hash implementation, operating on a number of bytes, yielding a 32-bit hash result.hsiehhash32.h
defines an implementation of Paul Hsieh's SuperFastHash. This is an incremental hash implementation, operating on a number of 32-bit integer values, yielding a 32-bit hash result.murmurhash3.h
defines an implementation of Austin Appleby's MurmurHash3 algorithm. There are both non-incremental and incremental implementations provided, yielding either a 32-bit or 128-bit hash result. The 128-bit hash function is useful where a large and well-dispersed result is required.The interfaces to the common core are documented in Low-level Harlequin Core RIP interfaces. The interfaces to the library integration layer are documented in Core RIP Entry Point Interfaces. You should not have need to call these interfaces directly.
The Harlequin core library provides some callback APIs, packaged as structures of function pointers that the SDK or application layer can call. These are described in separate sections:
The Harlequin SDK library also provides utility functions that the application layer may use:
/ResamplingFactor
pagedevice key for anti-aliasing during raster output.PageBufferType
name is changed in the page device configuration. Global Graphics does not recommend using this function for anything except this purpose.The Harlequin SDK library provides some callback APIs, packaged as structures of function pointers that the core library, SDK or application layer can call. These are described in separate sections: