Add wxThread::MSWGetHandle().
Under MSW a thread has both an ID, returned by wxThread::GetId(), and a handle, which couldn't be retrieved so far. Add an accessor to do it. Closes #16170. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,6 +65,7 @@ wxMSW:
|
|||||||
- Add wxEnhMetaFile::Detach() (Luca Bacci).
|
- Add wxEnhMetaFile::Detach() (Luca Bacci).
|
||||||
- Add support for saving 256*256 32bpp ICOs in PNG format (Artur Wieczorek).
|
- Add support for saving 256*256 32bpp ICOs in PNG format (Artur Wieczorek).
|
||||||
- Keep menu item icon after removing and adding it back (Artur Wieczorek).
|
- Keep menu item icon after removing and adding it back (Artur Wieczorek).
|
||||||
|
- Add wxThread::MSWGetHandle() (troelsk).
|
||||||
|
|
||||||
wxOSX/Cocoa:
|
wxOSX/Cocoa:
|
||||||
|
|
||||||
|
@@ -583,6 +583,11 @@ public:
|
|||||||
// identifies a thread inside a process
|
// identifies a thread inside a process
|
||||||
wxThreadIdType GetId() const;
|
wxThreadIdType GetId() const;
|
||||||
|
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
// Get the internal OS handle
|
||||||
|
WXHANDLE MSWGetHandle() const;
|
||||||
|
#endif // __WINDOWS__
|
||||||
|
|
||||||
wxThreadKind GetKind() const
|
wxThreadKind GetKind() const
|
||||||
{ return m_isDetached ? wxTHREAD_DETACHED : wxTHREAD_JOINABLE; }
|
{ return m_isDetached ? wxTHREAD_DETACHED : wxTHREAD_JOINABLE; }
|
||||||
|
|
||||||
|
@@ -1107,6 +1107,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxThreadIdType GetId() const;
|
wxThreadIdType GetId() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Gets the native thread handle.
|
||||||
|
|
||||||
|
This method only exists in wxMSW, use GetId() in portable code.
|
||||||
|
|
||||||
|
@since 3.1.0
|
||||||
|
*/
|
||||||
|
WXHANDLE MSWGetHandle() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the thread kind as it was given in the ctor.
|
Returns the thread kind as it was given in the ctor.
|
||||||
|
|
||||||
|
@@ -1226,6 +1226,13 @@ unsigned long wxThread::GetId() const
|
|||||||
return (unsigned long)m_internal->GetId();
|
return (unsigned long)m_internal->GetId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WXHANDLE wxThread::MSWGetHandle() const
|
||||||
|
{
|
||||||
|
wxCriticalSectionLocker lock(const_cast<wxCriticalSection &>(m_critsect));
|
||||||
|
|
||||||
|
return m_internal->GetHandle();
|
||||||
|
}
|
||||||
|
|
||||||
bool wxThread::IsRunning() const
|
bool wxThread::IsRunning() const
|
||||||
{
|
{
|
||||||
wxCriticalSectionLocker lock(const_cast<wxCriticalSection &>(m_critsect));
|
wxCriticalSectionLocker lock(const_cast<wxCriticalSection &>(m_critsect));
|
||||||
|
Reference in New Issue
Block a user