rexglue-skate3/include/rex/ui/surface_gnulinux.h
2026-05-18 22:41:13 +01:00

37 lines
1.2 KiB
C++

#pragma once
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2021 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*
* @modified Tom Clay, 2026 - Adapted for ReXGlue runtime
*/
#include <rex/ui/surface.h>
#include <xcb/xcb.h>
namespace rex {
namespace ui {
class XcbWindowSurface final : public Surface {
public:
explicit XcbWindowSurface(xcb_connection_t* connection, xcb_window_t window)
: connection_(connection), window_(window) {}
TypeIndex GetType() const override { return kTypeIndex_XcbWindow; }
xcb_connection_t* connection() const { return connection_; }
xcb_window_t window() const { return window_; }
protected:
bool GetSizeImpl(uint32_t& width_out, uint32_t& height_out) const override;
private:
xcb_connection_t* connection_;
xcb_window_t window_;
};
} // namespace ui
} // namespace rex