Method
GdkWindowcoords_to_parent
since: 2.22
Declaration [src]
void
gdk_window_coords_to_parent (
GdkWindow* window,
gdouble x,
gdouble y,
gdouble* parent_x,
gdouble* parent_y
)
Description [src]
Transforms window coordinates from a child window to its parent
window, where the parent window is the normal parent as returned by
gdk_window_get_parent()
for normal windows, and the window’s
embedder as returned by gdk_offscreen_window_get_embedder()
for
offscreen windows.
For normal windows, calling this function is equivalent to adding
the return values of gdk_window_get_position()
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: gdk_window_coords_from_parent().
Available since: 2.22
Parameters
x
-
Type:
gdouble
X coordinate in child’s coordinate system.
y
-
Type:
gdouble
Y coordinate in child’s coordinate system.
parent_x
-
Type:
gdouble*
Return location for X coordinate in parent’s coordinate system, or
NULL
.The argument will be set by the function. The argument can be NULL
. parent_y
-
Type:
gdouble*
Return location for Y coordinate in parent’s coordinate system, or
NULL
.The argument will be set by the function. The argument can be NULL
.