Added wxWakeUpMainThread, wxMutexGuiEnter, wxMutexGuiLeave,
wxMutexGuiLocker and wxThread_IsMain to assist with dealing with GUI access from non-GUI threads. wxPyOnDemandOutputWindow is now thread safe if non-GUI threads use print, sys.stdout.write, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -162,6 +162,23 @@ class wxWindowDisabler(wxWindowDisablerPtr):
|
||||
|
||||
|
||||
|
||||
class wxMutexGuiLockerPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,misc2c=misc2c):
|
||||
if self.thisown == 1 :
|
||||
misc2c.delete_wxMutexGuiLocker(self)
|
||||
def __repr__(self):
|
||||
return "<C wxMutexGuiLocker instance at %s>" % (self.this,)
|
||||
class wxMutexGuiLocker(wxMutexGuiLockerPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(misc2c.new_wxMutexGuiLocker,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxTipProviderPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -716,11 +733,19 @@ wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime
|
||||
|
||||
wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime
|
||||
|
||||
wxSafeYield = misc2c.wxSafeYield
|
||||
|
||||
wxPostEvent = misc2c.wxPostEvent
|
||||
|
||||
wxWakeUpIdle = misc2c.wxWakeUpIdle
|
||||
|
||||
wxSafeYield = misc2c.wxSafeYield
|
||||
wxWakeUpMainThread = misc2c.wxWakeUpMainThread
|
||||
|
||||
wxMutexGuiEnter = misc2c.wxMutexGuiEnter
|
||||
|
||||
wxMutexGuiLeave = misc2c.wxMutexGuiLeave
|
||||
|
||||
wxThread_IsMain = misc2c.wxThread_IsMain
|
||||
|
||||
wxShowTip = misc2c.wxShowTip
|
||||
|
||||
|
Reference in New Issue
Block a user