coords_to_parent


Description:

[ Version ( since = "2.22" ) ]
public void coords_to_parent (double x, double y, out double parent_x, out double parent_y)

Transforms window coordinates from a child window to its parent window, where the parent window is the normal parent as returned by get_parent for normal windows, and the window's embedder as returned by offscreen_window_get_embedder for offscreen windows.

For normal windows, calling this function is equivalent to adding the return values of get_position to the child coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow: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: coords_from_parent

Parameters:

this

a child window

x

X coordinate in child’s coordinate system

y

Y coordinate in child’s coordinate system

parent_x

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

parent_y

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




2022 vala-language.org