]>
git.saurik.com Git - wxWidgets.git/blob - interface/display.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxDisplay
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 Determines the sizes and locations of displays connected to the system.
18 @see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
24 Constructor, setting up a wxDisplay instance with the specified display.
27 The index of the display to use. This must be non-negative
28 and lower than the value returned by GetCount().
30 wxDisplay(unsigned index
= 0);
38 Changes the video mode of this display to the mode specified
39 in the mode parameter.
40 If wxDefaultVideoMode is passed in as the mode parameter,
41 the defined behaviour is that wxDisplay will reset the video
42 mode to the default mode used by the display. On Windows,
43 the behavior is normal. However, there are differences on other
44 platforms. On Unix variations using X11 extensions it should
45 behave as defined, but some irregularities may occur.
46 On wxMac passing in wxDefaultVideoMode as the mode
47 parameter does nothing. This happens because carbon
48 no longer has access to DMUseScreenPrefs, an undocumented
49 function that changed the video mode to the system
50 default by using the system's 'scrn' resource.
52 bool ChangeMode(const wxVideoMode
& mode
= wxDefaultVideoMode
);
55 Returns the client area of the display. The client area is the part of the
56 display available for the normal (non full screen) windows, usually it is the
57 same as GetGeometry() but it could be less if
58 there is a taskbar (or equivalent) on this display.
60 wxRect
GetClientArea() const;
63 Returns the number of connected displays.
65 static unsigned GetCount();
68 Returns the current video mode that this display is in.
70 wxVideoMode
GetCurrentMode() const;
73 Returns the bit depth of the display whose index was passed to the constructor.
78 Returns the index of the display on which the given point lies. Returns
79 @c wxNOT_FOUND if the point is not on any connected display.
84 static int GetFromPoint(const wxPoint
& pt
);
87 Returns the index of the display on which the given window lies.
88 If the window is on more than one display it gets the display that overlaps the
90 Returns @c wxNOT_FOUND if the window is not on any connected display.
95 static int GetFromWindow(const wxWindow
* win
);
98 Returns the bounding rectangle of the display whose index was passed to the
101 wxRect
GetGeometry() const;
104 Fills and returns an array with all the video modes that
105 are supported by this display, or video modes that are
106 supported by this display and match the mode parameter
107 (if mode is not wxDefaultVideoMode).
109 wxArrayVideoModes
GetModes(const wxVideoMode
& mode
= wxDefaultVideoMode
) const;
112 Returns the display's name. A name is not available on all platforms.
114 wxString
GetName() const;
117 Returns @true if the display is the primary display. The primary display is the
118 one whose index is 0.