serena.util.pywebview

Contents

serena.util.pywebview#


class WebViewWithTray(
url,
*,
title,
start_minimized=False,
width=1400,
height=900,
tray=False,
parent_process_id=None,
app_id=None,
app_icon_path=None,
tray_icon_path=None,
)[source]#

Bases: object

Web view window with optional system tray.

Parameters:
  • url (str) – the URL to be show in the web view

  • title (str) – the title of the window

  • start_minimized (bool) – whether to show the window minimised on startup (if tray is enabled, minimised to tray)

  • width (int) – width of the window in pixels

  • height (int) – height of the window in pixels

  • tray (bool) – whether to enable the system tray icon and functionality. If this is enabled, closing the window will minimise it to tray instead of quitting the application.

  • parent_process_id (int | None) – the PID of the parent process to monitor; if specified, the viewer will automatically shut itself down when the parent process exits.

  • app_id (str | None) – the application ID to use for the viewer to ensure that the window is grouped separately (with separate icon) in the taskbar

  • app_icon_path (str | None)

  • tray_icon_path (str | None)