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