#pragma once #include "defines.hpp" #include "helpers/LayerSurface.hpp" #include "helpers/PoolBuffer.hpp" enum eOutputMode { OUTPUT_CMYK = 0, OUTPUT_HEX, OUTPUT_RGB, OUTPUT_HSL, OUTPUT_HSV }; class CHyprpicker { public: void init(); std::mutex m_mtTickMutex; SP m_pCompositor; SP m_pRegistry; SP m_pSHM; SP m_pLayerShell; SP m_pScreencopyMgr; SP m_pCursorShapeMgr; SP m_pCursorShapeDevice; SP m_pSeat; SP m_pKeyboard; SP m_pPointer; wl_display* m_pWLDisplay = nullptr; xkb_context* m_pXKBContext = nullptr; xkb_keymap* m_pXKBKeymap = nullptr; xkb_state* m_pXKBState = nullptr; eOutputMode m_bSelectedOutputMode = OUTPUT_HEX; bool m_bFancyOutput = true; bool m_bAutoCopy = false; bool m_bRenderInactive = false; bool m_bNoZoom = false; bool m_bRunning = true; std::vector> m_vMonitors; std::vector> m_vLayerSurfaces; CLayerSurface* m_pLastSurface; Vector2D m_vLastCoords; void renderSurface(CLayerSurface*, bool forceInactive = false); int createPoolFile(size_t, std::string&); bool setCloexec(const int&); void recheckACK(); void initKeyboard(); void initMouse(); SP getBufferForLS(CLayerSurface*); void convertBuffer(SP); void* convert24To32Buffer(SP); void markDirty(); void finish(int code = 0); CColor getColorFromPixel(CLayerSurface*, Vector2D); private: }; inline std::unique_ptr g_pHyprpicker;