| Age | Commit message (Collapse) | Author |
|
Split this into a more descriptive function. Still need to set up proper
error handling.
|
|
Allow toggling with both <C-M-D-8> and <F8>.
|
|
Ensure the object is released.
|
|
Replaced by `[NSApp run]`.
|
|
When the registered global hotkey is pressed, toggle screen colour
inversion.
Move the colour inversion code to the `Invert` class.
|
|
Build DDHotKey as a static library so we can compile it with ARC turned
on and our project with ARC turned off. Since DDHotKey is written with
ARC, if I include its headers directly, I'd need to enable ARC on my
project in order to compile it.
Initialise an `NSApplication` to give us an environment in which to
register the global hotkey.
A new class `Invert` will respond to the hotkey and respond accordingly.
|
|
Found an easy function to remove the colour inversion. Now I need to
enable toggling between the two with a keyboard shortcut.
|
|
Previously, I was only inverting the main display. Get a list of active
displays and invert all of them.
Decided to set the maximum display count to eight because that seemed
like a sufficiently high number for most people.
|
|
More descriptive this way.
|
|
|
|
|
|
Rather than sleeping, keep the program active until it's exited
manually.
|
|
Invert the screen colours for as long as the program is active. Only
works on the main display currently.
Inspired by Nikolai Ruhe's
(https://stackoverflow.com/users/104790/nikolai-ruhe) answer on Stack
Overflow about screen colour inversion:
https://stackoverflow.com/questions/14163788/how-does-on-screen-color-inversion-work-in-os-x/14165523#14165523
and this question:
https://stackoverflow.com/questions/32823023/permanently-modifying-rgb-gamma-table
|