RedshiftGUI Documentation

0.1.3

Author:
Mao Yu
Date:
Updated: Thursday, August 05, 2010

Introduction

This program changes the monitor color temperature according to the time of the day and sun elevation, similar to redshift and f.lux. Actually, this software is forked from redshift.

Documentation

This is the developer documentation. For the project homepage, see here.

RedshiftGUI utilizes gamma ramps to change the color temperature of the monitor. Currently the gamma ramps are calculated using this source.

Note that this means if the gamma ramps are altered by other applications, then it will conflict with RedshiftGUI. Commonly SDL apps have access to gamma ramps to alter the in game gamma.

Take a look at the files section to see the general layout of the code. The code is divided into these sections:

  1. Core functionality
  2. Backends
  3. GUI

Core

Core functionality was mostly copied from the redshift project, with images and resources ripped also. A few modifications such as Geocoding and temperature retrieval was added.

Backends

Backends currently available for Unix

  1. libxcb xrandr
  2. xlib vidmode

XRandR is somewhat finicky and can return bad temperature values (see bugs list), with vidmode being somewhat more robust in my testing.

Backends currently available for Win32

  1. GDI

It appears directx might also be a possibility for a backend, but GDI seems to work on most systems.

Backends for Mac? I'm not familiar with Mac video programming

GUI

This program uses the IUP library to implement cross platform GUI. It is the only pure C GUI library that I am aware of besides GTK+. It seems to have worked out well, but I statically linked it in so it is not a dependency on Linux systems.