diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-07 15:45:00 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-07 15:45:56 -0400 |
| commit | 96e25cf50293d2c8f33bbd4d2578a4e2b63441f9 (patch) | |
| tree | 59e11ab0eeff206f4bbfb1460d44b35e4e5dc7ea /new/window_darwin.m | |
| parent | a013fe638412809fe3dd18f0231d68d1ce469d56 (diff) | |
Added the Mac OS X uiContainer. Added it to uiWindow. Added the Mac OS X coordinate system mirroring to the new control logic. Renamed *_darwin.c to *_darwin.m.
Diffstat (limited to 'new/window_darwin.m')
| -rw-r--r-- | new/window_darwin.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/new/window_darwin.m b/new/window_darwin.m index 30c3a1a..b74714a 100644 --- a/new/window_darwin.m +++ b/new/window_darwin.m @@ -22,6 +22,8 @@ struct uiWindow { NSWindow *w; + uiContainer *container; + uiControl *child; uiWindowDelegate *d; }; @@ -43,6 +45,9 @@ uiWindow *uiNewWindow(char *title, int width, int height) [w->w setTitle:toNSString(title)]; // TODO substitutions + w->container = [[uiContainer alloc] initWithFrame:NSZeroRect]; + [w->w setContentView:((NSView *) w->container)]; + w->d = [uiWindowDelegate new]; w->d.w = w; w->d.onClosing = defaultOnClosing; @@ -79,3 +84,9 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data) w->d.onClosing = f; w->d.onClosingData = data; } + +void uiWindowSetChild(uiWindow *w, uiControl *c) +{ + w->child = c; + (*(w->child->setParent))(w->child, (uintptr_t) (w->container)); +} |
