Window.coordsToParent

Transforms window coordinates from a child window to its parent 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 adding the return values of Window.getPosition to the child coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::to-embedder: signal to translate the coordinates.

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

See also: Window.coordsFromParent

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

Parameters

x double

X coordinate in child’s coordinate system

y double

Y coordinate in child’s coordinate system

parentX double

return location for X coordinate in parent’s coordinate system, or NULL

parentY double

return location for Y coordinate in parent’s coordinate system, or NULL

Meta

Since

2.22