Commit feff8239 authored by Just van Rossum's avatar Just van Rossum

- "manage" controls created by CreateXxxXxxControl() functions.

- FindControlUnderMouse() returns an existing control, not a new one.
parent 16620a76
This diff is collapsed.
# FindControlUnderMouse() returns an existing control, not a new one,
# so create this one by hand.
f = Function(ExistingControlHandle, 'FindControlUnderMouse',
(Point, 'inWhere', InMode),
(WindowRef, 'inWindow', InMode),
(SInt16, 'outPart', OutMode),
)
functions.append(f)
f = Function(ControlHandle, 'as_Control',
(Handle, 'h', InMode))
functions.append(f)
......@@ -25,3 +34,12 @@ f = ManualGenerator("DisposeControl", DisposeControl_body)
f.docstring = lambda : "() -> None"
methods.append(f)
# All CreateXxxXxxControl() functions return a new object in an output
# parameter; these should however be managed by us (we're creating them
# after all), so set the type to ControlRef.
for f in functions:
if f.name.startswith("Create"):
v = f.argumentList[-1]
if v.type == ExistingControlHandle:
v.type = ControlRef
......@@ -45,6 +45,7 @@ class MyScanner(Scanner):
def makeblacklistnames(self):
return [
'FindControlUnderMouse', # Generated manually, returns an existing control, not a new one.
'DisposeControl', # Generated manually
'KillControls', # Implied by close of dialog
'SetCtlAction',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment