Fantom

 

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.

Slots

boundsSource

const static native Rect bounds()

Get the working bounds of the entire desktop which may span multiple Monitors. Also see Monitor.bounds and Monitor.screenBounds.

callAsyncSource

const static native Void callAsync(|->| 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.

disposeColorSource

const static native Void disposeColor(Color c)

Free any operating system resources used by the color.

disposeFontSource

const static native Void disposeFont(Font f)

Free any operating system resources used by the font.

disposeImageSource

const static native Void disposeImage(Image i)

Free any operating system resources used by the image.

focusSource

const static native Widget? focus()

Get the current focused widget or return null.

isMacSource

const static native Bool isMac()

Is the desktop running a version of Apple OS X.

isWindowsSource

const static native Bool isWindows()

Is the desktop running a version of Microsoft Windows.

platformSource

const static native Str platform()

Get the platform name: "windows", "mac"

sysBgSource

const static native Color sysBg()

System color for background on widgets

sysBorderSource

const static native Color sysBorder()

System color for borders on widgets

sysDarkShadowSource

const static native Color sysDarkShadow()

System color for dark shadow on widgets

sysFgSource

const static native Color sysFg()

System color for foreground and text on widgets

sysFontSource

const static native Font sysFont()

Get the default system font. The system font is used for text in menus, dialogs, and full-size controls.

sysFontMonospaceSource

const static native Font sysFontMonospace()

Get the default system mono-spaced font.

sysFontSmallSource

const static native 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.

sysFontViewSource

const static native Font sysFontView()

Get the default view system font. The view font is used in controls like Tree and Table.

sysHighlightShadowSource

const static native Color sysHighlightShadow()

System color for highlight shadow on widgets

sysLightShadowSource

const static native Color sysLightShadow()

System color for light shadow on widgets

sysListBgSource

const static native Color sysListBg()

System color for list background.

sysListFgSource

const static native Color sysListFg()

System color for list text.

sysListSelBgSource

const static native Color sysListSelBg()

System color for list selection background.

sysListSelFgSource

const static native Color sysListSelFg()

System color for list selection text.

sysNormShadowSource

const static native Color sysNormShadow()

System color for normal shadow on widgets