Skip to content

First Look Platform

Robert Campbell edited this page Oct 14, 2022 · 1 revision

Subsystem Overview

Ultraviolet's Platform subsystem is exposed through the IUltravioletPlatform interface, which you can retrieve an instance of by calling UltravioletContext.GetPlatform(). This interface allows you to interact with the underlying operating system and windowing system which host your application.

Check out the reference documentation for a complete run-down what what the IUltravioletPlatform interface is capable of. Here’s a brief overview of some of the important points.

Information about your application's windows is available through the Windows property.

Information about the system's display devices is available through the Displays property.

You can access the system's clipboard using the Clipboard property.

You can change your application's cursor using the Cursor property.

You can display an operating system message box using the ShowMessageBox() method.

Associated Resources

This list is not exhaustive, but should be enough to get you started. Check out the reference documentation for more information.

The IUltravioletWindow interface represents one of your application's windows. Though most Ultraviolet applications will only have a single window, called the primary window, it is possible to create additional windows through the Platform system, or to enlist already-existing windows into the Ultraviolet context.

The IUltravioletDisplay interface represents one of the system's display devices (in other words, monitors). You can use this interface to access information such as a display's name, bounds, rotation, scale, display mode, and pixel density.

The Cursor resource represents a cursor image. Cursors can be loaded from images using the Content subsystem, but you can also create new cursors at runtime using the Surface2D class.

The FileSource class allows you to configure Ultraviolet to load assets from somewhere other than the underlying file system, such as an archive file. This is not generally required on any of Ultraviolet's currently supported platforms, but may be useful in specific circumstances.

The FileSystemService class contains methods for accessing the file system in a way which is compatible across all of Ultraviolet's target platforms. This will make use of the current file source, if one has been set.

The PowerManagementService class allows you to access the current state of the machine's battery, if it has one.

Clone this wiki locally