OSDN Git Service

first
[psychlops/cpp.git] / psychlops / platform / win32 / psychlops_io_display_Win32.h
1         /*
2  *  psychlops_io_display_Win32.h
3  *  Psychlops Standard Library (Win32)
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 <windows.h>
12 #include "../../core/graphic/psychlops_g_canvas.h"
13
14
15
16 namespace Psychlops {
17
18         typedef std::vector<Display> Displays;
19
20         class APIDisplayProperties {
21         private:
22                 static BOOL CALLBACK DisplayEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData);
23                 static Displays displays;
24
25         public:
26                 int gamma_mode_;
27                 HMONITOR monitor_;
28                 HDC display_;
29                 int primary_;
30                 DEVMODE mode_, original_mode_;
31                 enum { RAMP_STEPS_ = 256 };
32                 struct GAMMA_RAMP_TABLE {
33                         WORD r[RAMP_STEPS_];
34                         WORD g[RAMP_STEPS_];
35                         WORD b[RAMP_STEPS_];
36                 };
37                 GAMMA_RAMP_TABLE savedGammaRamp_;
38                 LPVOID savedGammaRamp_ptr_;
39
40
41                 static Displays emumDisplays();
42 //              void* native();
43
44                 APIDisplayProperties();
45                 ~APIDisplayProperties();
46
47                 void getInfo(int &width, int &height, int &color_depth, double &refresh_rate, std::string& name, Rectangle& area);
48 /*              void setGammaValue(const double gamma_r, const double gamma_g, const double gamma_b);
49                 void setGammaTable(const std::vector<double> &table_r, const std::vector<double> &table_g, const std::vector<double> &table_b);
50                 void setGammaTable(const CGGammaValue * const table_r, const CGGammaValue * const table_g, const CGGammaValue * const table_b, const int num_steps);
51                 void saveGammaValue();
52                 void destroyGammaSettings();
53                 int getCalibrationMode();
54 */
55         };
56
57
58 }       /*      <- namespace Psycholops         */