2 * psychlops_io_display_OSX.cpp
3 * Psychlops Standard Library (MacOSX)
5 * Last Modified 2009/03/02 by Kenchi HOSOKAWA
6 * (C) 2009 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO
11 #include "../../core/graphic/psychlops_g_canvas.h"
12 #include "../../core/ApplicationInterfaces/psychlops_code_exception.h"
18 typedef std::vector<Display> Displays;
19 class APIDisplayProperties {
21 CGDirectDisplayID did;
22 CFDictionaryRef current_mode_, original_mode_;
24 savedRedMin_, savedRedMax_, savedRedGamma_,
25 savedGreenMin_, savedGreenMax_, savedGreenGamma_,
26 savedBlueMin_, savedBlueMax_, savedBlueGamma_;
29 APIDisplayProperties(CGDirectDisplayID ddid);
30 static Displays enumDisplays();
31 void getInfo(int &width, int &height, int &color_depth, double &refresh_rate, std::string& name, Rectangle& area);
32 void setGammaValue(const double gamma_r, const double gamma_g, const double gamma_b);
33 void setGammaTable(const std::vector<double> &table_r, const std::vector<double> &table_g, const std::vector<double> &table_b);
34 void setGammaTable(const CGGammaValue * const table_r, const CGGammaValue * const table_g, const CGGammaValue * const table_b, const int num_steps);
36 void saveGammaValue();
37 void destroyGammaSettings();
38 int getCalibrationMode();
41 } /* <- namespace Psycholops */