Merge branch 'display-funcs'
Implement all global functions in terms of wxDisplay and add wxDisplay::GetPPI(). See https://github.com/wxWidgets/wxWidgets/pull/963
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
|
||||
@library{wxcore}
|
||||
@category{cfg}
|
||||
|
||||
@see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
|
||||
*/
|
||||
class wxDisplay
|
||||
{
|
||||
@@ -109,6 +107,19 @@ public:
|
||||
*/
|
||||
wxString GetName() const;
|
||||
|
||||
/**
|
||||
Returns display resolution in pixels per inch.
|
||||
|
||||
Horizontal and vertical resolution are returned in @c x and @c y
|
||||
components of the wxSize object respectively.
|
||||
|
||||
If the resolution information is not available, returns @code wxSize(0,
|
||||
0) @endcode.
|
||||
|
||||
@since 3.1.2
|
||||
*/
|
||||
wxSize GetPPI() const;
|
||||
|
||||
/**
|
||||
Returns @true if the display is the primary display. The primary
|
||||
display is the one whose index is 0.
|
||||
|
@@ -1183,6 +1183,10 @@ const wxSize wxDefaultSize;
|
||||
/**
|
||||
Returns @true if the display is colour, @false otherwise.
|
||||
|
||||
@note Use of this function is not recommended in the new code as it only
|
||||
works for the primary display. Use wxDisplay::GetDepth() to retrieve
|
||||
the depth of the appropriate display and compare it with 1 instead.
|
||||
|
||||
@header{wx/gdicmn.h}
|
||||
*/
|
||||
bool wxColourDisplay();
|
||||
@@ -1191,6 +1195,10 @@ bool wxColourDisplay();
|
||||
Returns the depth of the display (a value of 1 denotes a monochrome
|
||||
display).
|
||||
|
||||
@note Use of this function is not recommended in the new code as it only
|
||||
works for the primary display. Use wxDisplay::GetDepth() to retrieve
|
||||
the depth of the appropriate display instead.
|
||||
|
||||
@header{wx/gdicmn.h}
|
||||
*/
|
||||
int wxDisplayDepth();
|
||||
@@ -1248,6 +1256,10 @@ wxRect wxGetClientDisplayRect();
|
||||
The @c x component of the returned wxSize object contains the horizontal
|
||||
resolution and the @c y one -- the vertical resolution.
|
||||
|
||||
@note Use of this function is not recommended in the new code as it only
|
||||
works for the primary display. Use wxDisplay::GetPPI() to retrieve
|
||||
the resolution of the appropriate display instead.
|
||||
|
||||
@header{wx/gdicmn.h}
|
||||
|
||||
@see wxDisplay
|
||||
@@ -1262,6 +1274,10 @@ wxSize wxGetDisplayPPI();
|
||||
/**
|
||||
Returns the display size in pixels.
|
||||
|
||||
@note Use of this function is not recommended in the new code as it only
|
||||
works for the primary display. Use wxDisplay::GetGeometry() to retrieve
|
||||
the size of the appropriate display instead.
|
||||
|
||||
Either of output pointers can be @NULL if the caller is not interested in
|
||||
the corresponding value.
|
||||
|
||||
@@ -1277,6 +1293,10 @@ void wxDisplaySize(int* width, int* height);
|
||||
/**
|
||||
Returns the display size in pixels.
|
||||
|
||||
@note Use of this function is not recommended in the new code as it only
|
||||
works for the primary display. Use wxDisplay::GetGeometry() to retrieve
|
||||
the size of the appropriate display instead.
|
||||
|
||||
@see wxDisplay
|
||||
|
||||
@header{wx/gdicmn.h}
|
||||
|
@@ -15,8 +15,6 @@
|
||||
|
||||
@stdobjects
|
||||
::wxDefaultVideoMode
|
||||
|
||||
@see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
|
||||
*/
|
||||
struct wxVideoMode
|
||||
{
|
||||
|
Reference in New Issue
Block a user