cleanup - fixed a warning, some typos, and made minor reformatting changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,7 +35,7 @@ struct wxVideoMode
|
|||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
bool , Matches(const wxVideoMode& other) const,
|
bool , Matches(const wxVideoMode& other) const,
|
||||||
"Returns True if this mode matches the other one in the sense that all
|
"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)", "");
|
one (except for refresh which is allowed to have a greater value)", "");
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
@@ -44,8 +44,7 @@ one (except for refresh which is allowed to have a greater value)", "");
|
|||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
int , GetHeight() const,
|
int , GetHeight() const,
|
||||||
"Returns the screen width in pixels (e.g. 640*480), 0 means
|
"Returns the screen height in pixels (e.g. 640*480), 0 means unspecified", "");
|
||||||
unspecified", "");
|
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
int , GetDepth() const,
|
int , GetDepth() const,
|
||||||
@@ -58,7 +57,6 @@ means unspecified/known", "");
|
|||||||
"returns true if the object has been initialized", "");
|
"returns true if the object has been initialized", "");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%pythoncode { def __nonzero__(self): return self.IsOk() }
|
%pythoncode { def __nonzero__(self): return self.IsOk() }
|
||||||
%extend {
|
%extend {
|
||||||
bool __eq__(const wxVideoMode* other) { return other ? (*self == *other) : false; }
|
bool __eq__(const wxVideoMode* other) { return other ? (*self == *other) : false; }
|
||||||
@@ -92,13 +90,11 @@ const wxVideoMode wxDefaultVideoMode;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DocStr(wxDisplay,
|
DocStr(wxDisplay,
|
||||||
"Represents a display/monitor attached to the system", "");
|
"Represents a display/monitor attached to the system", "");
|
||||||
class wxDisplay
|
class wxDisplay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//
|
|
||||||
DocCtorStr(
|
DocCtorStr(
|
||||||
wxDisplay(size_t index = 0),
|
wxDisplay(size_t index = 0),
|
||||||
"Set up a Display instance with the specified display. The displays
|
"Set up a Display instance with the specified display. The displays
|
||||||
@@ -111,16 +107,15 @@ and the only one which is always supported", "");
|
|||||||
static size_t , GetCount(),
|
static size_t , GetCount(),
|
||||||
"Return the number of available displays.", "");
|
"Return the number of available displays.", "");
|
||||||
|
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
static int , GetFromPoint(const wxPoint& pt),
|
static int , GetFromPoint(const wxPoint& pt),
|
||||||
"Find the display where the given point lies, return wx.NOT_FOUND if it
|
"Find the display where the given point lies, return wx.NOT_FOUND if it
|
||||||
doesn't belong to any display", "");
|
doesn't belong to any display", "");
|
||||||
|
|
||||||
|
|
||||||
DocStr(GetFromWindow,
|
DocStr(GetFromWindow,
|
||||||
"Find the display where the given window lies, return wx.NOT_FOUND if
|
"Find the display where the given window lies, return wx.NOT_FOUND if
|
||||||
it is not shown at all.", "");
|
it is not shown at all.", "");
|
||||||
|
|
||||||
static int GetFromWindow(wxWindow *window);
|
static int GetFromWindow(wxWindow *window);
|
||||||
|
|
||||||
|
|
||||||
@@ -129,32 +124,28 @@ it is not shown at all.", "");
|
|||||||
"Return true if the object was initialized successfully", "");
|
"Return true if the object was initialized successfully", "");
|
||||||
%pythoncode { def __nonzero__(self): return self.IsOk() }
|
%pythoncode { def __nonzero__(self): return self.IsOk() }
|
||||||
|
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
wxRect , GetGeometry() const,
|
wxRect , GetGeometry() const,
|
||||||
"Returns the bounding rectangle of the display whose index was passed
|
"Returns the bounding rectangle of the display whose index was passed
|
||||||
to the constructor.", "");
|
to the constructor.", "");
|
||||||
|
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
wxRect , GetClientArea() const,
|
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(
|
DocDeclStr(
|
||||||
wxString , GetName() const,
|
wxString , GetName() const,
|
||||||
"Returns the display's name. A name is not available on all platforms.", "");
|
"Returns the display's name. A name is not available on all platforms.", "");
|
||||||
|
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
bool , IsPrimary() const,
|
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.", "");
|
||||||
|
|
||||||
|
|
||||||
|
%extend
|
||||||
%extend {
|
{
|
||||||
DocAStr(GetModes,
|
DocAStr(GetModes,
|
||||||
"GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]",
|
"GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]",
|
||||||
"Enumerate all video modes supported by this display matching the given
|
"Enumerate all video modes supported by this display matching the given
|
||||||
@@ -165,13 +156,15 @@ always at least one video mode supported by display, the returned
|
|||||||
array is only empty for the default value of the argument if this
|
array is only empty for the default value of the argument if this
|
||||||
function is not supported at all on this platform.", "");
|
function is not supported at all on this platform.", "");
|
||||||
|
|
||||||
PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode) {
|
PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode)
|
||||||
|
{
|
||||||
%#if wxUSE_DISPLAY
|
%#if wxUSE_DISPLAY
|
||||||
PyObject* pyList = NULL;
|
PyObject* pyList = NULL;
|
||||||
wxArrayVideoModes arr = self->GetModes(mode);
|
wxArrayVideoModes arr = self->GetModes(mode);
|
||||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||||
pyList = PyList_New(0);
|
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));
|
wxVideoMode* m = new wxVideoMode(arr.Item(i));
|
||||||
PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true);
|
PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true);
|
||||||
PyList_Append(pyList, pyObj);
|
PyList_Append(pyList, pyObj);
|
||||||
@@ -187,7 +180,8 @@ function is not supported at all on this platform.", "");
|
|||||||
|
|
||||||
DocStr(GetCurrentMode,
|
DocStr(GetCurrentMode,
|
||||||
"Get the current video mode.", "");
|
"Get the current video mode.", "");
|
||||||
wxVideoMode GetCurrentMode() const {
|
wxVideoMode GetCurrentMode() const
|
||||||
|
{
|
||||||
%#if wxUSE_DISPLAY
|
%#if wxUSE_DISPLAY
|
||||||
return self->GetCurrentMode();
|
return self->GetCurrentMode();
|
||||||
%#else
|
%#else
|
||||||
@@ -216,7 +210,8 @@ to the system default by using the system's 'scrn' resource.
|
|||||||
|
|
||||||
Returns True if succeeded, False otherwise", "");
|
Returns True if succeeded, False otherwise", "");
|
||||||
|
|
||||||
bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode) {
|
bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode)
|
||||||
|
{
|
||||||
%#if wxUSE_DISPLAY
|
%#if wxUSE_DISPLAY
|
||||||
return self->ChangeMode(mode);
|
return self->ChangeMode(mode);
|
||||||
%#else
|
%#else
|
||||||
@@ -226,11 +221,11 @@ Returns True if succeeded, False otherwise", "");
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DocStr(
|
DocStr(
|
||||||
ResetMode,
|
ResetMode,
|
||||||
"Restore the default video mode (just a more readable synonym)", "");
|
"Restore the default video mode (just a more readable synonym)", "");
|
||||||
void ResetMode() {
|
void ResetMode()
|
||||||
|
{
|
||||||
%#if wxUSE_DISPLAY
|
%#if wxUSE_DISPLAY
|
||||||
self->ResetMode();
|
self->ResetMode();
|
||||||
%#else
|
%#else
|
||||||
|
Reference in New Issue
Block a user