bugfix in url parsing for HTTP.java
[org.ibex.core.git] / src / org / ibex / plat / Darwin.cc
index 7adf0ee..4a3eea6 100644 (file)
@@ -24,7 +24,7 @@
 #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>
@@ -587,11 +587,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 +740,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 +889,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 +909,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;                                                   \
         }                                                                                  \