translate_coordinates


Description:

public bool translate_coordinates (Widget dest_widget, int src_x, int src_y, out int dest_x, out int dest_y)

Translates coordinates relative to this’s allocation to coordinates relative to dest_widget ’s allocations.

Note:

Use [method@Gtk.Widget.compute_point] instead

In order to perform this operation, both widget must share a common ancestor. If that is not the case, dest_x and dest_y are set to 0 and false is returned.

Parameters:

this

a widget

dest_widget

another widget

src_x

X position in widget coordinates of this

src_y

Y position in widget coordinates of this

dest_x

location to store X position in widget coordinates of dest_widget

dest_y

location to store Y position in widget coordinates of dest_widget

Returns:

true if this and dest_widget have a common ancestor, false otherwise