Socket
Socket
Sign inDemoInstall

@tauri-apps/api

Package Overview
Dependencies
Maintainers
5
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tauri-apps/api - npm Package Compare versions

Comparing version 2.0.0-beta.12 to 2.0.0-beta.13

2

package.json
{
"name": "@tauri-apps/api",
"version": "2.0.0-beta.12",
"version": "2.0.0-beta.13",
"description": "Tauri API definitions",

@@ -5,0 +5,0 @@ "funding": {

import type { Menu, Submenu } from './menu';
import { Resource } from './core';
import { Image } from './image';
/**
* Describes a tray event emitted when a tray icon is clicked
*
* #### Platform-specific:
*
* - **Linux**: Unsupported. The event is not emitted even though the icon is shown,
* the icon will still show a context menu on right click.
*/
export interface TrayIconEvent {
import { PhysicalPosition, PhysicalSize } from './dpi';
export type MouseButtonState = 'Up' | 'Down';
export type MouseButton = 'Left' | 'Right' | 'Middle';
/** A click happened on the tray icon. */
export interface TrayIconClickEvent {
/** Id of the tray icon which triggered this event. */

@@ -20,16 +16,71 @@ id: string;

/** Position and size of the tray icon. */
iconRect: {
/** The x-coordinate of the upper-left corner of the rectangle. */
left: number;
/** The y-coordinate of the upper-left corner of the rectangle. */
top: number;
/** The x-coordinate of the lower-right corner of the rectangle. */
right: number;
/** The y-coordinate of the lower-right corner of the rectangle. */
bottom: number;
rect: {
position: PhysicalPosition;
size: PhysicalSize;
};
/** The click type that triggered this event. */
clickType: 'Left' | 'Right' | 'Double';
/** Mouse button that triggered this event. */
button: MouseButton;
/** Mouse button state when this event was triggered. */
button_state: MouseButtonState;
}
/** The mouse entered the tray icon region. */
export interface TrayIconEnterEvent {
/** Id of the tray icon which triggered this event. */
id: string;
/** Physical X Position of the click the triggered this event. */
x: number;
/** Physical Y Position of the click the triggered this event. */
y: number;
/** Position and size of the tray icon. */
rect: {
position: PhysicalPosition;
size: PhysicalSize;
};
}
/** The mouse moved over the tray icon region. */
export interface TrayIconMoveEvent {
/** Id of the tray icon which triggered this event. */
id: string;
/** Physical X Position of the click the triggered this event. */
x: number;
/** Physical Y Position of the click the triggered this event. */
y: number;
/** Position and size of the tray icon. */
rect: {
position: PhysicalPosition;
size: PhysicalSize;
};
}
/** The mouse left the tray icon region. */
export interface TrayIconLeaveEvent {
/** Id of the tray icon which triggered this event. */
id: string;
/** Physical X Position of the click the triggered this event. */
x: number;
/** Physical Y Position of the click the triggered this event. */
y: number;
/** Position and size of the tray icon. */
rect: {
position: PhysicalPosition;
size: PhysicalSize;
};
}
/**
* Describes a tray icon event.
*
* #### Platform-specific:
*
* - **Linux**: Unsupported. The event is not emitted even though the icon is shown,
* the icon will still show a context menu on right click.
*/
export type TrayIconEvent = {
click: TrayIconClickEvent;
} | {
enter: TrayIconEnterEvent;
} | {
move: TrayIconMoveEvent;
} | {
leave: TrayIconLeaveEvent;
};
/**
* Tray icon types and utilities.

@@ -36,0 +87,0 @@ *

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc