#include <org/xwt/util/Semaphore.h>
#include <stdlib.h>
+#include <objc/objc.h>
#include "DarwinCarbonHeaders.h"
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);