X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FDarwin.cc;h=068b766b6b54c34cc4702e59a0b79066fa1bcbff;hb=38786988d12f2c48a314ee37c326965ff0bcadb6;hp=716719f412909144ab781be1685a30f68678b958;hpb=6ceff140094edbc5fa919aa17a23c3d00612b458;p=org.ibex.core.git diff --git a/src/org/xwt/plat/Darwin.cc b/src/org/xwt/plat/Darwin.cc index 716719f..068b766 100644 --- a/src/org/xwt/plat/Darwin.cc +++ b/src/org/xwt/plat/Darwin.cc @@ -19,15 +19,16 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #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); @@ -707,9 +717,9 @@ void Darwin::natSetClipBoard(jstring js) { checkStatus(r,"PutScrapFlavor"); } -Proxy *Darwin::natDetectProxy() { - using org::xwt::Proxy; - Proxy *p=0; +HTTP$Proxy *Darwin::natDetectProxy() { + using org::xwt::HTTP$Proxy; + HTTP$Proxy *p=0; CFStringRef string; CFNumberRef number; SmartCFString smartString; @@ -728,7 +738,7 @@ Proxy *Darwin::natDetectProxy() { number = (CFNumberRef) CFDictionaryGetValue(proxyInfo, kSCPropNetProxies ## proto ## Port); \ if(number != NULL && CFGetTypeID(number) != CFNumberGetTypeID()) number = NULL; \ if(string && number && CFNumberGetValue(number,kCFNumberIntType,&i) && i) { \ - if(!p) p = new Proxy(); \ + if(!p) p = new HTTP$Proxy(); \ p->var ## ProxyHost = cfStringToJString(string); \ p->var ## ProxyPort = i; \ } \ @@ -899,7 +909,7 @@ void Darwin$CarbonOpenGL::initSharedContext() { checkStatus(rawSharedContext,"aglCreateContext"); } -void Darwin$GLCarbonDoubleBuffer::natInit() { +void Darwin$GLCarbonPixelBuffer::natInit() { WindowClass wc = kPlainWindowClass; WindowAttributes attr = 0; WindowRef window; @@ -948,19 +958,19 @@ void Darwin$GLCarbonDoubleBuffer::natInit() { rawCTX = (RawData*) ctx; } -void Darwin$GLCarbonDoubleBuffer::activateContext() { +void Darwin$GLCarbonPixelBuffer::activateContext() { AGLContext ctx = (AGLContext) rawCTX; aglSetCurrentContext(ctx); } -void Darwin$GLCarbonDoubleBuffer::natCleanup(RawData* rawWindowRef, RawData* rawCTX) { +void Darwin$GLCarbonPixelBuffer::natCleanup(RawData* rawWindowRef, RawData* rawCTX) { WindowRef window = (WindowRef) rawWindowRef; AGLContext ctx = (AGLContext) rawCTX; aglDestroyContext(ctx); DisposeWindow(window); } -void Darwin$GLCarbonSurface::natBlit(Darwin$GLCarbonDoubleBuffer *db, jint sx1, jint sy1, jint dx1, jint dy1, jint dx2, jint dy2) { +void Darwin$GLCarbonSurface::natBlit(Darwin$GLCarbonPixelBuffer *db, jint sx1, jint sy1, jint dx1, jint dy1, jint dx2, jint dy2) { AGLContext ctx = (AGLContext) rawCTX; int sx2 = sx1 + (dx2-dx1); int sy2 = sy1 + (dy2-dy1);