X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FDarwin.cc;h=068b766b6b54c34cc4702e59a0b79066fa1bcbff;hb=38786988d12f2c48a314ee37c326965ff0bcadb6;hp=0e0b2a77aa1b3e169a30109635e0517b2fe462ec;hpb=de71be6ed2ac0542abb790006896980b2c2211a8;p=org.ibex.core.git diff --git a/src/org/xwt/plat/Darwin.cc b/src/org/xwt/plat/Darwin.cc index 0e0b2a7..068b766 100644 --- a/src/org/xwt/plat/Darwin.cc +++ b/src/org/xwt/plat/Darwin.cc @@ -28,6 +28,7 @@ #include #include +#include #include "DarwinCarbonHeaders.h" @@ -540,6 +541,15 @@ void Darwin$CarbonSurface::natInit(jboolean framed) { rect.top = 0; rect.left = 0; rect.bottom = 10; rect.right=10; r = CreateNewWindow(wc,attr,&rect,&window); checkStatus(r,"CreateNewWindow"); + + id NSWindowClass = objc_getClass("NSWindow"); + printf("nswindowclass is %x\n", NSWindowClass); + SEL selector = sel_registerName("initWithWindowRef"); + printf("selector is %s\n", selector); + objc_method method = class_getClassMethod(NSWindowClass, selector); + printf("method is %x\n", method); + id windowInstance = objc_msgSend(NSWindowClass, selector, window); + printf("instance is %x\n", windowInstance); GCJ$Retainer::retain(this); // Need to account for the EventHandlers pointer to us EventHandlerUPP upp = NewEventHandlerUPP(our_windowEventHandler);