File indexing completed on 2024-04-28 04:58:58
0001 /* This file is part of the KDE project 0002 Copyright (C) 2017 Alexey Min <alexey.min@gmail.com> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 */ 0009 #ifndef KRFB_FRAMEBUFFER_XCB_XCB_FRAMEBUFFER_H 0010 #define KRFB_FRAMEBUFFER_XCB_XCB_FRAMEBUFFER_H 0011 0012 #include "framebuffer.h" 0013 #include <QWidget> 0014 #include <xcb/xcb.h> 0015 0016 0017 0018 /** 0019 @author Alexey Min <alexey.min@gmail.com> 0020 */ 0021 class XCBFrameBuffer: public FrameBuffer 0022 { 0023 Q_OBJECT 0024 public: 0025 explicit XCBFrameBuffer(QObject *parent = nullptr); 0026 ~XCBFrameBuffer() override; 0027 0028 public: 0029 QList<QRect> modifiedTiles() override; 0030 int depth() override; 0031 int height() override; 0032 int width() override; 0033 int paddedWidth() override; 0034 void getServerFormat(rfbPixelFormat &format) override; 0035 void startMonitor() override; 0036 void stopMonitor() override; 0037 0038 public: 0039 void handleXDamageNotify(xcb_generic_event_t *xevent); 0040 0041 private: 0042 void cleanupRects(); 0043 0044 class P; 0045 P *const d; 0046 }; 0047 0048 #endif