Forráskód Böngészése

Fixed NSActiveGadget() casting to int.

woollybah 11 éve
szülő
commit
4ff6fd8307
2 módosított fájl, 8 hozzáadás és 6 törlés
  1. 7 5
      cocoamaxgui.mod/cocoa.macos.m
  2. 1 1
      cocoamaxgui.mod/cocoagui.bmx

+ 7 - 5
cocoamaxgui.mod/cocoa.macos.m

@@ -45,6 +45,7 @@ ArrayCursor arrCursors[5] =
 
 
 // End of Cursor Stuff
 // End of Cursor Stuff
 
 
+void* NSActiveGadget();
 
 
 void brl_event_EmitEvent( BBObject *event );
 void brl_event_EmitEvent( BBObject *event );
 BBObject *maxgui_maxgui_HotKeyEvent( int key,int mods );
 BBObject *maxgui_maxgui_HotKeyEvent( int key,int mods );
@@ -2329,19 +2330,19 @@ void NSEnd(){
 	[GlobalApp release];
 	[GlobalApp release];
 }
 }
 
 
-int NSActiveGadget(){
+void* NSActiveGadget(){
 	NSWindow	*window;
 	NSWindow	*window;
 	NSResponder *responder;
 	NSResponder *responder;
 	window=[NSApp keyWindow];
 	window=[NSApp keyWindow];
 	if (!window) return 0;
 	if (!window) return 0;
 	responder=[window firstResponder];
 	responder=[window firstResponder];
-	if (!responder) return (int)window;
+	if (!responder) return window;
 	if ([responder isKindOfClass:[NSTextView class]] && 
 	if ([responder isKindOfClass:[NSTextView class]] && 
    		[window fieldEditor:NO forObject:nil] != nil ) { 
    		[window fieldEditor:NO forObject:nil] != nil ) { 
 			NSTextView *view=(NSTextView*)responder;
 			NSTextView *view=(NSTextView*)responder;
-			return (int)[view delegate];
+			return [view delegate];
 		}
 		}
-	return (int)responder;
+	return responder;
 }
 }
 
 
 void NSInitGadget(nsgadget *gadget){
 void NSInitGadget(nsgadget *gadget){
@@ -3777,7 +3778,7 @@ void NSAddItem(nsgadget *gadget,int index,BBString *data,BBString *tip,NSImage *
 			[item setTag:0];
 			[item setTag:0];
 			[GlobalApp addToolbarItem:item];
 			[GlobalApp addToolbarItem:item];
 			[toolbar addToolbarItem:item];
 			[toolbar addToolbarItem:item];
-			[toolbar insertItemWithItemIdentifier:text atIndex:index];								
+			[toolbar insertItemWithItemIdentifier:text atIndex:index];		
 		}
 		}
 		break;
 		break;
 	}
 	}
@@ -4362,6 +4363,7 @@ struct bbpixmap{
 // pixmap
 // pixmap
 	unsigned char *pixels;
 	unsigned char *pixels;
 	int		width,height,pitch,format,capacity;
 	int		width,height,pitch,format,capacity;
+	void *source;
 };
 };
 
 
 
 

+ 1 - 1
cocoamaxgui.mod/cocoagui.bmx

@@ -23,7 +23,7 @@ Extern
 	' create
 	' create
 	Function NSInitGadget(gadget:TNSGadget)
 	Function NSInitGadget(gadget:TNSGadget)
 	' generic
 	' generic
-	Function NSActiveGadget()
+	Function NSActiveGadget:Byte Ptr()
 	Function NSFreeGadget(gadget:TNSGadget)
 	Function NSFreeGadget(gadget:TNSGadget)
 	Function NSClientWidth(gadget:TNSGadget)
 	Function NSClientWidth(gadget:TNSGadget)
 	Function NSClientHeight(gadget:TNSGadget)
 	Function NSClientHeight(gadget:TNSGadget)