package wayland

  1. Overview
  2. Docs
Pure OCaml Wayland protocol library

Install

Dune Dependency

Authors

Maintainers

Sources

wayland-2.0.tbz
sha256=8821b5ce4d6d03b81d186b7bf1cdec422d0d37d161dc7b023f8732ed8de9834b
sha512=d948ef44fefd3aed4c3a89cc2bea82e3e7ef6ef8584516645e763c2e5dbc31683c2f45fb002a1a22072ad7221972ad28f032973e9d40ae470b425c460c51ecdf

doc/wayland.protocols/Wayland_protocols/Xdg_shell_proto/Xdg_positioner/Constraint_adjustment/index.html

Module Xdg_positioner.Constraint_adjustmentSource

Constraint adjustments.

The constraint adjustment value define ways the compositor will adjust the position of the surface, if the unadjusted position would result in the surface being partly constrained.

Whether a surface is considered 'constrained' is left to the compositor to determine. For example, the surface may be partly outside the compositor's defined 'work area', thus necessitating the child surface's position be adjusted until it is entirely inside the work area.

The adjustments can be combined, according to a defined precedence: 1) Flip, 2) Slide, 3) Resize.

Sourcetype t = int32
Sourceval none : int32

Don't move the child surface when constrained.

Don't alter the surface position even if it is constrained on some axis, for example partially outside the edge of an output.

Sourceval slide_x : int32

Move along the x axis until unconstrained.

Slide the surface along the x axis until it is no longer constrained.

First try to slide towards the direction of the gravity on the x axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.

Then try to slide towards the opposite direction of the gravity on the x axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.

Sourceval slide_y : int32

Move along the y axis until unconstrained.

Slide the surface along the y axis until it is no longer constrained.

First try to slide towards the direction of the gravity on the y axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.

Then try to slide towards the opposite direction of the gravity on the y axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.

Sourceval flip_x : int32

Invert the anchor and gravity on the x axis.

Invert the anchor and gravity on the x axis if the surface is constrained on the x axis. For example, if the left edge of the surface is constrained, the gravity is 'left' and the anchor is 'left', change the gravity to 'right' and the anchor to 'right'.

If the adjusted position also ends up being constrained, the resulting position of the flip_x adjustment will be the one before the adjustment.

Sourceval flip_y : int32

Invert the anchor and gravity on the y axis.

Invert the anchor and gravity on the y axis if the surface is constrained on the y axis. For example, if the bottom edge of the surface is constrained, the gravity is 'bottom' and the anchor is 'bottom', change the gravity to 'top' and the anchor to 'top'.

The adjusted position is calculated given the original anchor rectangle and offset, but with the new flipped anchor and gravity values.

If the adjusted position also ends up being constrained, the resulting position of the flip_y adjustment will be the one before the adjustment.

Sourceval resize_x : int32

Horizontally resize the surface.

Resize the surface horizontally so that it is completely unconstrained.

Sourceval resize_y : int32

Vertically resize the surface.

Resize the surface vertically so that it is completely unconstrained.

Sourceval to_int32 : 'a -> 'a
Sourceval of_int32 : 'a -> 'a
OCaml

Innovation. Community. Security.