class fwt::Desktop
sys::Obj fwt::Desktop
@Js
Desktop is used to model the user's operating system, window manager, and display monitors. See Monitor
to query the desktop monitors.
- bounds
-
static Rect bounds()
Get the working bounds of the entire desktop which may span multiple Monitors. Also see
Monitor.bounds
andMonitor.screenBounds
. - callAsync
-
static Void callAsync(|->Void| f)
Call the specified function on the UI thread's event loop. If this call is being made on a thread which is not the UI thread, then the function must be immutable. If on the UI thread, then it is ok for the function to be mutable.
- callLater
-
static Void callLater(Duration delay, |->Void| f)
Call the specified function on the UI thread's event loop after a timer period has expired. If this call is being made on a thread which is not the UI thread, then the function must be immutable. If on the UI thread, then it is ok for the function to be mutable.
- clipboard
-
static Clipboard clipboard()
Reference to the system clipboard for data transfer.
- disposeColor
-
@Deprecated { msg="Use Color.dispose" }
static Void disposeColor(Color c)Free any operating system resources used by the color.
- disposeFont
-
@Deprecated { msg="Use Font.dispose" }
static Void disposeFont(Font f)Free any operating system resources used by the font.
- disposeImage
-
@Deprecated { msg="Use Image.dispose" }
static Void disposeImage(Image i)Free any operating system resources used by the image.
- focus
-
static Widget? focus()
Get the current focused widget or return null.
- isMac
-
static Bool isMac()
Is the desktop running a version of Apple OS X.
- isWindows
-
static Bool isWindows()
Is the desktop running a version of Microsoft Windows.
- launchProgram
-
static Bool launchProgram(Uri uri)
Launch the native program registered to open the the given URI. Return true if launch was successful, false on failure.
- platform
-
static Str platform()
Get the platform name: "windows", "mac"
- sysBg
-
static Color sysBg()
System color for background on widgets
- sysBorder
-
static Color sysBorder()
System color for borders on widgets
- sysDarkShadow
-
static Color sysDarkShadow()
System color for dark shadow on widgets
- sysFg
-
static Color sysFg()
System color for foreground and text on widgets
- sysFont
-
static Font sysFont()
Get the default system font. The system font is used for text in menus, dialogs, and full-size controls.
- sysFontMonospace
-
static Font sysFontMonospace()
Get the default system mono-spaced font.
- sysFontSmall
-
static Font sysFontSmall()
Get the default small system font. The small font is used for informative text, column headings in tables, help tags, and for small controls.
- sysFontView
-
static Font sysFontView()
Get the default view system font. The view font is used in controls like Tree and Table.
- sysHighlightShadow
-
static Color sysHighlightShadow()
System color for highlight shadow on widgets
- sysLightShadow
-
static Color sysLightShadow()
System color for light shadow on widgets
- sysListBg
-
static Color sysListBg()
System color for list background.
- sysListFg
-
static Color sysListFg()
System color for list text.
- sysListSelBg
-
static Color sysListSelBg()
System color for list selection background.
- sysListSelFg
-
static Color sysListSelFg()
System color for list selection text.
- sysNormShadow
-
static Color sysNormShadow()
System color for normal shadow on widgets