git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38165
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0);
~wxVideoMode();
{
wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0);
~wxVideoMode();
DocDeclStr(
bool , Matches(const wxVideoMode& other) const,
"Returns True if this mode matches the other one in the sense that all
DocDeclStr(
bool , Matches(const wxVideoMode& other) const,
"Returns True if this mode matches the other one in the sense that all
-non zero fields of the other mode have the same value in this
+non-zero fields of the other mode have the same value in this
one (except for refresh which is allowed to have a greater value)", "");
DocDeclStr(
int , GetWidth() const,
"Returns the screen width in pixels (e.g. 640*480), 0 means unspecified", "");
one (except for refresh which is allowed to have a greater value)", "");
DocDeclStr(
int , GetWidth() const,
"Returns the screen width in pixels (e.g. 640*480), 0 means unspecified", "");
DocDeclStr(
int , GetHeight() const,
DocDeclStr(
int , GetHeight() const,
- "Returns the screen width in pixels (e.g. 640*480), 0 means
-unspecified", "");
-
+ "Returns the screen height in pixels (e.g. 640*480), 0 means unspecified", "");
+
DocDeclStr(
int , GetDepth() const,
"Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0
means unspecified/known", "");
DocDeclStr(
int , GetDepth() const,
"Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0
means unspecified/known", "");
DocDeclStr(
bool , IsOk() const,
"returns true if the object has been initialized", "");
DocDeclStr(
bool , IsOk() const,
"returns true if the object has been initialized", "");
%pythoncode { def __nonzero__(self): return self.IsOk() }
%pythoncode { def __nonzero__(self): return self.IsOk() }
bool __ne__(const wxVideoMode* other) { return other ? (*self != *other) : true; }
}
bool __ne__(const wxVideoMode* other) { return other ? (*self != *other) : true; }
}
// the screen size in pixels (e.g. 640*480), 0 means unspecified
int w, h;
// the screen size in pixels (e.g. 640*480), 0 means unspecified
int w, h;
#if !wxUSE_DISPLAY
const wxVideoMode wxDefaultVideoMode;
#endif
#if !wxUSE_DISPLAY
const wxVideoMode wxDefaultVideoMode;
#endif
%immutable;
const wxVideoMode wxDefaultVideoMode;
%immutable;
const wxVideoMode wxDefaultVideoMode;
DocStr(wxDisplay,
"Represents a display/monitor attached to the system", "");
class wxDisplay
{
public:
DocStr(wxDisplay,
"Represents a display/monitor attached to the system", "");
class wxDisplay
{
public:
DocCtorStr(
wxDisplay(size_t index = 0),
"Set up a Display instance with the specified display. The displays
DocCtorStr(
wxDisplay(size_t index = 0),
"Set up a Display instance with the specified display. The displays
DocDeclStr(
static size_t , GetCount(),
"Return the number of available displays.", "");
DocDeclStr(
static size_t , GetCount(),
"Return the number of available displays.", "");
DocDeclStr(
static int , GetFromPoint(const wxPoint& pt),
"Find the display where the given point lies, return wx.NOT_FOUND if it
doesn't belong to any display", "");
DocDeclStr(
static int , GetFromPoint(const wxPoint& pt),
"Find the display where the given point lies, return wx.NOT_FOUND if it
doesn't belong to any display", "");
DocStr(GetFromWindow,
"Find the display where the given window lies, return wx.NOT_FOUND if
it is not shown at all.", "");
DocStr(GetFromWindow,
"Find the display where the given window lies, return wx.NOT_FOUND if
it is not shown at all.", "");
static int GetFromWindow(wxWindow *window);
static int GetFromWindow(wxWindow *window);
DocDeclStr(
bool , IsOk() const,
"Return true if the object was initialized successfully", "");
%pythoncode { def __nonzero__(self): return self.IsOk() }
DocDeclStr(
bool , IsOk() const,
"Return true if the object was initialized successfully", "");
%pythoncode { def __nonzero__(self): return self.IsOk() }
DocDeclStr(
wxRect , GetGeometry() const,
"Returns the bounding rectangle of the display whose index was passed
to the constructor.", "");
DocDeclStr(
wxRect , GetGeometry() const,
"Returns the bounding rectangle of the display whose index was passed
to the constructor.", "");
DocDeclStr(
wxRect , GetClientArea() const,
DocDeclStr(
wxRect , GetClientArea() const,
- "Get the client area of the display, i.e. without taskbars and such", "");
-
-
+ "Returns the bounding rectangle the client area of the display,
+i.e., without taskbars and such.", "");
DocDeclStr(
wxString , GetName() const,
"Returns the display's name. A name is not available on all platforms.", "");
DocDeclStr(
wxString , GetName() const,
"Returns the display's name. A name is not available on all platforms.", "");
DocDeclStr(
bool , IsPrimary() const,
DocDeclStr(
bool , IsPrimary() const,
- "Returns true if the display is the primary display. The primary
+ "Returns True if the display is the primary display. The primary
display is the one whose index is 0.", "");
display is the one whose index is 0.", "");
DocAStr(GetModes,
"GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]",
"Enumerate all video modes supported by this display matching the given
DocAStr(GetModes,
"GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]",
"Enumerate all video modes supported by this display matching the given
always at least one video mode supported by display, the returned
array is only empty for the default value of the argument if this
function is not supported at all on this platform.", "");
always at least one video mode supported by display, the returned
array is only empty for the default value of the argument if this
function is not supported at all on this platform.", "");
-
- PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode) {
+
+ PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode)
+ {
%#if wxUSE_DISPLAY
PyObject* pyList = NULL;
wxArrayVideoModes arr = self->GetModes(mode);
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
%#if wxUSE_DISPLAY
PyObject* pyList = NULL;
wxArrayVideoModes arr = self->GetModes(mode);
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
- for (int i=0; i < arr.GetCount(); i++) {
+ for (size_t i=0; i < arr.GetCount(); i++)
+ {
wxVideoMode* m = new wxVideoMode(arr.Item(i));
PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true);
PyList_Append(pyList, pyObj);
wxVideoMode* m = new wxVideoMode(arr.Item(i));
PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true);
PyList_Append(pyList, pyObj);
DocStr(GetCurrentMode,
"Get the current video mode.", "");
DocStr(GetCurrentMode,
"Get the current video mode.", "");
- wxVideoMode GetCurrentMode() const {
+ wxVideoMode GetCurrentMode() const
+ {
%#if wxUSE_DISPLAY
return self->GetCurrentMode();
%#else
%#if wxUSE_DISPLAY
return self->GetCurrentMode();
%#else
return wxDefaultVideoMode;
%#endif
}
return wxDefaultVideoMode;
%#endif
}
to the system default by using the system's 'scrn' resource.
Returns True if succeeded, False otherwise", "");
to the system default by using the system's 'scrn' resource.
Returns True if succeeded, False otherwise", "");
-
- bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode) {
+
+ bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode)
+ {
%#if wxUSE_DISPLAY
return self->ChangeMode(mode);
%#else
%#if wxUSE_DISPLAY
return self->ChangeMode(mode);
%#else
DocStr(
ResetMode,
"Restore the default video mode (just a more readable synonym)", "");
DocStr(
ResetMode,
"Restore the default video mode (just a more readable synonym)", "");
%#if wxUSE_DISPLAY
self->ResetMode();
%#else
wxPyRaiseNotImplemented();
%#endif
}
%#if wxUSE_DISPLAY
self->ResetMode();
%#else
wxPyRaiseNotImplemented();
%#endif
}