2
0
woollybah 7 жил өмнө
parent
commit
2e9fe53b27

+ 8 - 8
system.mod/driver.bmx

@@ -1,21 +1,21 @@
 
-Strict
+SuperStrict
 
 Type TSystemDriver
 
 	Method Poll() Abstract
 	Method Wait() Abstract
 	
-	Method MoveMouse( x,y ) Abstract
-	Method SetMouseVisible( visible ) Abstract
+	Method MoveMouse( x:Int,y:Int ) Abstract
+	Method SetMouseVisible( visible:Int ) Abstract
 	
-	Method Notify( text$,serious ) Abstract
-	Method Confirm( text$,serious ) Abstract
-	Method Proceed( text$,serious ) Abstract
-	Method RequestFile$( text$,exts$,save,file$ ) Abstract
+	Method Notify( text$,serious:Int ) Abstract
+	Method Confirm:Int( text$,serious:Int ) Abstract
+	Method Proceed:Int( text$,serious:Int ) Abstract
+	Method RequestFile$( text$,exts$,save:Int,file$ ) Abstract
 	Method RequestDir$( text$,path$ ) Abstract
 
-	Method OpenURL( url$ ) Abstract	
+	Method OpenURL:Int( url$ ) Abstract	
 
 	Method DesktopWidth:Int() Abstract
 	Method DesktopHeight:Int() Abstract

+ 16 - 16
systemdefault.mod/system.linux.bmx

@@ -1,4 +1,4 @@
-Strict
+SuperStrict
 
 ?Not android
 
@@ -17,15 +17,15 @@ Function bbSystemStartup()
 Function bbSystemPoll()
 Function bbSystemWait()
 
-Function bbSetMouseVisible(visible)
-Function bbMoveMouse(x,y)
+Function bbSetMouseVisible(visible:Int)
+Function bbMoveMouse(x:Int,y:Int)
 Function bbSystemDisplay()
 Function bbSystemEventHandler( callback(xevent:Byte Ptr) )
 
-Function bbSystemPostSyncOp( syncOp( syncInfo:Object,asyncRet ),syncInfo:Object,asyncRet )
-Function bbSystemStartAsyncOp( asyncOp( asyncInfo ),asyncInfo,syncOp( syncInfo:Object,asyncRet ),syncInfo:Object )
+Function bbSystemPostSyncOp( syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object,asyncRet:Int )
+Function bbSystemStartAsyncOp( asyncOp( asyncInfo:Int ),asyncInfo:Int,syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object )
 
-Function bbSystemAsyncFD()
+Function bbSystemAsyncFD:Int()
 Function bbSystemFlushAsyncOps()
 
 Function bbSystemDesktopWidth:Int()
@@ -35,10 +35,10 @@ Function bbSystemDesktopHertz:Int()
 
 End Extern
 
-Const XKeyPress=2
-Const XKeyRelease=3
+Const XKeyPress:Int=2
+Const XKeyRelease:Int=3
 
-Function XKeyHandler(keyevent,key,mask)
+Function XKeyHandler(keyevent:Int,key:Int,mask:Int)
 	WriteStdout "XKeyHandler "+keyevent+","+key+","+mask+"~n"
 End Function
 
@@ -60,26 +60,26 @@ Type TLinuxSystemDriver Extends TSystemDriver
 		Throw "simon come here"
 	End Method
 
-	Method SetMouseVisible( visible )
+	Method SetMouseVisible( visible:Int )
 		bbSetMouseVisible(visible)
 	End Method
 
-	Method MoveMouse( x,y )
+	Method MoveMouse( x:Int,y:Int )
 		bbMoveMouse x,y
 	End Method
 
-	Method Notify( text$,serious )
+	Method Notify( text$,serious:Int )
 		WriteStdout text+"~r~n"
 	End Method
 	
-	Method Confirm( text$,serious )
+	Method Confirm:Int( text$,serious:Int )
 		WriteStdout text+" (Yes/No)?"
 		Local t$=ReadStdin().ToLower()
 		If t[..1]="y" Return 1
 		Return 0
 	End Method
 	
-	Method Proceed( text$,serious )
+	Method Proceed:Int( text$,serious:Int )
 		WriteStdout text+" (Yes/No/Cancel)?"
 		Local t$=ReadStdin().ToLower()
 		If t[..1]="y" Return 1
@@ -87,7 +87,7 @@ Type TLinuxSystemDriver Extends TSystemDriver
 		Return -1
 	End Method
 
-	Method RequestFile$( text$,exts$,save,file$ )
+	Method RequestFile$( text$,exts$,save:Int,file$ )
 		WriteStdout "Enter a filename:"
 		Return ReadStdin()
 	End Method
@@ -97,7 +97,7 @@ Type TLinuxSystemDriver Extends TSystemDriver
 		Return ReadStdin()
 	End Method
 
-	Method OpenURL( url$ )
+	Method OpenURL:Int( url$ )
 		If getenv_("KDE_FULL_DESKTOP")
 			system_ "kfmclient exec ~q"+url+"~q"
 		ElseIf getenv_("GNOME_DESKTOP_SESSION_ID")

+ 23 - 23
systemdefault.mod/system.macos.bmx

@@ -1,4 +1,4 @@
-Strict
+SuperStrict
 
 Import BRL.Event
 
@@ -11,17 +11,17 @@ Function bbSystemStartup()
 Function bbSystemPoll()
 Function bbSystemWait()
 Function bbSystemIntr()
-Function bbSystemMoveMouse( x,y )
-Function bbSystemSetMouseVisible( visible )
-Function bbSystemNotify( text$,serious )
-Function bbSystemConfirm( text$,serious )
-Function bbSystemProceed( text$,serious )
-Function bbSystemRequestFile$( text$,exts$,save,file$,dir$ )
+Function bbSystemMoveMouse( x:Int,y:Int )
+Function bbSystemSetMouseVisible( visible:Int )
+Function bbSystemNotify( text$,serious:Int )
+Function bbSystemConfirm:Int( text$,serious:Int )
+Function bbSystemProceed:Int( text$,serious:Int )
+Function bbSystemRequestFile$( text$,exts$,save:Int,file$,dir$ )
 Function bbSystemRequestDir$( text$,dir$ )
-Function bbOpenURL( url$ )
+Function bbOpenURL:Int( url$ )
 
-Function bbSystemPostSyncOp( syncOp( syncInfo:Object,asyncRet ),syncInfo:Object,asyncRet )
-Function bbSystemStartAsyncOp( asyncOp( asyncInfo ),asyncInfo,syncOp( syncInfo:Object,asyncRet ),syncInfo:Object )
+Function bbSystemPostSyncOp( syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object,asyncRet:Int )
+Function bbSystemStartAsyncOp( asyncOp( asyncInfo:Int ),asyncInfo:Int,syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object )
 
 Function bbSystemDesktopWidth:Int()
 Function bbSystemDesktopHeight:Int()
@@ -32,7 +32,7 @@ End Extern
 
 Private
 
-Function Hook:Object( id,data:Object,context:Object )
+Function Hook:Object( id:Int,data:Object,context:Object )
 	bbSystemIntr
 	Return data
 End Function
@@ -55,31 +55,31 @@ Type TMacOSSystemDriver Extends TSystemDriver
 		bbSystemWait()
 	End Method
 	
-	Method MoveMouse( x,y )
+	Method MoveMouse( x:Int,y:Int )
 		bbSystemMoveMouse x,y
 	End Method
 	
-	Method SetMouseVisible( visible )
+	Method SetMouseVisible( visible:Int )
 		bbSystemSetMouseVisible visible
 	End Method
 	
-	Method Notify( text$,serious )
+	Method Notify( text$,serious:Int )
 		bbSystemNotify text,serious
 	End Method
 	
-	Method Confirm( text$,serious )
-		Return bbSystemConfirm( text,serious )
+	Method Confirm:Int( text$,serious:Int )
+		Return bbSystemConfirm( text,serious)
 	End Method
 	
-	Method Proceed( text$,serious )
+	Method Proceed:Int( text$,serious:Int )
 		Return bbSystemProceed( text,serious )
 	End Method
 
-	Method RequestFile$( text$,exts$,save,path$ )
+	Method RequestFile$( text$,exts$,save:Int,path$ )
 		Local file$,dir$,filter$
 		
 		path=path.Replace( "\","/" )
-		Local i=path.FindLast( "/" )
+		Local i:Int=path.FindLast( "/" )
 		If i<>-1
 			dir=path[..i]
 			file=path[i+1..]
@@ -89,9 +89,9 @@ Type TMacOSSystemDriver Extends TSystemDriver
 		
 		exts=exts.Replace( ";","," )
 		While exts
-			Local p=exts.Find(",")+1
+			Local p:Int=exts.Find(",")+1
 			If p=0 p=exts.length
-			Local q=exts.Find(":")+1
+			Local q:Int=exts.Find(":")+1
 			If q=0 Or q>p q=0
 			filter:+exts[q..p]
 			exts=exts[p..]
@@ -106,9 +106,9 @@ Type TMacOSSystemDriver Extends TSystemDriver
 		Return bbSystemRequestDir( text,dir )
 	End Method
 	
-	Method OpenURL( url$ )
+	Method OpenURL:Int( url$ )
 '		Return system_( "open "" + url.Replace("~q","") + "~q" )
-		bbOpenURL( url )
+		Return bbOpenURL( url )
 	End Method
 
 	Method DesktopWidth:Int()

+ 23 - 23
systemdefault.mod/system.win32.bmx

@@ -1,5 +1,5 @@
 
-Strict
+SuperStrict
 
 Import BRL.System
 Import "system.win32.c"
@@ -7,27 +7,27 @@ Import "system.win32.c"
 Import "-lshell32"
 Import "-lcomctl32"
 
-Const WM_BBSYNCOP=$7001	'wp=function, lp=arg
+Const WM_BBSYNCOP:Int=$7001	'wp=function, lp=arg
 
 Extern
 
 Function bbSystemStartup()
 Function bbSystemPoll()
 Function bbSystemWait()
-Function bbSystemMoveMouse( x,y )
-Function bbSystemSetMouseVisible( visible )
+Function bbSystemMoveMouse( x:Int,y:Int )
+Function bbSystemSetMouseVisible( visible:Int )
 
-Function bbSystemNotify( text$,serious )
-Function bbSystemConfirm( text$,serious )
-Function bbSystemProceed( text$,serious )
-Function bbSystemRequestFile$( text$,exts$,defext,save,file$,dir$ )
+Function bbSystemNotify( text$,serious:Int )
+Function bbSystemConfirm:Int( text$,serious:Int )
+Function bbSystemProceed:Int( text$,serious:Int )
+Function bbSystemRequestFile$( text$,exts$,defext:Int,save:Int,file$,dir$ )
 Function bbSystemRequestDir$( text$,dir$ )
-Function bbOpenURL( url$ )
+Function bbOpenURL:Int( url$ )
 
-Function bbSystemEmitOSEvent( hwnd:Byte Ptr,msg,wparam:WParam,lparam:LParam,source:Object )
+Function bbSystemEmitOSEvent( hwnd:Byte Ptr,msg:Int,WParam:WParam,LParam:LParam,source:Object )
 
-Function bbSystemPostSyncOp( syncOp( syncInfo:Object,asyncRet ),syncInfo:Object,asyncRet )
-Function bbSystemStartAsyncOp( asyncOp( asyncInfo ),asyncInfo,syncOp( syncInfo:Object,asyncRet ),syncInfo:Object )
+Function bbSystemPostSyncOp( syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object,asyncRet:Int )
+Function bbSystemStartAsyncOp( asyncOp( asyncInfo:Int ),asyncInfo:Int,syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object )
 
 Function bbSystemDesktopWidth:Int()
 Function bbSystemDesktopHeight:Int()
@@ -50,32 +50,32 @@ Type TWin32SystemDriver Extends TSystemDriver
 		bbSystemWait()
 	End Method
 	
-	Method MoveMouse( x,y )
+	Method MoveMouse( x:Int,y:Int )
 		bbSystemMoveMouse x,y
 	End Method
 	
-	Method SetMouseVisible( visible )
+	Method SetMouseVisible( visible:Int )
 		bbSystemSetMouseVisible visible
 	End Method
 
-	Method Notify( text$,serious )
+	Method Notify( text$,serious:Int )
 		bbSystemNotify text,serious
 	End Method
 	
-	Method Confirm( text$,serious )
+	Method Confirm:Int( text$,serious:Int )
 		Return bbSystemConfirm( text,serious )
 	End Method
 	
-	Method Proceed( text$,serious )
+	Method Proceed:Int( text$,serious:Int )
 		Return bbSystemProceed( text,serious )
 	End Method
 
-	Method RequestFile$( text$,exts$,save,path$ )
+	Method RequestFile$( text$,exts$,save:Int,path$ )
 		Local file$,dir$
 		
 		path=path.Replace( "/","\" )
 		
-		Local i=path.FindLast( "\" )
+		Local i:Int=path.FindLast( "\" )
 		If i<>-1
 			dir=path[..i]
 			file=path[i+1..]
@@ -85,7 +85,7 @@ Type TWin32SystemDriver Extends TSystemDriver
 
 ' calculate default index of extension in extension list from path name
 
-		Local ext$,defext,p,q
+		Local ext$,defext:Int,p:Int,q:Int
 		p=path.Find(".")
 		If (p>-1)
 			ext=","+path[p+1..].toLower()+","
@@ -94,7 +94,7 @@ Type TWin32SystemDriver Extends TSystemDriver
 			exs=exs.Replace(";",",;")
 			p=exs.find(ext)
 			If p>-1
-				Local q=-1
+				Local q:Int=-1
 				defext=1
 				While True
 					q=exs.find(";",q+1)
@@ -127,8 +127,8 @@ Type TWin32SystemDriver Extends TSystemDriver
 	
 	End Method
 	
-	Method OpenURL( url$ )
-		bbOpenURL( url )
+	Method OpenURL:Int( url$ )
+		Return bbOpenURL( url )
 	End Method
 
 	Method DesktopWidth:Int()