summaryrefslogtreecommitdiff
path: root/base/gsnamecl.h
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2016-02-24 12:50:47 +0000
committerChris Liddell <chris.liddell@artifex.com>2016-06-06 15:25:53 +0100
commit45dcf097558e880a76f569dd8d6c678f6ed186ce (patch)
treea6053769310375ff63efd5e493e8562d410e0112 /base/gsnamecl.h
parent41d8d83a77ee6ea12109dde7b72dedc61cca01a3 (diff)
downloadghostpdl-45dcf097558e880a76f569dd8d6c678f6ed186ce.tar.gz
Make gs_imager_state == gs_state.
Change how gstate initialisation is done: Previously we relied on the imager state being a subset of the gstate (thus assigning an imager state to a graphics state over wrote to the entries common to both, and didn't overwrite any already set graphics state specific entries). Making the imager and graphics states the same means that approach doesn't work, so this changes it to initialise the entries individually. Renames gsistate.c->gsgstate.c and gxistate.h->gxgstate.h Cleanup and fix the gs_state gc stuff. Uses different check for pre/post clist pdf14 device Previously, the code used "is_gstate" in the imager/graphics state object to determine if the code was being called pre or post clist (post clist would only ever have had an imager_state so is_gstate = false). With no imager state any more, that test would no longer work (and I am dubious about whether it was really safe, anyway). Other places check for the presence of a clist reader device in the pdf14 device structure - so use that here too. Adds initial (NULL) value for show_gstate pointer in gs_state. Removes the now pointless macro for the contents of the graphics state Changes function names that had "imager" to use "gstate" Removes the redundant 'is_state' flag Cleans up gs_(g)state_putdeviceparams(): Previously we had to similar routines: one took a graphics state, and used the device from the graphics state, the other took an imager state and the device as an explicit parameter. With the removal of the imager state, "merge" those two functions Replaces gs_state with gs_gstate It makes for less confusion as it really is a g(raphics)state
Diffstat (limited to 'base/gsnamecl.h')
-rw-r--r--base/gsnamecl.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/base/gsnamecl.h b/base/gsnamecl.h
index 07b06902e..0c4cd2a8c 100644
--- a/base/gsnamecl.h
+++ b/base/gsnamecl.h
@@ -60,14 +60,14 @@ typedef struct gs_color_space_s gs_color_space;
typedef struct gx_device_color_s gx_device_color;
#endif
-#ifndef gs_state_DEFINED
-# define gs_state_DEFINED
-typedef struct gs_state_s gs_state;
+#ifndef gs_gstate_DEFINED
+# define gs_gstate_DEFINED
+typedef struct gs_gstate_s gs_gstate;
#endif
-#ifndef gs_imager_state_DEFINED
-# define gs_imager_state_DEFINED
-typedef struct gs_imager_state_s gs_imager_state;
+#ifndef gs_gstate_DEFINED
+# define gs_gstate_DEFINED
+typedef struct gs_gstate_s gs_gstate;
#endif
#ifndef gx_device_DEFINED
@@ -96,7 +96,7 @@ typedef struct gs_param_list_s gs_param_list;
* is not being used since PS integers are nominally 32 bits. Thus there
* would be a problem using integers to pass pointer values on 64 bit systems.
*/
-int custom_color_callback_put_params(gs_state * pgs, gs_param_list * plist);
+int custom_color_callback_put_params(gs_gstate * pgs, gs_param_list * plist);
/*
* Get the custom client client callback parameter block pointer. This value
@@ -105,20 +105,20 @@ int custom_color_callback_put_params(gs_state * pgs, gs_param_list * plist);
* is not being used since PS intergers are nominally 32 bits. Thus there
* would be a problem using integers to pass pointer values on 64 bit systems.
*/
-int custom_color_callback_get_params(gs_state * pgs, gs_param_list * plist);
+int custom_color_callback_get_params(gs_gstate * pgs, gs_param_list * plist);
/*
* Check if we want to use the callback color processing logic for the given
* Separation color space.
*/
bool custom_color_callback_install_Separation(gs_color_space * pcs,
- gs_state * pgs);
+ gs_gstate * pgs);
/*
* Check if we want to use the custom client callback processing logic for the
* given DeviceN color space.
*/
-bool custom_color_callback_install_DeviceN(gs_color_space * pcs, gs_state * pgs);
+bool custom_color_callback_install_DeviceN(gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a Separation color into device colorants using the custom client
@@ -126,7 +126,7 @@ bool custom_color_callback_install_DeviceN(gs_color_space * pcs, gs_state * pgs)
*/
int gx_remap_concrete_custom_color_Separation(const frac * pconc,
const gs_color_space * pcs, gx_device_color * pdc,
- const gs_imager_state * pis, gx_device * dev, gs_color_select_t select);
+ const gs_gstate * pgs, gx_device * dev, gs_color_select_t select);
/*
* Convert a DeviceN color into device colorants using the custom client
@@ -134,7 +134,7 @@ int gx_remap_concrete_custom_color_Separation(const frac * pconc,
*/
int gx_remap_concrete_custom_color_DeviceN(const frac * pconc,
const gs_color_space * pcs, gx_device_color * pdc,
- const gs_imager_state * pis, gx_device * dev, gs_color_select_t select);
+ const gs_gstate * pgs, gx_device * dev, gs_color_select_t select);
/* "CLIENT COLOR CALLBACK APPLICATION INTERFACE" */
/*
@@ -178,70 +178,70 @@ typedef struct client_custom_color_procs_s {
* Install a DeviceGray color space.
*/
bool (* install_DeviceGray)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a DeviceGray color into device color.
*/
int (* remap_DeviceGray)(client_custom_color_params_t * pparams,
const frac * pconc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Install a DeviceRGB color space.
*/
bool (* install_DeviceRGB)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a DeviceRGB color into device color.
*/
int (* remap_DeviceRGB)(client_custom_color_params_t * pparams,
const frac * pconc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Install a DeviceCMYK color space.
*/
bool (* install_DeviceCMYK)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a DeviceGray color into device color.
*/
int (* remap_DeviceCMYK)(client_custom_color_params_t * pparams,
const frac * pconc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Check if we want to use the callback color processing logic for the
* given Separation color space.
*/
bool (* install_Separation)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a Separation color into device color.
*/
int (* remap_Separation)(client_custom_color_params_t * pparams,
const frac * pconc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Check if we want to use the callback color processing logic for the
* given DeviceN color space.
*/
bool (* install_DeviceN)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a DeviceN color into device color.
*/
int (* remap_DeviceN)(client_custom_color_params_t * pparams,
const frac * pconc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Check if we want to use the callback color processing logic for the
* given CIEBasedA color space.
*/
bool (* install_CIEBasedA)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Please note that the 'complex' color spaces (CIEBasedA, CIEBasedABC,
* CIEBasedDEF, CIEBasedDEFG, and ICCBased) have a different prototype,
@@ -253,59 +253,59 @@ typedef struct client_custom_color_procs_s {
*/
int (* remap_CIEBasedA)(client_custom_color_params_t * pparams,
const gs_client_color * pc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Check if we want to use the callback color processing logic for the
* given CIEBasedABC color space.
*/
bool (* install_CIEBasedABC)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a CIEBasedABC color into device color.
*/
int (* remap_CIEBasedABC)(client_custom_color_params_t * pparams,
const gs_client_color * pc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Check if we want to use the callback color processing logic for the
* given CIEBasedDEF color space.
*/
bool (* install_CIEBasedDEF)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a CIEBasedDEF color into device color.
*/
int (* remap_CIEBasedDEF)(client_custom_color_params_t * pparams,
const gs_client_color * pc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Check if we want to use the callback color processing logic for the
* given CIEBasedDEFG color space.
*/
bool (* install_CIEBasedDEFG)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a CIEBasedDEFG color into device color.
*/
int (* remap_CIEBasedDEFG)(client_custom_color_params_t * pparams,
const gs_client_color * pc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
/*
* Check if we want to use the callback color processing logic for the
* given ICCBased color space.
*/
bool (* install_ICCBased)(client_custom_color_params_t * pparams,
- gs_color_space * pcs, gs_state * pgs);
+ gs_color_space * pcs, gs_gstate * pgs);
/*
* Convert a ICCBased color into device color.
*/
int (* remap_ICCBased)(client_custom_color_params_t * pparams,
const gs_client_color * pc, const gs_color_space * pcs,
- gx_device_color * pdc, const gs_imager_state * pis,
+ gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select);
} client_custom_color_procs_t;