Interface ApplicationApi


@ThreadSafe public interface ApplicationApi
emuStudio application API.

Plugins can use it for the communication with emuStudio.

  • Field Details

    • UNAVAILABLE

      static final ApplicationApi UNAVAILABLE
      Unavailable API; all services are null. Useful for creating plugins outside emuStudio (e.g. tests, listing).
  • Method Details

    • getAnnotations

      MemoryAnnotations getAnnotations()
      Returns the active computer's live annotations, or null when unavailable.
    • getContextPool

      ContextPool getContextPool()
      Get context pool.

      Context pool is used for registration and obtaining plugin contexts, which are used in plugin communication.

      Returns:
      context pool
    • getDialogs

      Dialogs getDialogs()
      Get dialogs object.

      Dialogs object can be used by plugins to display common dialogs like information/error messages, or ask user for input, like read integer/double value or ask for confirmation.

      Returns:
      dialogs object
    • getGUI

      GUI getGUI()
      Get GUI object.

      GUI object can be used by plugins to create common Swing components like labels, buttons, panels, etc. The implementation is provided by the host application.

      Returns:
      GUI object, or null if GUI is not available
    • setProgramLocation

      void setProgramLocation(int location)
      Sets program start location (usually a memory address).

      This method is usually called by a compiler when it finishes compilation process, if it's clear at which memory location the compiled program starts. The start location is then used by CPU, in a reset operation - PC (program counter, or something similar) is usually set to this location.

      Parameters:
      location - program start location (usually a memory address)
    • getProgramLocation

      int getProgramLocation()
      Gets program start location (usually a memory address).

      This method is usually called by a CPU in a reset operation - PC (program counter, or something similar) is usually set to this location.

      Returns:
      program's start address in memory