summaryrefslogtreecommitdiff
path: root/src/managers/XWaylandManager.hpp
blob: 1d45bb3003de1914298eaa5bc952fbb7238cb3b6 (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
#pragma once

#include "../defines.hpp"
#include "../desktop/DesktopTypes.hpp"
#include <optional>

class CWLSurfaceResource;

class CHyprXWaylandManager {
  public:
    CHyprXWaylandManager();
    ~CHyprXWaylandManager();

    SP<CWLSurfaceResource> getWindowSurface(PHLWINDOW);
    void                   activateSurface(SP<CWLSurfaceResource>, bool);
    void                   activateWindow(PHLWINDOW, bool);
    CBox                   getGeometryForWindow(PHLWINDOW);
    void                   sendCloseWindow(PHLWINDOW);
    void                   setWindowFullscreen(PHLWINDOW, bool);
    bool                   shouldBeFloated(PHLWINDOW, bool pending = false);
    void                   checkBorders(PHLWINDOW);
    Vector2D               xwaylandToWaylandCoords(const Vector2D&);
    Vector2D               xwaylandToWaylandCoords(const Vector2D&, PHLMONITOR);
    Vector2D               waylandToXWaylandCoords(const Vector2D&);
    Vector2D               waylandToXWaylandCoords(const Vector2D&, PHLMONITOR);
};

inline UP<CHyprXWaylandManager> g_pXWaylandManager;