Removed the now-obsolete old method of freeing OS X controls.

This commit is contained in:
Pietro Gagliardi 2015-04-17 18:56:17 -04:00
parent 9fae528fd4
commit 6436737720
2 changed files with 0 additions and 15 deletions

View File

@ -230,15 +230,3 @@ void uiDarwinNewControl(uiControl *c, Class class, BOOL inScrollView, BOOL scrol
c->ContainerEnable = singleContainerEnable;
c->ContainerDisable = singleContainerDisable;
}
BOOL uiDarwinControlFreeWhenAppropriate(uiControl *c, NSView *newSuperview)
{
singleView *s = (singleView *) (c->Internal);
if (newSuperview == destroyedControlsView) {
[s->immediate release]; // we don't need the reference anymore
uiFree(s);
return YES;
}
return NO;
}

View File

@ -11,10 +11,7 @@ This file assumes that you have imported <Cocoa/Cocoa.h> and "ui.h" beforehand.
// The second parameter should come from [RealControlType class].
// The two scrollView parameters allow placing scrollbars on the new control.
// The two onDestroy parameters define a function and its parameter to call when the widget is destroyed.
// 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 void uiDarwinNewControl(uiControl *c, Class class, BOOL inScrollView, BOOL scrollViewHasBorder, void (*onDestroy)(void *), void *onDestroyData);
extern BOOL uiDarwinControlFreeWhenAppropriate(uiControl *c, NSView *newSuperview);
// You can use this function from within your control implementations to return text strings that can be freed with uiTextFree().
extern char *uiDarwinNSStringToText(NSString *);