Hyprland/src/managers/input/InputMethodPopup.hpp

44 lines
1.1 KiB
C++
Raw Normal View History

2024-03-24 16:08:25 +00:00
#pragma once
#include "../../desktop/WLSurface.hpp"
#include "../../macros.hpp"
#include "../../helpers/math/Math.hpp"
#include "../../helpers/signal/Signal.hpp"
2024-03-24 16:08:25 +00:00
2024-05-01 16:41:17 +01:00
class CInputMethodPopupV2;
2024-03-24 16:08:25 +00:00
class CInputPopup {
public:
2024-05-01 16:41:17 +01:00
CInputPopup(SP<CInputMethodPopupV2> popup);
2024-03-24 16:08:25 +00:00
void damageEntire();
void damageSurface();
2024-03-24 16:08:25 +00:00
bool isVecInPopup(const Vector2D& point);
2024-03-24 16:08:25 +00:00
CBox globalBox();
SP<CWLSurfaceResource> getSurface();
2024-03-24 16:08:25 +00:00
void onCommit();
2024-05-01 16:41:17 +01:00
2024-03-24 16:08:25 +00:00
private:
SP<CWLSurface> queryOwner();
2024-05-01 16:41:17 +01:00
void updateBox();
void onDestroy();
void onMap();
void onUnmap();
WP<CInputMethodPopupV2> m_popup;
SP<CWLSurface> m_surface;
CBox m_lastBoxLocal;
MONITORID m_lastMonitor = MONITOR_INVALID;
2024-05-01 16:41:17 +01:00
struct {
CHyprSignalListener map;
CHyprSignalListener unmap;
CHyprSignalListener destroy;
CHyprSignalListener commit;
} m_listeners;
};