1 # Scan <Menus.h>, generating menugen.py.
3 from scantools
import Scanner
8 defsoutput
= "Menus.py"
9 scanner
= MyScanner(input, output
, defsoutput
)
12 print "=== Done scanning and generating, now doing 'import menusupport' ==="
14 print "=== Done. It's up to you to compile Menumodule.c ==="
16 class MyScanner(Scanner
):
18 def destination(self
, type, name
, arglist
):
19 classname
= "Function"
20 listname
= "functions"
23 if t
== "MenuHandle" and m
== "InMode":
26 return classname
, listname
28 def makeblacklistnames(self
):
32 def makeblacklisttypes(self
):
39 def makerepairinstructions(self
):
41 ([("Str255", "itemString", "InMode")],
42 [("*", "*", "OutMode")]),
44 ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
45 [("InBuffer", "*", "*")]),
47 ([("void", "*", "OutMode"), ("long", "*", "InMode"),
48 ("long", "*", "OutMode")],
49 [("VarVarOutBuffer", "*", "InOutMode")]),
52 if __name__
== "__main__":