1 # Scan <Controls.h>, generating ctlgen.py.
3 from scantools
import Scanner
8 defsoutput
= "Controls.py"
9 scanner
= MyScanner(input, output
, defsoutput
)
12 print "=== Done scanning and generating, now doing 'import ctlsupport' ==="
14 print "=== Done. It's up to you to compile Ctlmodule.c ==="
16 class MyScanner(Scanner
):
18 def destination(self
, type, name
, arglist
):
19 classname
= "Function"
20 listname
= "functions"
23 if t
== "ControlHandle" and m
== "InMode":
26 return classname
, listname
28 def makeblacklistnames(self
):
30 'DisposeControl' # Implied by deletion of control object
31 'KillControls', # Implied by close of dialog
35 def makeblacklisttypes(self
):
42 def makerepairinstructions(self
):
44 ([("void_ptr", "*", "InMode"), ("long", "*", "InMode")],
45 [("InBuffer", "*", "*")]),
47 ([("void", "*", "OutMode"), ("long", "*", "InMode"),
48 ("long", "*", "OutMode")],
49 [("VarVarOutBuffer", "*", "InOutMode")]),
52 ([("ProcPtr", "actionProc", "InMode")],
53 [("FakeType('(ControlActionUPP)0')", "*", "*")]),
55 ([("ControlHandle", "*", "OutMode")],
56 [("ExistingControlHandle", "*", "*")]),
59 if __name__
== "__main__":