]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/vidmode.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / interface / wx / vidmode.h
CommitLineData
e46fcdb4
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: vidmode.h
3// Purpose: interface of wxVideoMode
4// Author: wxWidgets team
526954c5 5// Licence: wxWindows licence
e46fcdb4
FM
6/////////////////////////////////////////////////////////////////////////////
7
8/**
077f75a5 9 @struct wxVideoMode
e46fcdb4
FM
10
11 Determines the sizes and locations of displays connected to the system.
12
13 @library{wxcore}
3c99e2fd 14 @category{cfg}
e46fcdb4
FM
15
16 @stdobjects
17 ::wxDefaultVideoMode
18
19 @see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
20*/
077f75a5 21struct wxVideoMode
e46fcdb4
FM
22{
23public:
24 /**
25 Constructs this class using the given parameters.
26 */
27 wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0);
28
e46fcdb4
FM
29 /**
30 Returns true if this mode matches the other one in the sense that all
31 non zero fields of the other mode have the same value in this one
32 (except for refresh which is allowed to have a greater value).
33 */
34 bool Matches(const wxVideoMode& other) const;
35
077f75a5 36 /**
0824e369 37 Returns the screen width in pixels (e.g.\ 640), 0 means unspecified.
077f75a5 38 */
e46fcdb4 39 int GetWidth() const;
077f75a5
VS
40
41 /**
0824e369 42 Returns the screen height in pixels (e.g.\ 480), 0 means unspecified.
077f75a5 43 */
e46fcdb4 44 int GetHeight() const;
077f75a5
VS
45
46 /**
0824e369 47 Returns bits per pixel (e.g.\ 32), 1 is monochrome and 0 means
077f75a5
VS
48 unspecified/known.
49 */
e46fcdb4
FM
50 int GetDepth() const;
51
52 /**
53 Returns true if the object has been initialized
54 */
55 bool IsOk() const;
077f75a5 56
78e37b46
FM
57
58 bool operator==(const wxVideoMode& m) const;
59 bool operator!=(const wxVideoMode& mode) const;
60
61
62
09ad05fa 63 /**
0824e369 64 The screen width in pixels (e.g.\ 640), 0 means unspecified.
09ad05fa 65 */
077f75a5
VS
66 int w;
67
09ad05fa 68 /**
0824e369 69 The screen height in pixels (e.g.\ 480), 0 means unspecified.
09ad05fa 70 */
077f75a5
VS
71 int h;
72
09ad05fa 73 /**
0824e369 74 Bits per pixel (e.g.\ 32), 1 is monochrome and 0 means
09ad05fa
BP
75 unspecified/known.
76 */
077f75a5
VS
77 int bpp;
78
09ad05fa
BP
79 /**
80 Refresh frequency in Hz, 0 means unspecified/unknown.
81 */
077f75a5 82 int refresh;
e46fcdb4
FM
83};
84
85/**
86 A global wxVideoMode instance used by wxDisplay.
87*/
e1134ecf 88const wxVideoMode wxDefaultVideoMode;
09ad05fa 89