pywry.window_proxy¶
Full OS window control proxy returned by app.show().
Includes window lifecycle, geometry, appearance, webview, cookie, and menu management methods. See the Window Management guide and Native Menus guide for usage patterns.
pywry.window_proxy.WindowProxy
¶
Proxy for pytauri.webview.WebviewWindow with full API access.
Provides transparent IPC to the subprocess, exposing all WebviewWindow methods as either blocking (for property getters) or fire-and-forget (for actions and setters).
| PARAMETER | DESCRIPTION |
|---|---|
label
|
The window label to control.
TYPE:
|
Examples:
>>> proxy = WindowProxy("main")
>>> proxy.set_title("My App")
>>> proxy.maximize()
>>> print(proxy.is_maximized) # True
>>> proxy.set_background_color((30, 30, 30, 255))
Initialize the window proxy.
| PARAMETER | DESCRIPTION |
|---|---|
label
|
The window label to control.
TYPE:
|
Attributes¶
cursor_position
property
¶
cursor_position: PhysicalPosition
Get cursor position relative to window.
Functions¶
request_user_attention
¶
request_user_attention(attention_type: UserAttentionType | None = None) -> None
Request user attention (flash/bounce).
set_always_on_bottom
¶
Toggle always-on-bottom.
set_visible_on_all_workspaces
¶
Toggle visibility on all workspaces.
set_ignore_cursor_events
¶
Toggle ignoring cursor events (click-through).
set_content_protected
¶
Prevent window contents from being captured by screenshots.
set_traffic_light_position
¶
Set macOS traffic light button position.
set_size_constraints
¶
Set both min and max size constraints in a single call.
monitor_from_point
¶
monitor_from_point(x: float, y: float) -> Monitor | None
Get the monitor that contains the given point.
eval_with_result
¶
Execute JavaScript and return the result (blocking).
Note: Result serialization depends on the JS return value.
set_background_color
¶
Set background color (r, g, b, a).
set_menu
¶
Attach a menu to this window.
| PARAMETER | DESCRIPTION |
|---|---|
menu
|
The menu proxy to attach.
TYPE:
|
popup_menu
¶
Show a context (popup) menu at the given position.
| PARAMETER | DESCRIPTION |
|---|---|
menu
|
The menu to show.
TYPE:
|
x
|
X coordinate in logical pixels (
TYPE:
|
y
|
Y coordinate in logical pixels (
TYPE:
|