More of the previous commit. More TODOs.
This commit is contained in:
parent
c610c60ea6
commit
4afca8f2c2
|
@ -5,6 +5,7 @@
|
||||||
- deleted objects view
|
- deleted objects view
|
||||||
- assign control IDs on windows
|
- assign control IDs on windows
|
||||||
- GWL(P)_ID
|
- GWL(P)_ID
|
||||||
|
- make sure all terminology is consistent
|
||||||
|
|
||||||
ultimately:
|
ultimately:
|
||||||
- make everything vtable-based
|
- make everything vtable-based
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
// we are not in control of the actual lifetimes and refcounts of NSViews (see http://stackoverflow.com/a/29523141/3408572)
|
// we are not in control of the actual lifetimes and refcounts of NSViews (see http://stackoverflow.com/a/29523141/3408572)
|
||||||
// when we're done with a view, it'll be added as a subview of this one, and this one will be released on application shutdown
|
// when we're done with a view, it'll be added as a subview of this one, and this one will be released on application shutdown
|
||||||
// we need this separate view because it's possible for controls to have no parent but still be alive
|
// we need this separate view because it's possible for controls to have no parent but still be alive
|
||||||
NSView *deletedControlsView;
|
NSView *destroyedControlsView;
|
||||||
|
|
||||||
uiInitOptions options;
|
uiInitOptions options;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ const char *uiInit(uiInitOptions *o)
|
||||||
[NSApp setDelegate:[uiAppDelegate new]];
|
[NSApp setDelegate:[uiAppDelegate new]];
|
||||||
|
|
||||||
// we can use a stock NSView for this
|
// we can use a stock NSView for this
|
||||||
deletedControlsView = [[NSView alloc] initWithFrame:NSZeroRect];
|
destroyedControlsView = [[NSView alloc] initWithFrame:NSZeroRect];
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ static void singleDestroy(uiControl *c)
|
||||||
{
|
{
|
||||||
singleView *s = (singleView *) (c->internal);
|
singleView *s = (singleView *) (c->internal);
|
||||||
|
|
||||||
[deletedControlsView addSubview:s->immediate];
|
[destroyedControlsView addSubview:s->immediate];
|
||||||
}
|
}
|
||||||
|
|
||||||
static uintptr_t singleHandle(uiControl *c)
|
static uintptr_t singleHandle(uiControl *c)
|
||||||
|
@ -117,7 +117,7 @@ BOOL uiDarwinControlFreeWhenAppropriate(uiControl *c, NSView *newSuperview)
|
||||||
{
|
{
|
||||||
singleView *s = (singleView *) (c->internal);
|
singleView *s = (singleView *) (c->internal);
|
||||||
|
|
||||||
if (newSuperview == deletedControlsView) {
|
if (newSuperview == destroyedControlsView) {
|
||||||
[s->immediate release]; // we don't need the reference anymore
|
[s->immediate release]; // we don't need the reference anymore
|
||||||
uiFree(s);
|
uiFree(s);
|
||||||
uiFree(c);
|
uiFree(c);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// init_darwin.m
|
// init_darwin.m
|
||||||
extern NSView *deletedControlsView;
|
extern NSView *destroyedControlsView;
|
||||||
|
|
||||||
// util_darwin.m
|
// util_darwin.m
|
||||||
extern void setStandardControlFont(NSControl *);
|
extern void setStandardControlFont(NSControl *);
|
||||||
|
|
Loading…
Reference in New Issue