X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fplat%2FDarwin.cc;h=a35ba3ae0311a11c2b107e31fb48e82b3d5793b1;hb=6eaf54fa906754ce35a7db0e8207fc6bbde5464d;hp=7adf0eed4b48049c36c5bd41f55389343e00a136;hpb=3591b88b94a6bb378af3d4abe6eb5233ce583104;p=org.ibex.core.git diff --git a/src/org/ibex/plat/Darwin.cc b/src/org/ibex/plat/Darwin.cc index 7adf0ee..a35ba3a 100644 --- a/src/org/ibex/plat/Darwin.cc +++ b/src/org/ibex/plat/Darwin.cc @@ -1,4 +1,7 @@ -// Copyright 2003 Adam Megacz, see the COPYING file for licensing [LGPL] +// Copyright 2000-2005 the Contributors, as shown in the revision logs. +// Licensed under the GNU General Public License version 2 ("the License"). +// You may not use this file except in compliance with the License. + // Authors: Brian Alliet and Evan Jones #ifndef __APPLE_CC__ #define FSF_GCC @@ -24,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -587,11 +590,12 @@ static OSStatus windowEventHandler(EventHandlerCallRef handler, EventRef e, void SInt32 delta; r = WC(GetEventParameter)(e,kEventParamMouseWheelAxis,typeMouseWheelAxis,NULL,sizeof(axis),NULL,&axis); checkStatus(r,"GetEventParameter"); - if(axis != kEventMouseWheelAxisY) break; r = WC(GetEventParameter)(e,kEventParamMouseWheelDelta,typeSInt32,NULL,sizeof(delta),NULL,&delta); checkStatus(r,"GetEventParameter"); - fprintf(stderr,"kEventMouseWheelMoved: delta: %d",delta); - // surface->MouseWheelMoved(...) IMPROVMENT: mouse wheel support in ibex + switch(axis) { + case kEventMouseWheelAxisX: surface->HScroll((jint)(40 * delta)); break; + case kEventMouseWheelAxisY: surface->VScroll((jint)(40 * delta)); break; + } return noErr; } } @@ -739,7 +743,7 @@ void Darwin$CarbonSurface::natDispose() { WC(DisposeWindow)(window); } -void Darwin$CarbonSurface::natSetIcon(org::ibex::Picture *_p) { +void Darwin$CarbonSurface::natSetIcon(org::ibex::graphics::Picture *_p) { } void Darwin$CarbonSurface::natSetLocation() { @@ -888,9 +892,8 @@ void Darwin::natSetClipBoard(jstring js) { checkStatus(r,"PutScrapFlavor"); } -HTTP$Proxy *Darwin::natDetectProxy() { - using org::ibex::HTTP$Proxy; - HTTP$Proxy *p=0; +org::ibex::net::HTTP$Proxy *Darwin::natDetectProxy() { + org::ibex::net::HTTP$Proxy *p=0; CFStringRef string; CFNumberRef number; SmartCFString smartString; @@ -909,7 +912,7 @@ HTTP$Proxy *Darwin::natDetectProxy() { number = (CFNumberRef) WC(CFDictionaryGetValue)(proxyInfo, kSCPropNetProxies ## proto ## Port); \ if(number != NULL && WC(CFGetTypeID)(number) != WC(CFNumberGetTypeID)()) number = NULL; \ if(string && number && WC(CFNumberGetValue)(number,kCFNumberIntType,&i) && i) { \ - if(!p) p = new HTTP$Proxy(); \ + if(!p) p = new org::ibex::net::HTTP$Proxy(); \ p->var ## ProxyHost = cfStringToJString(string); \ p->var ## ProxyPort = i; \ } \