Package: gdk

GFlags gdk-anchor-hints

Details

Positioning hints for aligning a window relative to a rectangle.

These hints determine how the window should be positioned in the case that the window would fall off-screen if placed in its ideal position. For example, :flip-x will replace :north-west with :north-east and vice versa if the window extends beyond the left or right edges of the monitor.

If :slide-x is set, the window can be shifted horizontally to fit on-screen. If :resize-x is set, the window can be shrunken horizontally to fit.

In general, when multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

Since 3.22
(define-g-flags "GdkAnchorHints" gdk-anchor-hints
  (:export t
   :type-initializer "gdk_anchor_hints_get_type")
  (:flip-x   #.(ash 1 0))
  (:flip-y   #.(ash 1 1))
  (:slide-x  #.(ash 1 2))
  (:slide-y  #.(ash 1 3))
  (:resize-x #.(ash 1 4))
  (:resize-y #.(ash 1 5))
  (:flip    3)  ; :flip-x   | :flip-y
  (:slide  12)  ; :slide-x  | :slide-y
  (:resize 48)) ; :resize-x | :resize-y  
:flip-x
Allow flipping anchors horizontally.
:fliy-y
Allow flipping anchors vertically.
:slide-x
Allow sliding window horizontally.
:slide-y
Allow sliding window vertically.
:resize-x
Allow resizing window horizontally.
:resize-y
Allow resizing window vertically.
:flip
Allow flipping anchors on both axes.
:slide
Allow sliding window on both axes.
Allow resizing window on both axes.
 

See also

2021-7-17