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