--- src/window.h.orig 2026-04-27 01:24:46.568362812 +0000 +++ src/window.h 2026-04-27 01:48:20.287935027 +0000 @@ -7,12 +7,15 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include +#include class Window { public: @@ -21,6 +24,7 @@ using ResizeCb = std::function; using SelectionCb = std::function; using ScrollCb = std::function; + using DropCb = std::function&)>; Window(); ~Window(); @@ -30,6 +34,7 @@ void set_resize_cb(ResizeCb resize_cb); void set_selection_cb(SelectionCb selection_cb); void set_scroll_cb(ScrollCb scroll_cb); + void set_drop_cb(DropCb drop_cb); Error Initialize(int width, int height, bool hwaccel, int vsync, const Theme& theme); bool isopen(); @@ -49,6 +54,7 @@ ResizeCb m_resize_cb; SelectionCb m_selection_cb; ScrollCb m_scroll_cb; + DropCb m_drop_cb; Error CreateSurface(); @@ -61,16 +67,18 @@ int mods); static void StaticScrollCallback(GLFWwindow *glfw_window, double xoffset, double yoffset); + static void StaticDropCallback(GLFWwindow *glfw_window, int count, + const char **paths); GLFWwindow *m_window{nullptr}; GLFWcursor *m_cursor{nullptr}; int m_fb_width, m_fb_height; bool m_selection_active{false}; + int m_stencil_bits{8}; std::unique_ptr m_gl{new GLManager}; GrGLFramebufferInfo m_info; - sk_sp m_interface; - sk_sp m_context; + sk_sp m_context; std::unique_ptr m_target; sk_sp m_surface; };