|
@@ -96,11 +96,7 @@ End Rem
|
|
|
Function PollSystem()
|
|
|
If _busy Return
|
|
|
_busy=True
|
|
|
- If Driver Then
|
|
|
- Driver.Poll
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ SystemDriver().Poll
|
|
|
_busy=False
|
|
|
End Function
|
|
|
|
|
@@ -120,11 +116,7 @@ End Rem
|
|
|
Function WaitSystem()
|
|
|
If _busy Return
|
|
|
_busy=True
|
|
|
- If Driver Then
|
|
|
- Driver.Wait
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ SystemDriver().Wait
|
|
|
_busy=False
|
|
|
End Function
|
|
|
|
|
@@ -186,33 +178,21 @@ about:
|
|
|
the current window or graphics display.
|
|
|
End Rem
|
|
|
Function MoveMouse( x,y )
|
|
|
- If Driver Then
|
|
|
- Driver.MoveMouse x,y
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ SystemDriver().MoveMouse x,y
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
|
bbdoc: Make the mouse pointer visible
|
|
|
End Rem
|
|
|
Function ShowMouse()
|
|
|
- If Driver Then
|
|
|
- Driver.SetMouseVisible True
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ SystemDriver().SetMouseVisible True
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
|
bbdoc: Make the mouse pointer invisible
|
|
|
End Rem
|
|
|
Function HideMouse()
|
|
|
- If Driver Then
|
|
|
- Driver.SetMouseVisible False
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ SystemDriver().SetMouseVisible False
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -224,11 +204,7 @@ The optional @serious flag can be used to indicate a 'critical' event.
|
|
|
Note that a user interface may not be available when in graphics mode on some platforms.
|
|
|
End Rem
|
|
|
Function Notify( text$,serious=False )
|
|
|
- If Driver Then
|
|
|
- Driver.Notify text,serious
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ SystemDriver().Notify text,serious
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -242,11 +218,7 @@ False is returned.
|
|
|
Note that a user interface may not be available when in graphics mode on some platforms.
|
|
|
End Rem
|
|
|
Function Confirm( text$,serious=False )
|
|
|
- If Driver Then
|
|
|
- Return Driver.Confirm( text,serious )
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().Confirm( text,serious )
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -260,11 +232,7 @@ selects NO, then #Proceed returns 0. Otherwise, #Proceed returns -1.
|
|
|
Note that a user interface may not be available when in graphics mode on some platforms.
|
|
|
End Rem
|
|
|
Function Proceed( text$,serious=False )
|
|
|
- If Driver Then
|
|
|
- Return Driver.Proceed( text,serious )
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().Proceed( text,serious )
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -283,11 +251,7 @@ that begin with a "group:" and separated by a semicolon.
|
|
|
Note that a user interface may not be available when in graphics mode on some platforms.
|
|
|
End Rem
|
|
|
Function RequestFile$( text$,extensions$="",save_flag=False,initial_path$="" )
|
|
|
- If Driver Then
|
|
|
- Return Driver.RequestFile( text,extensions,save_flag,initial_path )
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().RequestFile( text,extensions,save_flag,initial_path )
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -301,11 +265,7 @@ about:
|
|
|
Note that a user interface may not be available when in graphics mode on some platforms.
|
|
|
End Rem
|
|
|
Function RequestDir$( text$,initial_path$="" )
|
|
|
- If Driver Then
|
|
|
- Return Driver.RequestDir( text,initial_path )
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().RequestDir( text,initial_path )
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -313,27 +273,23 @@ bbdoc: Opens a URL with the system's default web browser.
|
|
|
about: Note that a user interface may not be available when in graphics mode on some platforms.
|
|
|
End Rem
|
|
|
Function OpenURL( url$ )
|
|
|
- If Driver Then
|
|
|
- Local dev$,anchor$
|
|
|
-
|
|
|
- dev=url[..5].toLower()
|
|
|
- If dev<>"http:" And dev<>"file:" And url[..6].ToLower()<>"https:"
|
|
|
- Local h=url.find("#")
|
|
|
- If h>-1
|
|
|
- anchor=url[h..]
|
|
|
- url=url[..h]
|
|
|
- EndIf
|
|
|
- Local f$=RealPath(url)
|
|
|
- If FileType(f)
|
|
|
- url="file:"+f +anchor
|
|
|
- Else
|
|
|
- url="http:"+url+anchor
|
|
|
- EndIf
|
|
|
+ Local dev$,anchor$
|
|
|
+
|
|
|
+ dev=url[..5].toLower()
|
|
|
+ If dev<>"http:" And dev<>"file:" And url[..6].ToLower()<>"https:"
|
|
|
+ Local h=url.find("#")
|
|
|
+ If h>-1
|
|
|
+ anchor=url[h..]
|
|
|
+ url=url[..h]
|
|
|
EndIf
|
|
|
- Return Driver.OpenURL( url )
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Local f$=RealPath(url)
|
|
|
+ If FileType(f)
|
|
|
+ url="file:"+f +anchor
|
|
|
+ Else
|
|
|
+ url="http:"+url+anchor
|
|
|
+ EndIf
|
|
|
+ EndIf
|
|
|
+ Return SystemDriver().OpenURL( url )
|
|
|
End Function
|
|
|
|
|
|
|
|
@@ -342,11 +298,7 @@ bbdoc: Get desktop width
|
|
|
returns: Width of the desktop, in pixels
|
|
|
End Rem
|
|
|
Function DesktopWidth()
|
|
|
- If Driver Then
|
|
|
- Return Driver.DesktopWidth()
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().DesktopWidth()
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -354,11 +306,7 @@ bbdoc: Get desktop height
|
|
|
returns: Height of the desktop, in pixels
|
|
|
End Rem
|
|
|
Function DesktopHeight()
|
|
|
- If Driver Then
|
|
|
- Return Driver.DesktopHeight()
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().DesktopHeight()
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -370,11 +318,7 @@ 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()
|
|
|
- If Driver Then
|
|
|
- Return Driver.DesktopDepth()
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().DesktopDepth()
|
|
|
End Function
|
|
|
|
|
|
Rem
|
|
@@ -384,11 +328,7 @@ about:
|
|
|
Note that on some platforms this function may return 0 if the desktop refresh rate cannot be determined.
|
|
|
End Rem
|
|
|
Function DesktopHertz()
|
|
|
- If Driver Then
|
|
|
- Return Driver.DesktopHertz()
|
|
|
- Else
|
|
|
- Throw "No System Driver installed. Maybe Import BRL.SystemDefault ?"
|
|
|
- End If
|
|
|
+ Return SystemDriver().DesktopHertz()
|
|
|
End Function
|
|
|
|
|
|
'End Extern
|