mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
For reasons unknown these files were never checked in to CVS.
This commit is contained in:
parent
8368453249
commit
cd219d5efd
3 changed files with 213 additions and 0 deletions
24
Mac/Demo/calldll/samplecalldll.py
Normal file
24
Mac/Demo/calldll/samplecalldll.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Test calldll. Tell the user how often menus flash, and let her change it.
|
||||
#
|
||||
|
||||
import calldll
|
||||
import sys
|
||||
|
||||
# Obtain a reference to the library with the toolbox calls
|
||||
interfacelib = calldll.getlibrary('InterfaceLib')
|
||||
|
||||
# Get the routines we need (see LowMem.h for details)
|
||||
LMGetMenuFlash = calldll.newcall(interfacelib.LMGetMenuFlash, 'Short')
|
||||
LMSetMenuFlash = calldll.newcall(interfacelib.LMSetMenuFlash, 'None', 'InShort')
|
||||
|
||||
print "Menus currently flash",LMGetMenuFlash(),"times."
|
||||
print "How often would you like them to flash?",
|
||||
|
||||
# Note: we use input(), so you can try passing non-integer objects
|
||||
newflash = input()
|
||||
LMSetMenuFlash(newflash)
|
||||
|
||||
print "Okay, menus now flash", LMGetMenuFlash(),"times."
|
||||
|
||||
sys.exit(1) # So the window stays on-screen
|
||||
Loading…
Add table
Add a link
Reference in a new issue