Move some fields from the HID* structure to HID_DRAW* and HID_DRAW_CLASS*api_refactor/move-some-fields-from-the-hid
commit3c061402d0e664f12ff5c63cf4c9658dc1c3819c
authorPeter Clifton <peter@clifton-electronics.co.uk>
Thu, 7 Jan 2016 02:18:58 +0000 (7 02:18 +0000)
committerPeter Clifton <peter@clifton-electronics.co.uk>
Sat, 9 Jan 2016 16:18:03 +0000 (9 16:18 +0000)
tree0ea35aa8a27adcc3c9c0e563f70f3f6b13625a74
parent1dea0a184a7713c027f8f7d0e7bd8e2a621acc3d
Move some fields from the HID* structure to HID_DRAW* and HID_DRAW_CLASS*

The parameters gui, poly_before, poly_after only effect rendering, so
belong in either the HID_DRAW_CLASS or HID_DRAW instance structure.

The set_layer() and end_layer() APIs also belong in the HID_DRAW_CLASS

We leave a copy of the "gui" flag in the HID structure, as main.c uses
this to count up each type of exporter.

XXX: THIS BREAKS SOME EXPORERS WHICH RELY ON THE NO-OP end_layer function
previously initialised in common_nogui_init()
16 files changed:
src/draw.c
src/hid.h
src/hid/batch/batch.c
src/hid/common/extents.c
src/hid/common/hidnogui.c
src/hid/gcode/gcode.c
src/hid/gerber/gerber.c
src/hid/gtk/gtkhid-gl.c
src/hid/gtk/gtkhid-main.c
src/hid/lesstif/main.c
src/hid/lpr/lpr.c
src/hid/nelma/nelma.c
src/hid/png/png.c
src/hid/ps/eps.c
src/hid/ps/ps.c
src/hid_draw.h