<commit_before>#ifndef WORKSPACE_MANAGER_HPP
#define WORKSPACE_MANAGER_HPP

#include <functional>
#include <vector>
#include <wayfire/view.hpp>

namespace wf
{
/**
 * The workspace implementation is a way for plugins to request more detailed
 * control over what happens on the given workspace. For example a tiling
 * plugin would disable move and/or resize operations for some views.
 */
struct workspace_implementation_t
{
    virtual bool view_movable(wayfire_view view) = 0;
    virtual bool view_resizable(wayfire_view view) = 0;
    virtual ~workspace_implementation_t() {}
};

/**
 * Wayfire organizes views into several layers, in order to simplify z ordering.
 */
enum layer_t
{
    /* The lowest layer, typical clients here are backgrounds */
    LAYER_BACKGROUND = (1 << 0),
    /* The bottom layer */
    LAYER_BOTTOM     = (1 << 1),
    /* The workspace layer is where regular views are placed */
    LAYER_WORKSPACE  = (1 << 2),
    /* The xwayland layer is used for Xwayland O-R windows */
    LAYER_XWAYLAND   = (1 << 3),
    /* The top layer. Typical clients here are non-autohiding panels */
    LAYER_TOP        = (1 << 4),
    /* The fullscreen layer, used only for fullscreen views */
    LAYER_FULLSCREEN = (1 << 5),
    /* The lockscreen layer, typically lockscreens or autohiding panels */
    LAYER_LOCK       = (1 << 6),
    /* The layer where "desktop widgets" are positioned, for example an OSK
     * or a sound control popup */
    LAYER_DESKTOP_WIDGET = (1 << 7),

    /* The minimized layer. It has no z order since it is not visible at all */
    LAYER_MINIMIZED  = (1 << 8)
};

constexpr int TOTAL_LAYERS = 9;

/* The layers where regular views are placed */
constexpr int WM_LAYERS     = (wf::LAYER_WORKSPACE  | wf::LAYER_FULLSCREEN);
/* All layers which are used for regular clients */
constexpr int MIDDLE_LAYERS = (wf::WM_LAYERS        | wf::LAYER_XWAYLAND);
/* All layers which typically sit on top of other layers */
constexpr int ABOVE_LAYERS  = (wf::LAYER_TOP        | wf::LAYER_LOCK |
                               wf::LAYER_DESKTOP_WIDGET);
/* All layers which typically sit below other layers */
constexpr int BELOW_LAYERS  = (wf::LAYER_BACKGROUND | wf::LAYER_BOTTOM);

/* All visible layers */
constexpr int VISIBLE_LAYERS = (wf::MIDDLE_LAYERS | wf::ABOVE_LAYERS |<commit_msg>workspace-manager: make unmanaged views on top of fullscreen<commit_after>#ifndef WORKSPACE_MANAGER_HPP
#define WORKSPACE_MANAGER_HPP

#include <functional>
#include <vector>
#include <wayfire/view.hpp>

namespace wf
{
/**
 * The workspace implementation is a way for plugins to request more detailed
 * control over what happens on the given workspace. For example a tiling
 * plugin would disable move and/or resize operations for some views.
 */
struct workspace_implementation_t
{
    virtual bool view_movable(wayfire_view view) = 0;
    virtual bool view_resizable(wayfire_view view) = 0;
    virtual ~workspace_implementation_t() {}
};

/**
 * Wayfire organizes views into several layers, in order to simplify z ordering.
 */
enum layer_t
{
    /* The lowest layer, typical clients here are backgrounds */
    LAYER_BACKGROUND = (1 << 0),
    /* The bottom layer */
    LAYER_BOTTOM     = (1 << 1),
    /* The workspace layer is where regular views are placed */
    LAYER_WORKSPACE  = (1 << 2),
    /* The top layer. Typical clients here are non-autohiding panels */
    LAYER_TOP        = (1 << 3),
    /* The fullscreen layer, used only for fullscreen views */
    LAYER_FULLSCREEN = (1 << 4),
    /* The xwayland layer is used for Xwayland O-R windows */
    LAYER_XWAYLAND   = (1 << 5),
    /* The lockscreen layer, typically lockscreens or autohiding panels */
    LAYER_LOCK       = (1 << 6),
    /* The layer where "desktop widgets" are positioned, for example an OSK
     * or a sound control popup */
    LAYER_DESKTOP_WIDGET = (1 << 7),

    /* The minimized layer. It has no z order since it is not visible at all */
    LAYER_MINIMIZED  = (1 << 8)
};

constexpr int TOTAL_LAYERS = 9;

/* The layers where regular views are placed */
constexpr int WM_LAYERS     = (wf::LAYER_WORKSPACE  | wf::LAYER_FULLSCREEN);
/* All layers which are used for regular clients */
constexpr int MIDDLE_LAYERS = (wf::WM_LAYERS        | wf::LAYER_XWAYLAND);
/* All layers which typically sit on top of other layers */
constexpr int ABOVE_LAYERS  = (wf::LAYER_TOP        | wf::LAYER_LOCK |
                               wf::LAYER_DESKTOP_WIDGET);
/* All layers which typically sit below other layers */
constexpr int BELOW_LAYERS  = (wf::LAYER_BACKGROUND | wf::LAYER_BOTTOM);

/* All visible layers */
constexpr int VISIBLE_LAYERS = (wf::MIDDLE_LAYERS | wf::ABOVE_LAYERS |
{'fraction_non_alphanumeric': 0.09584664536741214, 'fraction_numerical': 0.008945686900958467, 'mean_word_length': 3.2807657247037376, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6524436', 'n_tokens_mistral': 1538, 'n_tokens_neox': 1455, 'n_words': 511}