Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
org.plasmazones.ZoneDetection

Zone detection at cursor coordinates, adjacency navigation, zone enumeration, and keyboard modifier state.

Well-known name org.plasmazones.ZoneDetection
Source XML org.plasmazones.ZoneDetection.xml
Methods 11
Signals 1
Properties 0

Methods

<tt>detectZoneAtPosition()</tt>

Return the zone UUID at the given screen coordinates, or empty string if none.

Arg Direction Type Description
x in i *(int32)* Screen X coordinate.
y in i *(int32)* Screen Y coordinate.
zoneId out s *(string)* Zone UUID at position, or empty string.

<tt>detectMultiZoneAtPosition()</tt>

Return zone UUIDs at the given position (for multi-zone snap at overlapping boundaries).

Arg Direction Type Description
x in i *(int32)* Screen X coordinate.
y in i *(int32)* Screen Y coordinate.
zoneIds out as *(array<string>)* Zone UUIDs at position.

<tt>getZoneGeometry()</tt>

Return zone geometry as a struct (x, y, width, height) for the primary screen.

Arg Direction Type Description
zoneId in s *(string)* Zone UUID.
geometry out (iiii) *(struct(int32,int32,int32,int32))* Zone geometry struct: (x, y, width, height).

<tt>getZoneGeometryForScreen()</tt>

Return zone geometry as a struct for a specific screen.

Arg Direction Type Description
zoneId in s *(string)* Zone UUID.
screenId in s *(string)* Screen ID (empty = primary screen).
geometry out (iiii) *(struct(int32,int32,int32,int32))* Zone geometry struct: (x, y, width, height).

<tt>getZonesForScreen()</tt>

Return all zone UUIDs on the given screen.

Arg Direction Type Description
screenId in s *(string)* Screen ID.
zoneIds out as *(array<string>)* Zone UUIDs on the screen.

<tt>getAdjacentZone()</tt>

Return the adjacent zone in the given direction.

Arg Direction Type Description
currentZoneId in s *(string)* Starting zone UUID.
direction in s *(string)* Direction: left, right, up, down.
screenId in s *(string)* Screen ID (optional, empty = current screen).
zoneId out s *(string)* Adjacent zone UUID, or empty string.

<tt>getFirstZoneInDirection()</tt>

Return the edge zone in the given direction. Used when a window is not yet snapped and the user presses a navigation key: returns the leftmost, rightmost, topmost, or bottommost zone.

Arg Direction Type Description
direction in s *(string)* Direction: left, right, up, down.
screenId in s *(string)* Screen ID (optional, empty = current screen).
zoneId out s *(string)* Edge zone UUID, or empty string.

<tt>getZoneByNumber()</tt>

Return the zone UUID for a given zone number (1-indexed).

Arg Direction Type Description
zoneNumber in i *(int32)* Zone number (1-based).
screenId in s *(string)* Screen ID (optional, empty = current screen).
zoneId out s *(string)* Zone UUID, or empty string.

<tt>getAllZoneGeometries()</tt>

Return all zone geometries as a list of named geometry structs, optionally for a specific screen.

Arg Direction Type Description
screenId in s *(string)* Screen ID (optional, empty = all screens).
geometries out a(siiii) *(array<struct(string,int32,int32,int32,int32)>)* List of named zone geometry structs: (zoneId, x, y, width, height).

<tt>getKeyboardModifiers()</tt>

Return the current keyboard modifier state as a Qt::KeyboardModifiers bitmask. Values: 0x02000000=Shift, 0x04000000=Control, 0x08000000=Alt, 0x10000000=Meta.

Arg Direction Type Description
modifiers out i *(int32)* Modifier bitmask (0 if no modifiers pressed).

<tt>detectZoneWithModifiers()</tt>

Detect zone at position and return modifier state in a single D-Bus call. Returns zoneId;modifiers (e.g. uuid-here;33554432 for Shift). Empty zone ID if no zone found; modifiers still appended after semicolon.

Arg Direction Type Description
x in i *(int32)* Screen X coordinate.
y in i *(int32)* Screen Y coordinate.
result out s *(string)* String: zoneId;modifiers.

Signals

<tt>zoneDetected</tt>

Emitted when a zone is detected at a position.

Arg Direction Type Description
zoneId out s *(string)* Zone UUID.
geometry out (iiii) *(struct(int32,int32,int32,int32))* Zone geometry struct: (x, y, width, height).