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

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

class CWindow; // because clangd
typedef SP<CWindow> PHLWINDOW;
class CWLSurfaceResource;

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

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

inline std::unique_ptr<CHyprXWaylandManager> g_pXWaylandManager;