#pragma once #include "../../helpers/WLListener.hpp" #include "../../desktop/WLSurface.hpp" #include "../../macros.hpp" #include "../../helpers/math/Math.hpp" #include "../../helpers/signal/Signal.hpp" class CInputMethodPopupV2; class CInputPopup { public: CInputPopup(SP popup); void damageEntire(); void damageSurface(); bool isVecInPopup(const Vector2D& point); CBox globalBox(); SP getSurface(); void onCommit(); private: SP queryOwner(); void updateBox(); void onDestroy(); void onMap(); void onUnmap(); WP popup; SP surface; CBox lastBoxLocal; uint64_t lastMonitor = -1; struct { CHyprSignalListener map; CHyprSignalListener unmap; CHyprSignalListener destroy; CHyprSignalListener commit; } listeners; };