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:
parent
028c4d5a96
commit
ef8a2700fe
26 changed files with 104 additions and 21 deletions
|
@ -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)
|
||||
|
|
|
@ -277,7 +277,7 @@ WindowImplX11::~WindowImplX11()
|
|||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
WindowHandle WindowImplX11::GetHandle() const
|
||||
WindowHandle WindowImplX11::GetSystemHandle() const
|
||||
{
|
||||
return myWindow;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -200,7 +200,7 @@ WindowImplWin32::~WindowImplWin32()
|
|||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
WindowHandle WindowImplWin32::GetHandle() const
|
||||
WindowHandle WindowImplWin32::GetSystemHandle() const
|
||||
{
|
||||
return myHandle;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -384,6 +384,13 @@ void Window::SetJoystickThreshold(float threshold)
|
|||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
WindowHandle Window::GetSystemHandle() const
|
||||
{
|
||||
return myWindow ? myWindow->GetSystemHandle() : 0;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void Window::OnCreate()
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue