mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Use stdwinevents instead of stdwinsupport.
This commit is contained in:
parent
fc8e0d980f
commit
a4ddbd885e
2 changed files with 10 additions and 2 deletions
|
@ -5,8 +5,10 @@
|
||||||
# The mainloop() function here is an event dispatcher for all window types.
|
# The mainloop() function here is an event dispatcher for all window types.
|
||||||
|
|
||||||
import stdwin
|
import stdwin
|
||||||
import stdwinsupport
|
from stdwinevents import *
|
||||||
|
|
||||||
|
# XXX Old version of stdwinevents, should go
|
||||||
|
import stdwinsupport
|
||||||
S = stdwinsupport # Shorthand
|
S = stdwinsupport # Shorthand
|
||||||
|
|
||||||
windows = [] # List of open windows
|
windows = [] # List of open windows
|
||||||
|
@ -75,6 +77,8 @@ def treatevent(e): # Handle a stdwin event
|
||||||
w.move(w)
|
w.move(w)
|
||||||
elif type = S.we_timer:
|
elif type = S.we_timer:
|
||||||
w.timer(w)
|
w.timer(w)
|
||||||
|
elif type = WE_CLOSE:
|
||||||
|
w.close(w)
|
||||||
|
|
||||||
def treatcommand(w, type): # Handle a we_command event
|
def treatcommand(w, type): # Handle a we_command event
|
||||||
if type = S.wc_close:
|
if type = S.wc_close:
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
# The mainloop() function here is an event dispatcher for all window types.
|
# The mainloop() function here is an event dispatcher for all window types.
|
||||||
|
|
||||||
import stdwin
|
import stdwin
|
||||||
import stdwinsupport
|
from stdwinevents import *
|
||||||
|
|
||||||
|
# XXX Old version of stdwinevents, should go
|
||||||
|
import stdwinsupport
|
||||||
S = stdwinsupport # Shorthand
|
S = stdwinsupport # Shorthand
|
||||||
|
|
||||||
windows = [] # List of open windows
|
windows = [] # List of open windows
|
||||||
|
@ -75,6 +77,8 @@ def treatevent(e): # Handle a stdwin event
|
||||||
w.move(w)
|
w.move(w)
|
||||||
elif type = S.we_timer:
|
elif type = S.we_timer:
|
||||||
w.timer(w)
|
w.timer(w)
|
||||||
|
elif type = WE_CLOSE:
|
||||||
|
w.close(w)
|
||||||
|
|
||||||
def treatcommand(w, type): # Handle a we_command event
|
def treatcommand(w, type): # Handle a we_command event
|
||||||
if type = S.wc_close:
|
if type = S.wc_close:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue