// FIXME: unframed windows should appear in the window menu
// This probably needs a hack similar to whats in Cocoa.mm
WindowAttributes attr = kWindowStandardHandlerAttribute|
- (framed ? kWindowInWindowMenuAttribute|kWindowStandardDocumentAttributes|kWindowLiveResizeAttribute : 0);
+ (framed ? kWindowInWindowMenuAttribute|kWindowStandardDocumentAttributes|kWindowLiveResizeAttribute : 0);
OSStatus r;
rect.top = 0; rect.left = 0; rect.bottom = 300; rect.right=300;
EventHandlerUPP upp = WC(NewEventHandlerUPP)(our_windowEventHandler);
WindowDefSpec myCustomWindowSpec;
myCustomWindowSpec.defType = kWindowDefObjectClass;
myCustomWindowSpec.u.classRef = customWindow;
+
r = WC(CreateCustomWindow) (&myCustomWindowSpec,
- kDocumentWindowClass,
- kWindowStandardHandlerAttribute | kWindowStandardDocumentAttributes,
- &rect,
- &window);
+ kDocumentWindowClass,
+ kWindowStandardHandlerAttribute | kWindowStandardDocumentAttributes,
+ &rect,
+ &window);
+ //r = CreateNewWindow(kDocumentWindowClass, attr, &rect, &window);
Darwin$CarbonSurface* me = this;
WC(SetWindowProperty) (window, 'XWT!', 'XWT!', sizeof(me), &me);
checkStatus(r,"WC(CreateNewWindow)");
void Darwin$CarbonSurface::natSetIcon(org::xwt::Picture *_p) {
}
-void Darwin$CarbonSurface::natSetLocation(jint x, jint y) {
+void Darwin$CarbonSurface::natSetLocation() {
WindowRef window = (WindowRef) rawWindowRef;
Rect rect;
+ jint x = root->x;
+ jint y = root->y;
OSStatus r = WC(GetWindowBounds)(window,kWindowStructureRgn,&rect);
checkStatus(r,"WC(GetWindowBounds)");
rect.bottom = y + (rect.bottom - rect.top);
WC(CFRelease)(url);
}
-void Darwin::_exit() {
- WC(QuitApplicationEventLoop)();
-}
-
void Darwin::natInit() {
OSStatus r;
#ifdef XWT_CARBON_NO_BUNDLE_HACK
#endif
}
-void Darwin::_running() {
+void Darwin::runApplicationEventLoop() {
WC(RunApplicationEventLoop)();
WC(ExitToShell)();
}