-// 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
#include <org/ibex/plat/Darwin$CarbonOpenGL.h>
#include <org/ibex/plat/Darwin$FileDialogHelper.h>
#include <org/ibex/plat/GCJ$Retainer.h>
-#include <org/ibex/HTTP$Proxy.h>
+#include <org/ibex/net/HTTP$Proxy.h>
#include <org/ibex/util/Semaphore.h>
#include <stdlib.h>
};
// CHECKME: Is just making up your own four char codes really correct?
-const static UInt32 kEventClassCarbonMessage = 'ibexa';
-const static UInt32 kEventCarbonMessage = 'ibexb';
-const static UInt32 kEventParamCarbonMessage = 'ibexc';
+const static UInt32 kEventClassCarbonMessage = 'ibxa';
+const static UInt32 kEventCarbonMessage = 'ibxb';
+const static UInt32 kEventParamCarbonMessage = 'ibxc';
static OSStatus carbonMessageEventHandler(EventHandlerCallRef handler, EventRef e, void *userData);
static EventHandlerUPP carbonMessageEventHandlerUPP;
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;
}
}
WC(DisposeWindow)(window);
}
-void Darwin$CarbonSurface::natSetIcon(org::ibex::Picture *_p) {
+void Darwin$CarbonSurface::natSetIcon(org::ibex::graphics::Picture *_p) {
}
void Darwin$CarbonSurface::natSetLocation() {
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;
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; \
} \