hid/gtk: Add feature to force an immediate redraw if framerate is low

If more than a certain time (currently hard-coded at 50ms) has elapsed
since the last expose callback, invalidate_all() will wait and process
updates before returning.

This is handy to allow animation of auto-router progress, where the gui
mainloop is not hit until the auto-routing operation is fully complete.
Add virtual trackball code
hid/gtk: Make the trackball widget sexy

* Use cairo to render a nice sphere with radial gradients.
* Use widget sensitivity of the track-ball drawing to better.
  differentiate between 2D / 3D views.
* Allow double-clicking on the track-ball to reset the 3D view.
Use trackball to allow rotation of 3D view
hid/gtk: Avoid using g_object_{set,set}_data() where we don't need to

Personally I hate to see data stashed and recalled with these functions,
especially where is just a case of passing appropriate data to callback
functions.
hid/gtk: Fix stupid (missing semicolon) bug breaking compile

I was _sure_ I'd buid tested this before pusing... obviously not!
Fix outline drawing to only apply on copper layers

This matches the old comments in the code, and fixes (removes) outline
drawing on the solder mask prints.

This partially reverts commit 294494e56695251e63c0da9f243d6f59447f1c9f
"Fix PS rect/outline logic", which changed the logic, and
commit d2458383a60b670ad1c42163ac24fcc63fcab457 where I changed
the comment to match the code.
hid/common/hidgl: Add API to initialise a rendering pass

Serves as a place to perform any necessary initialisation within hidgl.c,
saving lots of separate calls being made by its callers.
Removed the cursor position from being written to the pcb file.

Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
parse_y.y: As of November 2012 the cursor position is not written to file anymore

Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Remove unused zoom settings from the PCB and settings data-structures
Remove unused prototypes SetZoom and RedrawZoom, along with old #ifdef'd code

SetZoom() was removed in commit 94e927e03850bfc0e8a0f3b161ae99b6784747f0

There were a few references to SetZoom left under an #ifdef HAVE_LIBSTROKE,
which will not work, so I have commented those as well.
Remove unused references to SwitchDrawingWindow()
Convert argument in HID_Flags to (void *) rather than (int)

void * allows us to pass pointers on all platforms, 64bit or
otherwise. We can still use casting macros to safely pass integer
values via this pointer.

Avoids the ugliness of castnig a size_t sized offset_of value into
an int. Due to the size of our structures, this did not cause any
actual bugs, but was not good practice.
Convert mask type to enum
hid/gcode: Make gcode_hid structure static
HID: Move non-PCB specific drawing calls into a separate API
Stop "find connected" following rat-lines. Fixes confusing output.

Suppose we have two nets, A and B, and some components. If we connect
a pin of a component which was supposed to be connected to net A, to
net B, the "f" (find connected) action will falsely show the entirity
of net A and net B connected to each other. In reality, the nets are
not electrically connected, it is just the ratline between the
mis-connected component pin (mis-connected to Net B), and net A,
where the ratline for that pin should end up.

It MIGHT be better if we fix this bug by not adding rat-lines to shorted
connections, as often those rat-lines would take some convoluted route
through the copper of the net which is shorted to that connection
end-point. These rat-line(s) would no longer be spatially associated
with the mis-connected wiring, and encourage the user to further short
net A and net B together to complete the ratline.

This bug was a contributing factor to a mistake in a production board
I made recently, where as a last step in production, I added a star-
ground short between two different ground planes (analogue and digital).
The "find connected" action, "f" showed them connected together (as I
expected), but unfortunately, due to a thermal I left out, they were not
actually connected - despite PCB's green rendering suggesting that they
were.
configure.ac: fixed a typo.

Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
lesstif: corrections on recent HID API changes.

Reported by Eugene Mikhantiev <mikhantiev@gmail.com>

PCB can not be built with `--with-gui=lesstif' due to the
HID API changes in commit 73b243d90cda84e09f52b7ff995fa82afdc3de0

Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>