Window.coordsFromParent

Transforms window coordinates from a parent window to a child window, where the parent window is the normal parent as returned by Window.getParent for normal windows, and the window's embedder as returned by OffscreenWindow.getEmbedder for offscreen windows.

For normal windows, calling this function is equivalent to subtracting the return values of Window.getPosition from the parent coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::from-embedder: signal to translate the coordinates.

You should always use this function when writing generic code that walks down a window hierarchy.

See also: Window.coordsToParent

class Window
void
coordsFromParent
(
double parentX
,
double parentY
,
out double x
,
out double y
)

Parameters

parentX double

X coordinate in parent’s coordinate system

parentY double

Y coordinate in parent’s coordinate system

x double

return location for X coordinate in child’s coordinate system

y double

return location for Y coordinate in child’s coordinate system

Meta

Since

2.22