diff options
Diffstat (limited to 'new/ui_darwin.h')
| -rw-r--r-- | new/ui_darwin.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/new/ui_darwin.h b/new/ui_darwin.h index e898c10..f94261a 100644 --- a/new/ui_darwin.h +++ b/new/ui_darwin.h @@ -10,8 +10,9 @@ This file assumes that you have imported <Cocoa/Cocoa.h> and "ui.h" beforehand. // uiDarwinNewControl() creates a new uiControl with the given Cocoa control inside. // The first parameter should come from [RealControlType class]. // The two scrollView parameters allow placing scrollbars on the new control. -// Your control must call uiDarwinControlFree() on the returned uiControl in its -[dealloc] method. +// Your control must call uiDarwinControlFreeWhenAppropriate() on the returned uiControl in its -[viewDidMoveToSuperview] method. +// If it returns a value other than NO, then the uiControl has been freed and you should set references to it to NULL. extern uiControl *uiDarwinNewControl(Class class, BOOL inScrollView, BOOL scrollViewHasBorder); -extern void uiDarwinControlFree(uiControl *); +extern BOOL uiDarwinControlFreeWhenAppropriate(uiControl *c, NSView *newSuperview); #endif |
