OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
frontends.x11.window_embedder_if.WindowEmbedderIf Class Reference

Frontend adapter for hosting an external application window. More...

Inheritance diagram for frontends.x11.window_embedder_if.WindowEmbedderIf:
frontends.x11.x11_window_embedder.X11WindowEmbedder

Public Member Functions

int|None window_id (self)
 Return the currently embedded native window identifier.
 
int embed (self, int process_id, int host_window_id, int width, int height, *str|None window_name=None, str|None window_class=None, bool relax_size_hints=False)
 Embed a matching application window into the supplied frontend host.
 
int hide (self, int process_id, *str|None window_name=None, str|None window_class=None)
 Find and unmap a matching native application window.
 
None resize (self, int width, int height)
 Resize the embedded window to match its host.
 
None clear (self)
 Forget the currently embedded window.
 

Static Public Member Functions

bool supported ()
 Return whether this embedding backend is available.
 

Detailed Description

Frontend adapter for hosting an external application window.

Member Function Documentation

◆ embed()

int frontends.x11.window_embedder_if.WindowEmbedderIf.embed (   self,
int  process_id,
int  host_window_id,
int  width,
int  height,
*str | None   window_name = None,
str | None   window_class = None,
bool   relax_size_hints = False 
)

Embed a matching application window into the supplied frontend host.

Parameters
process_idProcess identifier of the application whose window should be embedded.
host_window_idNative window identifier of the frontend host.
widthInitial embedded-window width in pixels.
heightInitial embedded-window height in pixels.
window_nameOptional native window-name match used during discovery.
window_classOptional native window-class match used during discovery.
relax_size_hintsWhether the backend may remove restrictive X11 size hints.
Returns
The native identifier of the embedded application window.

Reimplemented in frontends.x11.x11_window_embedder.X11WindowEmbedder.

◆ hide()

int frontends.x11.window_embedder_if.WindowEmbedderIf.hide (   self,
int  process_id,
*str | None   window_name = None,
str | None   window_class = None 
)

Find and unmap a matching native application window.

This is useful during managed startup when the external application must finish initializing before it is safe to embed, but its temporary standalone top-level window should not flash onscreen.

Parameters
process_idProcess identifier of the application whose window should be hidden.
window_nameOptional native window-name match used during discovery.
window_classOptional native window-class match used during discovery.
Returns
The native identifier of the hidden application window.

Reimplemented in frontends.x11.x11_window_embedder.X11WindowEmbedder.

◆ resize()

None frontends.x11.window_embedder_if.WindowEmbedderIf.resize (   self,
int  width,
int  height 
)

Resize the embedded window to match its host.

Parameters
widthNew embedded-window width in pixels.
heightNew embedded-window height in pixels.

Reimplemented in frontends.x11.x11_window_embedder.X11WindowEmbedder.

◆ supported()

bool frontends.x11.window_embedder_if.WindowEmbedderIf.supported ( )
static

Return whether this embedding backend is available.

Returns
True when the required native embedding support is available.

Reimplemented in frontends.x11.x11_window_embedder.X11WindowEmbedder.

◆ window_id()

int | None frontends.x11.window_embedder_if.WindowEmbedderIf.window_id (   self)

Return the currently embedded native window identifier.

Returns
The embedded native window identifier, or None when no window is embedded.

Reimplemented in frontends.x11.x11_window_embedder.X11WindowEmbedder.


The documentation for this class was generated from the following file: