OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
frontends.x11.x11_window_embedder.X11WindowEmbedder Class Reference

Use xdotool to reparent an application window into an ORC frontend host. More...

Inheritance diagram for frontends.x11.x11_window_embedder.X11WindowEmbedder:
frontends.x11.window_embedder_if.WindowEmbedderIf apps.orcUi.adapters.waydroid_window_embedder.WaydroidWindowEmbedder

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, Callable[[], bool]|None cancelled=None, int|None failure_parent_window_id=None, tuple[int, int] vertical_crop=(0, 0))
 Find, hide, reparent, size, and map an X11 client inside the host.
int hide (self, int process_id, *, str|None window_name=None, str|None window_class=None)
 Find and unmap a matching X11 window without claiming it as embedded.
None resize (self, int width, int height)
 Resize the embedded window to match its host.
None clear (self)
 Forget the currently embedded window.
None set_vertical_crop (self, int top, int bottom)
 Reserve off-viewport chrome without scaling the application's pixels.

Static Public Member Functions

bool supported ()
 Return whether this embedding backend is available.
int root_window_id ()
 Resolve the X11 root without relying on a nonexistent Tk winfo API.

Static Protected Member Functions

int _root_from_xlib ()
 Termux may lack xwininfo; reuse Tk's existing system X11 library.

Detailed Description

Use xdotool to reparent an application window into an ORC frontend host.

Member Function Documentation

◆ resize()

None frontends.x11.x11_window_embedder.X11WindowEmbedder.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 from frontends.x11.window_embedder_if.WindowEmbedderIf.

Reimplemented in apps.orcUi.adapters.waydroid_window_embedder.WaydroidWindowEmbedder.

◆ supported()

bool frontends.x11.x11_window_embedder.X11WindowEmbedder.supported ( )
static

Return whether this embedding backend is available.

Returns
True when the required native embedding support is available.

Reimplemented from frontends.x11.window_embedder_if.WindowEmbedderIf.

◆ window_id()

int | None frontends.x11.x11_window_embedder.X11WindowEmbedder.window_id ( self)

Return the currently embedded native window identifier.

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

Reimplemented from frontends.x11.window_embedder_if.WindowEmbedderIf.


The documentation for this class was generated from the following file:
  • frontends/x11/x11_window_embedder.py