OSDN Git Service

first
[psychlops/cpp.git] / psychlops / platform / osx / psychlops_io_display_OSX.h
1 /*
2  *  psychlops_io_display_OSX.cpp
3  *  Psychlops Standard Library (MacOSX)
4  *
5  *  Last Modified 2009/03/02 by Kenchi HOSOKAWA
6  *  (C) 2009 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO
7  */
8
9
10 #include <string>
11 #include "../../core/graphic/psychlops_g_canvas.h"
12 #include "../../core/ApplicationInterfaces/psychlops_code_exception.h"
13
14
15
16 namespace Psychlops {
17
18         typedef std::vector<Display> Displays;
19         class APIDisplayProperties {
20         public:
21                 CGDirectDisplayID did;
22                 CFDictionaryRef current_mode_, original_mode_;
23                 CGGammaValue
24                         savedRedMin_, savedRedMax_, savedRedGamma_,
25                         savedGreenMin_, savedGreenMax_, savedGreenGamma_,
26                         savedBlueMin_, savedBlueMax_, savedBlueGamma_;
27                 int gamma_mode_;
28                 
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);
35                 void setGammaTable();
36                 void saveGammaValue();
37                 void destroyGammaSettings();
38                 int getCalibrationMode();
39         };
40
41 }       /*      <- namespace Psycholops         */
42
43
44