summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/WindowMode.h
blob: 3cb82ee1f8352f1215afb66f6d1c94176bb8eb85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Copyright (c) 2022, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

namespace WindowServer {

// WindowMode sets modal behavior for windows in a modal chain
//
// - Modeless:      No modal effect (default mode for parentless windows)
// - Passive:       Joins the modal chain but has no modal effect (default mode for child windows)
// - RenderAbove:   Renders above its parent
// - CaptureInput:  Captures input from its parent
// - Blocking:      Preempts all interaction with its modal chain excepting descendants (default mode for Dialogs)
enum class WindowMode {
    Modeless = 0,
    Passive,
    RenderAbove,
    CaptureInput,
    Blocking,
    _Count,
};

// InputPreemptors are Objects which take input precedence over the active input
// window without changing its activity state or joining its modal chain
enum class InputPreemptor {
    ContextMenu = 0,
    MenubarMenu,
    OtherMenu,
    Other,
};

}