1. API
  2. menuBar

API

Methods for accessing ToDesktop Menu Bar App specfic functionality.

Remarks

This package exposes a number of methods for accessing ToDesktop Menu Bar App specfic functionality.

Functions

Function Description
enlarge(size) Enlarges the MenuBar view.
shrink() Restores the MenuBar app to it's pre-defined size.

enlarge()

Enlarges the MenuBar view.

Signature:

        import { menuBar } from "@todesktop/client-core"
menuBar.enlarge(size?: {
    width: number;
    height: number;
}): Promise<void>;

      
Parameters
Parameter Type Description
size { width: number; height: number; } Specifies the width and height to resize to. If not specified the window will be resized to 800x1000.

Returns:

Promise<void>

shrink()

Restores the MenuBar app to it's pre-defined size.

Signature:

        import { menuBar } from "@todesktop/client-core"
menuBar.shrink(): Promise<void>;

      

Returns:

Promise<void>

Variables

Variable Description
on

on

Signature:

        on: (event: "*" | MenuBarEvent, callback: (...any: any[]) => void) => Promise<() => Promise<void>>

      

Type Aliases

Signature:

        export declare type MenuBarEvent = "show" | "hide";

      
Type Alias Description
MenuBarEvent