From 1e93d59553cb4590af25ab23eea111e5113b7440 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun, 11 Feb 2007 00:13:22 +0000
Subject: [PATCH] changed GetFromWindow() to take const pointer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/display.tex | 2 +-
 include/wx/display.h      | 2 +-
 include/wx/display_impl.h | 2 +-
 src/common/dpycmn.cpp     | 4 ++--
 src/msw/display.cpp       | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/docs/latex/wx/display.tex b/docs/latex/wx/display.tex
index 87723079c6..47047a8b6a 100644
--- a/docs/latex/wx/display.tex
+++ b/docs/latex/wx/display.tex
@@ -106,7 +106,7 @@ Returns the index of the display on which the given point lies.  Returns
 
 \membersection{wxDisplay::GetFromWindow}\label{wxdisplaygetfromwindow}
 
-\func{static int}{GetFromWindow}{\param{wxWindow* }{win}}
+\func{static int}{GetFromWindow}{\param{const wxWindow* }{win}}
 
 Returns the index of the display on which the given window lies.
 
diff --git a/include/wx/display.h b/include/wx/display.h
index e31ee3286a..eea6bbb7f6 100644
--- a/include/wx/display.h
+++ b/include/wx/display.h
@@ -62,7 +62,7 @@ public:
 
     // find the display where the given window lies, return wxNOT_FOUND if it
     // is not shown at all
-    static int GetFromWindow(wxWindow *window);
+    static int GetFromWindow(const wxWindow *window);
 
 
     // return true if the object was initialized successfully
diff --git a/include/wx/display_impl.h b/include/wx/display_impl.h
index 07eae9a753..4fedb1ffcb 100644
--- a/include/wx/display_impl.h
+++ b/include/wx/display_impl.h
@@ -37,7 +37,7 @@ public:
     // return the display for the given window or wxNOT_FOUND
     //
     // the window pointer must not be NULL (i.e. caller should check it)
-    virtual int GetFromWindow(wxWindow *window);
+    virtual int GetFromWindow(const wxWindow *window);
 };
 
 // ----------------------------------------------------------------------------
diff --git a/src/common/dpycmn.cpp b/src/common/dpycmn.cpp
index fe867c595d..e728d1b885 100644
--- a/src/common/dpycmn.cpp
+++ b/src/common/dpycmn.cpp
@@ -145,7 +145,7 @@ wxDisplay::~wxDisplay()
     return Factory().GetFromPoint(pt);
 }
 
-/* static */ int wxDisplay::GetFromWindow(wxWindow *window)
+/* static */ int wxDisplay::GetFromWindow(const wxWindow *window)
 {
     wxCHECK_MSG( window, wxNOT_FOUND, _T("invalid window") );
 
@@ -235,7 +235,7 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode)
 // wxDisplayFactory implementation
 // ============================================================================
 
-int wxDisplayFactory::GetFromWindow(wxWindow *window)
+int wxDisplayFactory::GetFromWindow(const wxWindow *window)
 {
     // consider that the window belongs to the display containing its centre
     const wxRect r(window->GetRect());
diff --git a/src/msw/display.cpp b/src/msw/display.cpp
index afd5d732ba..37c98d45a7 100644
--- a/src/msw/display.cpp
+++ b/src/msw/display.cpp
@@ -223,7 +223,7 @@ public:
 
     virtual unsigned GetCount() { return unsigned(m_displays.size()); }
     virtual int GetFromPoint(const wxPoint& pt);
-    virtual int GetFromWindow(wxWindow *window);
+    virtual int GetFromWindow(const wxWindow *window);
 
 protected:
     // ctor checks if the current system supports multimon API and dynamically
@@ -573,7 +573,7 @@ int wxDisplayFactoryWin32Base::GetFromPoint(const wxPoint& pt)
                                                        MONITOR_DEFAULTTONULL));
 }
 
-int wxDisplayFactoryWin32Base::GetFromWindow(wxWindow *window)
+int wxDisplayFactoryWin32Base::GetFromWindow(const wxWindow *window)
 {
     return FindDisplayFromHMONITOR(gs_MonitorFromWindow(GetHwndOf(window),
                                                         MONITOR_DEFAULTTONULL));
-- 
2.50.0

