Window.moveToRect
void moveToRect(gdk.rectangle.Rectangle rect, gdk.types.Gravity rectAnchor, gdk.types.Gravity windowAnchor, gdk.types.AnchorHints anchorHints, int rectAnchorDx, int rectAnchorDy)Moves window to rect, aligning their anchor points.
rect is relative to the top-left corner of the window that window is transient for. rect_anchor and window_anchor determine anchor points on rect and window to pin together. rect's anchor point can optionally be offset by rect_anchor_dx and rect_anchor_dy, which is equivalent to offsetting the position of window.
anchor_hints determines how window will be moved if the anchor points cause it to move off-screen. For example, [gdk.types.AnchorHints.FlipX] will replace [gdk.types.Gravity.NorthWest] with [gdk.types.Gravity.NorthEast] and vice versa if window extends beyond the left or right edges of the monitor.
Connect to the #GdkWindow::moved-to-rect signal to find out how it was actually positioned.
Parameters
rect | the destination #GdkRectangle to align window with |
rectAnchor | the point on rect to align with window's anchor point |
windowAnchor | the point on window to align with rect's anchor point |
anchorHints | positioning hints to use when limited on space |
rectAnchorDx | horizontal offset to shift window, i.e. rect's anchor point |
rectAnchorDy | vertical offset to shift window, i.e. rect's anchor point |