Browse Source

Added optional display to "Desktop" functions.

Brucey 3 năm trước cách đây
mục cha
commit
dd5a406a42

+ 4 - 4
system.mod/driver.bmx

@@ -19,10 +19,10 @@ Type TSystemDriver
 
 	Method OpenURL:Int( url$ ) Abstract	
 
-	Method DesktopWidth:Int() Abstract
-	Method DesktopHeight:Int() Abstract
-	Method DesktopDepth:Int() Abstract
-	Method DesktopHertz:Int() Abstract
+	Method DesktopWidth:Int(display:Int) Abstract
+	Method DesktopHeight:Int(display:Int) Abstract
+	Method DesktopDepth:Int(display:Int) Abstract
+	Method DesktopHertz:Int(display:Int) Abstract
 
 	Method ToString:String() Override
 		Return Name()

+ 8 - 8
system.mod/system.bmx

@@ -297,16 +297,16 @@ Rem
 bbdoc: Get desktop width
 returns: Width of the desktop, in pixels
 End Rem
-Function DesktopWidth()
-	Return SystemDriver().DesktopWidth()
+Function DesktopWidth(display:Int = 0)
+	Return SystemDriver().DesktopWidth(display)
 End Function
 
 Rem
 bbdoc: Get desktop height
 returns: Height of the desktop, in pixels
 End Rem
-Function DesktopHeight()
-	Return SystemDriver().DesktopHeight()
+Function DesktopHeight(display:Int = 0)
+	Return SystemDriver().DesktopHeight(display)
 End Function
 
 Rem
@@ -317,8 +317,8 @@ The depth of the desktop is the number of bits per pixel.
 
 Note that on some platforms this function may return 0 if the desktop depth cannot be determined.
 End Rem
-Function DesktopDepth()
-	Return SystemDriver().DesktopDepth()
+Function DesktopDepth(display:Int = 0)
+	Return SystemDriver().DesktopDepth(display)
 End Function
 
 Rem
@@ -327,8 +327,8 @@ returns: Refresh rate, in cycles per second, of the desktop
 about:
 Note that on some platforms this function may return 0 if the desktop refresh rate cannot be determined.
 End Rem
-Function DesktopHertz()
-	Return SystemDriver().DesktopHertz()
+Function DesktopHertz(display:Int = 0)
+	Return SystemDriver().DesktopHertz(display)
 End Function
 
 'End Extern

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

@@ -111,19 +111,19 @@ Type TLinuxSystemDriver Extends TSystemDriver
 		EndIf
 	End Method
 
-	Method DesktopWidth:Int() Override
+	Method DesktopWidth:Int(display:Int) Override
 		Return bbSystemDesktopWidth()
 	End Method
 	
-	Method DesktopHeight:Int() Override
+	Method DesktopHeight:Int(display:Int) Override
 		Return bbSystemDesktopHeight()
 	End Method
 	
-	Method DesktopDepth:Int() Override
+	Method DesktopDepth:Int(display:Int) Override
 		Return bbSystemDesktopDepth()
 	End Method
 	
-	Method DesktopHertz:Int() Override
+	Method DesktopHertz:Int(display:Int) Override
 		Return bbSystemDesktopHertz()
 	End Method
 

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

@@ -111,19 +111,19 @@ Type TMacOSSystemDriver Extends TSystemDriver
 		Return bbOpenURL( url )
 	End Method
 
-	Method DesktopWidth:Int() Override
+	Method DesktopWidth:Int(display:Int) Override
 		Return bbSystemDesktopWidth()
 	End Method
 	
-	Method DesktopHeight:Int() Override
+	Method DesktopHeight:Int(display:Int) Override
 		Return bbSystemDesktopHeight()
 	End Method
 	
-	Method DesktopDepth:Int() Override
+	Method DesktopDepth:Int(display:Int) Override
 		Return bbSystemDesktopDepth()
 	End Method
 	
-	Method DesktopHertz:Int() Override
+	Method DesktopHertz:Int(display:Int) Override
 		Return bbSystemDesktopHertz()
 	End Method
 

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

@@ -131,19 +131,19 @@ Type TWin32SystemDriver Extends TSystemDriver
 		Return bbOpenURL( url )
 	End Method
 
-	Method DesktopWidth:Int() Override
+	Method DesktopWidth:Int(display:Int) Override
 		Return bbSystemDesktopWidth()
 	End Method
 	
-	Method DesktopHeight:Int() Override
+	Method DesktopHeight:Int(display:Int) Override
 		Return bbSystemDesktopHeight()
 	End Method
 	
-	Method DesktopDepth:Int() Override
+	Method DesktopDepth:Int(display:Int) Override
 		Return bbSystemDesktopDepth()
 	End Method
 	
-	Method DesktopHertz:Int() Override
+	Method DesktopHertz:Int(display:Int) Override
 		Return bbSystemDesktopHertz()
 	End Method