Method

GdkWindowmove_to_rect

since: 3.24

Declaration [src]

void
gdk_window_move_to_rect (
  GdkWindow* window,
  const GdkRectangle* rect,
  GdkGravity rect_anchor,
  GdkGravity window_anchor,
  GdkAnchorHints anchor_hints,
  gint rect_anchor_dx,
  gint rect_anchor_dy
)

Description [src]

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. rects 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_ANCHOR_FLIP_X will replace GDK_GRAVITY_NORTH_WEST with GDK_GRAVITY_NORTH_EAST 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.

Available since: 3.24

Parameters

rect

Type: GdkRectangle

The destination GdkRectangle to align window with.

The data is owned by the caller of the method.
rect_anchor

Type: GdkGravity

The point on rect to align with windows anchor point.

window_anchor

Type: GdkGravity

The point on window to align with rects anchor point.

anchor_hints

Type: GdkAnchorHints

Positioning hints to use when limited on space.

rect_anchor_dx

Type: gint

Horizontal offset to shift window, i.e. rects anchor point.

rect_anchor_dy

Type: gint

Vertical offset to shift window, i.e. rects anchor point.