Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace OS

This namespace is the main entry point of AntOS API

Index

Type aliases

MarketPlaceRepoDialog

MarketPlaceRepoDialog: typeof RepositoryDialog

Variables

Const VERSION

VERSION: Version = "1.0.0-a".__v()

Variable represents the current AntOS version, it is an instance of Version

Const cleanupHandles

cleanupHandles: {}

Placeholder for all the callbacks that are called when the system exits. These callbacks are useful when an application or service wants to perform a particular task before shuting down the system

Type declaration

  • [index: string]: () => void
      • (): void
      • Returns void

Functions

boot

  • boot(): void
  • Booting up AntOS. This function checks whether the user is successfully logged in, then call startAntOS, otherwise it shows the login screen

    export

    Returns void

cleanup

  • cleanup(): void
  • This function cleans up the entire system and makes sure the system is in a new and clean session. It performs the following operations:

    • Kill all running processes
    • Unregister all global events and reset the global announcement system
    • Clear the current theme
    • Reset process manager and all system settings
    export

    Returns void

exit

  • exit(): void
  • Perform the system shutdown operation. This function calls all clean up handles in cleanupHandles, then save the system setting before exiting

    export

    Returns void

onexit

  • onexit(n: string, f: () => void): () => void
  • Register a callback to the system cleanupHandles

    export

    Parameters

    • n: string

      callback string name

    • f: () => void

      the callback handle

        • (): void
        • Returns void

    Returns () => void

      • (): void
      • Returns void

register

  • Register a model prototype to the system namespace. There are two types of model to be registered, if the model is of type SubWindow, its prototype will be registered in the dialogs namespace, otherwise, if the model type is Application or Service, its prototype will be registered in the application namespace.

    When a model is loaded in the system, its prototype is registered for later uses

    export

    Parameters

    Returns void

resetSetting

  • resetSetting(): void

systemSetting

  • systemSetting(conf: any): void
  • Apply the input parameter object to system settings. This object could be an object loaded from setting JSON file saved on the server.

    export

    Parameters

    • conf: any

    Returns void