package oxbow

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Oxbow_state.WindowSource

include module type of Types.Window
Sourcemodule Lifecycle : sig ... end
Sourcemodule Request : sig ... end
Sourcemodule Presentation : sig ... end
Sourcemodule Size_hints : sig ... end
Sourcemodule Decoration_hint : sig ... end
Sourcemodule Scrolling_props : sig ... end
Sourcemodule Scratchpad_props : sig ... end
Sourcemodule Defense : sig ... end
Sourcemodule Swallow : sig ... end
Sourcemodule Committed : sig ... end
type t = {
  1. obj : Wire.Obj.Window_management.Window.t;
  2. node : Wire.Obj.Window_management.Node.t;
  3. mutable lifecycle : Lifecycle.t;
  4. id : int;
  5. mutable app_id : string option;
  6. mutable title : string option;
  7. mutable identifier : string option;
  8. mutable unreliable_pid : int32 option;
  9. mutable parent : t option;
  10. mutable float_seed_pending : bool;
  11. mutable close_pending : bool;
  12. mutable decoration_hint : Decoration_hint.t option;
  13. mutable presentation_hint : Wire.Presentation_mode.t option;
  14. mutable defense : Defense.t;
  15. mutable geom : int32 Oxbow_core.Rect.t;
  16. mutable float_rel : int32 Oxbow_core.Rect.t option;
  17. mutable clip : ([ `Scrolling | `Overview ] * int Oxbow_core.Rect.t) option;
  18. mutable offscreen : bool;
  19. mutable size_hints : int32 option Size_hints.t;
  20. mutable tags : Oxbow_core.Tag.Set.t;
  21. mutable output : Types.Output.t option;
  22. mutable output_before_evac : string option;
  23. mutable sticky : Oxbow_core.Sticky.t;
  24. swallow : Swallow.t;
  25. mutable labels : string list;
  26. mutable is_fixed : bool;
  27. mutable is_urgent : bool;
  28. mutable is_captured : bool;
  29. mutable is_fake_fullscreen : bool;
  30. scrolling : Scrolling_props.t;
  31. scratchpad : Scratchpad_props.t;
  32. committed : Committed.t;
  33. mutable presentation : Presentation.t;
  34. mutable requests : Request.t list;
}

create wm output river_window is a unique window.

Sourceval destroy : t -> unit

destroy window destroys the Wayland objects backing window. No-op (with a warning) when window's lifecycle isn't Closing.

Sourceval set_position : t -> x:int32 -> y:int32 -> unit

set_position window ~x ~y positions window at (x, y).

Effects: mutates WM state

Sourceval set_geom : t -> int32 Oxbow_core.Rect.t -> unit

set_geom window geom updates window's geometry to geom.

Effects: mutates WM state

Sourceval set_defense : t -> Defense.t -> unit

set_defense window d updates window's defense state to d.

Effects: mutates WM state

Sourceval set_proposed : t -> (int32 * int32) option -> unit

set_proposed window dims updates window's proposed dimensions to dims.

Effects: mutates WM state

Sourceval push_in_flight : t -> (int32 * int32) -> unit

push_in_flight window dims records the proposed dims not yet echoed.

Effects: mutates WM state

Sourceval consume_in_flight : t -> width:int32 -> height:int32 -> bool

consume_in_flight window ~width ~height is true when the size matches an entry. Entries older than the newest match drop; the match stays (one proposal can produce the same report more than once). On false the list clears.

Effects: mutates WM state

Sourceval set_fullscreen_on : t -> int32 option -> unit

set_fullscreen_on window output updates window's fullscreen output.

Effects: mutates WM state

Sourceval set_clip : t -> ([ `Scrolling | `Overview ] * int Oxbow_core.Rect.t) option -> unit

set_clip window clip updates window's clip mask to clip.

Effects: mutates WM state

Sourceval set_clip_within : t -> tag:[ `Scrolling | `Overview ] -> bw:int -> bound:int Oxbow_core.Rect.t option -> unit

set_clip_within window ~tag ~bw ~bound sets window's clip to according to tag when window intersets with bound.

Effects: mutates WM state

Sourceval set_offscreen : t -> bool -> unit

set_offscreen window v marks window outside the viewport in scrolling layouts.

Effects: mutates WM state

Sourceval reject_dimensions : t -> width:int32 -> height:int32 -> unit

reject_dimensions window ~width ~height records a client size report that does not match the layout. At most one bounce starts per distinct size.

Effects: mutates WM state

Sourceval on_tags : t -> tags:Oxbow_core.Tag.Set.t -> bool

on_tags window ~tags is true when window's tags intersect with tags.

Sourceval occupied_tags : ?except:t -> t list -> Oxbow_core.Tag.Set.t

occupied_tags ?except windows is the union of the tags of windows. The tags of except do not count.

Sourceval tag_visible : t -> bool

tag_visible window is true if window's output is in overview mode or window's tags intersect its output's selected tags. Is false otherwise. A stashed scratchpad is never tag-visible.

Sourceval is_tiled : t -> bool

is_tiled window is true when window is tiled.

Sourceval is_tiled_or_floating : t -> bool

is_tiled_or_floating window is true when window is tiled or floating.

Sourceval scroll_clipped : t -> bool

scroll_clipped w is true when w has a `Scrolling clip, is tiled and the layout of w's output is Scrolling.

Sourceval floats : t -> Types.Output.t -> bool

floats w o is true when w renders as a floating window on o. A window renders as floating when its presentation is Floating, or it is tiled and the layout of o is Floating.

Sourceval is_tiled_on_tag : t -> bool

is_tiled_on_tag window is tag_visible window && is_tiled window

Sourceval swallowing : t -> bool

swallowing window is true when window hides a terminal.

Sourceval can_swallow : t -> bool

can_swallow window is true when window is able to swallow its child.

Sourceval fit_to_output : t -> unit

fit_to_output window repositions and resizes window to fit on the output it is displayed on.

Effects: mutates WM state

Sourceval remember_float : t -> unit

remember_float window saves window's current geometry to restore when window transitions to the floating state.

Effects: mutates WM state

Sourceval restore_float : t -> unit

restore_float window places window at its remembered float on its current output. If window has no remembered float, it seeds at half the usable area, centered. The seed is then the remembered float.

Effects: mutates WM state

Sourceval center_float : t -> unit

center_float window centers window's current dimensions in the usable area and records the result.

Effects: mutates WM state

Sourceval tile : t -> unit

tile window puts window into the tiled state.

Effects: mutates WM state

Sourceval clamp : t -> int Oxbow_core.Rect.t -> int32 Oxbow_core.Rect.t

clamp window geom is geom clamped to window's size hints, if any. Converts to int32 rect

Sourceval clamp32 : t -> int32 Oxbow_core.Rect.t -> int32 Oxbow_core.Rect.t

clamp32 window geom is clamp but takes an int32 Rect.t.

Sourceval set_float_seed_pending : t -> bool -> unit

set_float_seed_pending window pending sets window's pending float seed flag to pending.

Effects: mutates WM state

Sourceval float : t -> unit

float window puts window in the floating state.

Effects: mutates WM state

Sourceval is_fullscreen : t -> bool

is_fullscreen window is true if window is fullscreen, false otherwise.

Sourceval fullscreen : ?force:bool -> t -> unit

fullscreen ?force window makes window fullscreen.

Effects: mutates WM state

Sourceval exit_fullscreen : t -> unit

exit_fullscreen window exit fullscreen and restore window to previous presentation states.

Effects: mutates WM state

Sourceval is_rendered : ?fullscreen:bool -> t -> bool

is_rendered ?fullscreen window is true when all of the following are true:

  • tag_visible window is true
  • window is not covered by a fullscreen window (window may be occluded by a non-fullscreen window.)
  • window's output is in the Scrolling layout and window is within output's scrolling viewport

fullscreen states that the output holds a visible fullscreen window. When absent, is_rendered scans the focus stack.

Sourceval queue_request : t -> Request.t -> unit

queue_request window request adds request to window's request queue.

Effects: mutates WM state

Sourceval clear_requests : t -> unit

clear_requests window clears window's request queue.

Effects: mutates WM state

Sourceval at_point : x:int32 -> y:int32 -> t list -> t option

at_point ~x ~y lst returns the first window in lst that is visible (per tag_visible) and whose geom rectangle contains the point (x, y), or None if none does.

Sourceval fake_fullscreen : t -> unit

fake_fullscreen window puts the window into the fake fullscreen state.

Effects: mutates WM state

Sourceval exit_fake_fullscreen : t -> unit

exit_fake_fullscreen window exits the fake fullscreen state for window.

Effects: mutates WM state

Sourceval maximize : ?restore:Presentation.Tile_or_float.t -> t -> unit

maximize ?restore window informs window it is maximized. Saves the previous presentation state or restore if present. No-op when window is fullscreen.

Effects: mutates WM state

Sourceval unmaximize : t -> unit

unmaximize window informs window it is unmaximized and restores window to its previous presentation.

Effects: mutates WM state

Sourceval move_to : t -> x:Oxbow_core.Extent.t -> y:Oxbow_core.Extent.t -> unit

move_to window ~x ~y moves window according to the extents ~x and ~y.

Effects: mutates WM state

move_spatial window dir by moves window in dir according to by extent.

Effects: mutates WM state

Sourceval resize_to : t -> width:Oxbow_core.Extent.t -> height:Oxbow_core.Extent.t -> unit

resize_to window ~width ~height resizes window according to the extents ~width and ~height.

Effects: mutates WM state

resize_spatial window dir by resizes window in dir according to by extent.

Effects: mutates WM state

Sourceval set_tags : t -> Oxbow_core.Tag.Set.t -> unit

set_tags window tags sets window's tags to tags.

Effects: mutates WM state

Sourceval set_consumes : t -> bool -> unit

set_consumes window v sets the consumes chain-bit on window to v.

Effects: mutates WM state

Sourceval set_scroll_width : t -> Oxbow_core.Width_fac.t -> unit

set_scroll_width window v sets the scroll-width override on window to v.

Effects: mutates WM state

Sourceval set_output : t -> Types.Output.t option -> unit

set_output window output sets window's output to output. Setting None records the current output's name if none has been recorded previously.

Effects: mutates WM state

Sourceval set_presentation : t -> Presentation.t -> unit

set_presentation window presentation sets window's presentation to presentation.

Effects: mutates WM state

Sourceval set_is_urgent : t -> bool -> unit

set_is_urgent window is_urgent sets window's urgent status to is_urgent.

Effects: mutates WM state

Sourceval set_is_captured : t -> bool -> unit

set_is_captured window is_captured sets window's captured status to is_captured.

Effects: mutates WM state

Sourceval set_lifecycle : t -> Lifecycle.t -> unit

set_lifecycle window lifecycle sets window's lifecycle to lifecycle.

Effects: mutates WM state

Sourceval set_title : t -> string option -> unit

set_title window title sets window's title to title.

Effects: mutates WM state

Sourceval set_app_id : t -> string option -> unit

set_app_id window app_id sets window's app id to app_id.

Effects: mutates WM state

Sourceval set_identifier : t -> string option -> unit

set_identifier window identifier sets window's identifier to identifier.

Effects: mutates WM state

Sourceval set_unreliable_pid : t -> int32 option -> unit

set_unreliable_pid window unreliable_pid sets window's (unreliable) process id to unreliable_pid.

Effects: mutates WM state

Sourceval set_parent : t -> parent:t option -> unit

set_parent window ~parent sets window's parent as parent.

Effects: mutates WM state

Sourceval set_close_pending : t -> bool -> unit

set_close_pending window pending sets window's pending close flag to pending.

Effects: mutates WM state

Sourceval set_decoration_hint : t -> Decoration_hint.t option -> unit

set_decoration_hint window hint sets window's decoration hint to hint.

Effects: mutates WM state

Sourceval set_presentation_hint : t -> Wire.Presentation_mode.t option -> unit

set_presentation_hint window hint sets window's presentation mode to hint.

Effects: mutates WM state

Sourceval set_size_hints : t -> int32 option Size_hints.t -> unit

set_size_hints window size_hints sets window's size hints to size_hints.

Effects: mutates WM state

Sourceval set_sticky : t -> Oxbow_core.Sticky.t -> unit

set_sticky window scope sets window's sticky scope to scope.

Effects: mutates WM state

Sourceval add_label : t -> string -> unit

add_label window label adds label to window's label set. No-op when the label is present.

Effects: mutates WM state

Sourceval remove_label : t -> string -> unit

remove_label window label removes label from window's label set. No-op when label is absent.

Effects: mutates WM state

Sourceval set_swallow_role : t -> Oxbow_core.Swallow_role.t -> unit

set_swallow_role window v updates window's swallow value to v.

Effects: mutates WM state

Sourceval set_swallow_relation : t -> Swallow.Relation.t option -> unit

set_swallow_relation window o updates window's swallow relation to o.

Effects: mutates WM state

Sourceval swallow : host:t -> child:t -> unit

swallow ~host ~child sets Swallowing host on child and Swallowed_by child on host.

Effects: mutate WM state

Sourceval set_is_fixed : t -> bool -> unit

set_is_fixed window is_fixed sets window's fixed status to is_fixed.

Effects: mutates WM state

Sourceval set_scratchpad : t -> string option -> unit

set_scratchpad window name sets window's scratchpad to name.

Effects: mutates WM state

Sourceval set_stashed : t -> bool -> unit

set_stashed window b sets window's scratchpad stashed status to b.

Effects: mutates WM state

Sourceval rehome : t -> string -> unit

rehome window name queues a request to send window to the output matching name, when window's home output matches name. No-op otherwise.

Effects: mutates WM state

Sourceval presentation_string : t -> string

presentation_string window is window's current presentation as one of "tiled", "floating", "maximized", or "fullscreen".

Sourceval set_informed_fullscreen : t -> bool option -> unit

set_informed_fullscreen window state sets window's last sent inform_fullscreen value to state.

Effects: mutates WM state

Sourceval set_informed_maximized : t -> bool option -> unit

set_informed_maximized window state sets window's last sent inform_maximized value to state.

Effects: mutates WM state

Sourceval set_informed_resizing : t -> bool option -> unit

set_informed_resizing window state sets window's last sent inform_resizing value to state.

Effects: mutates WM state

Sourceval set_caps : t -> int32 option -> unit

set_caps window caps sets window's last sent capabilities value to caps.

Effects: mutates WM state

Sourceval set_tiled_edges : t -> int32 option -> unit

set_tiled_edges window edges sets window's last sent tiled edges value to edges.

Effects: mutates WM state

Sourceval set_ssd : t -> bool option -> unit

set_ssd window state sets window's last sent ssd value to state.

Effects: mutates WM state

Sourceval set_borders : t -> Committed.borders option -> unit

set_borders window borders sets window's last sent border values to borders.

Effects: mutates WM state

Sourceval set_shown : t -> bool option -> unit

set_shown window shown sets window's last sent shown state to shown.

Effects: mutates WM state

Sourceval set_committed_position : t -> (int32 * int32) option -> unit

set_committed_position window position sets window's last sent position values to position.

Effects: mutates WM state

Sourceval set_clip_box : t -> (int32 * int32 * int32 * int32) option -> unit

set_clip_box window clip_box sets window's last sent clip box values to clip_box.

Effects: mutates WM state

Sourceval set_content_clip_box : t -> (int32 * int32 * int32 * int32) option -> unit

set_content_clip_box window clip_box sets window's last sent content clip box values to content_clip_box.

Effects: mutates WM state