blob: 3a5bb5c4a125f0f12bcad1f1008ebd6b3d802baf [file] [log] [blame]
Jack Jansencd219d51999-03-17 21:44:07 +00001#
2# Test calldll. Tell the user how often menus flash, and let her change it.
3#
4
5import calldll
6import sys
7
8# Obtain a reference to the library with the toolbox calls
9interfacelib = calldll.getlibrary('InterfaceLib')
10
11# Get the routines we need (see LowMem.h for details)
12LMGetMenuFlash = calldll.newcall(interfacelib.LMGetMenuFlash, 'Short')
13LMSetMenuFlash = calldll.newcall(interfacelib.LMSetMenuFlash, 'None', 'InShort')
14
15print "Menus currently flash",LMGetMenuFlash(),"times."
16print "How often would you like them to flash?",
17
18# Note: we use input(), so you can try passing non-integer objects
19newflash = input()
20LMSetMenuFlash(newflash)
21
22print "Okay, menus now flash", LMGetMenuFlash(),"times."
23
24sys.exit(1) # So the window stays on-screen