FS#162 - Add a function to retrieve the system specific handle of a window

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1530 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-07-15 21:13:55 +00:00
parent 028c4d5a96
commit ef8a2700fe
26 changed files with 104 additions and 21 deletions

View file

@ -76,7 +76,7 @@ myOwnsWindow(false)
myDisplay = static_cast<const WindowImplX11*>(owner)->GetDisplay();
// Get the owner window and its device context
myWindow = static_cast<Window>(owner->GetHandle());
myWindow = static_cast<Window>(owner->GetSystemHandle());
// Create the context
if (myWindow)

View file

@ -277,7 +277,7 @@ WindowImplX11::~WindowImplX11()
////////////////////////////////////////////////////////////
WindowHandle WindowImplX11::GetHandle() const
WindowHandle WindowImplX11::GetSystemHandle() const
{
return myWindow;
}

View file

@ -89,7 +89,7 @@ private :
/// \return Handle of the window
///
////////////////////////////////////////////////////////////
virtual WindowHandle GetHandle() const;
virtual WindowHandle GetSystemHandle() const;
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system

View file

@ -71,7 +71,7 @@ myContext (NULL),
myOwnsWindow (false)
{
// Get the owner window and its device context
myWindow = static_cast<HWND>(owner->GetHandle());
myWindow = static_cast<HWND>(owner->GetSystemHandle());
myDeviceContext = GetDC(myWindow);
// Create the context

View file

@ -200,7 +200,7 @@ WindowImplWin32::~WindowImplWin32()
////////////////////////////////////////////////////////////
WindowHandle WindowImplWin32::GetHandle() const
WindowHandle WindowImplWin32::GetSystemHandle() const
{
return myHandle;
}

View file

@ -78,7 +78,7 @@ private :
/// \return Handle of the window
///
////////////////////////////////////////////////////////////
virtual WindowHandle GetHandle() const;
virtual WindowHandle GetSystemHandle() const;
////////////////////////////////////////////////////////////
/// \brief Process incoming events from the operating system

View file

@ -384,6 +384,13 @@ void Window::SetJoystickThreshold(float threshold)
}
////////////////////////////////////////////////////////////
WindowHandle Window::GetSystemHandle() const
{
return myWindow ? myWindow->GetSystemHandle() : 0;
}
////////////////////////////////////////////////////////////
void Window::OnCreate()
{

View file

@ -130,7 +130,7 @@ public :
/// \return Handle of the window
///
////////////////////////////////////////////////////////////
virtual WindowHandle GetHandle() const = 0;
virtual WindowHandle GetSystemHandle() const = 0;
////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor