jonls/redshift — pull request #61 by maandree (2014-04-09 10:45:40+00:00)
Title: Rewrite of adjustment methods and a some other stuff

Sorry for making a huge monolithic patch, but it was required for by workflow.

This patch merges pull request #60, as it was needed for testing gamma-w32gdi.h
I also took the liberty of implementing issue #59.

As mentioned in #54 it should be possible to use multiple displays and multiple
adjustment methods. This patch allows for multiple displays concurrent, and
can easily (by my estimation) be rewritten to allow for multiple concurrent
adjustment methods. It also makes it easy for redshift-dbus (when it gets added)
to control the monitors individually. Additionally, it supports using lookup tables
both before and efter the standard adjustments have been applied. It does not
however yet provide any functions to ease this for redshift-dbus.

To allow the display to be selected from the command line I also change
the adjustment method option delimiter from `:` to `,`, as `:` is delimits the
host and the display index as well as appears in IPv6 addresses. For
consistency I also make this change for the provider method. And in my
opinion the arguments are now easier to read because of this.
I also put `crtc` before `screen` in the RandR method's help output, because
it is more probable that the user is intereseted in selection CRTC than screen.
Further, it is now possible to use `crtc=all`, `screen=all` and `card=all`.

It also reimplements pull request #49, and pull request #47 with the calibrations
being applyed absolutely last (after the lookup tables mentioned in the previous
paragraph.) Further it reimplements pull request #44.

It obsoletes pull request #29 by lettings the brightness limits be configurable at
compile time, with or without a maximum value. It also does this for gamma.
`TRANSITION_LOW` and `TRANSITION_HIGH` can also be configured at
compile time.

This patch also makes it easy for DBus client to implement the gamma adjustment
suggesting in issue #4, by having one addition gamma parameter in the adjustment
settings.

In addition to all this, only a select few available warnings available in GCC will
now generate any warnings. And all adjustment method have been rewritten to
share a common base code.