diff options
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfscursor.h')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfscursor.h | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfscursor.h b/src/plugins/platforms/eglfs/qeglfscursor.h index c8c4a8307c..464b52e195 100644 --- a/src/plugins/platforms/eglfs/qeglfscursor.h +++ b/src/plugins/platforms/eglfs/qeglfscursor.h @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE class QOpenGLShaderProgram; +class QEglFSScreen; class QEglFSCursor : public QPlatformCursor { @@ -64,15 +65,34 @@ public: QRect cursorRect() const; - void render(); + virtual void paintOnScreen(); + +protected: + bool setCurrentCursor(QCursor *cursor); + void draw(const QRectF &rect); + void update(const QRegion ®ion); + + QEglFSScreen *m_screen; + + // current cursor information + struct Cursor { + Cursor() : texture(0), shape(Qt::BlankCursor), customCursorTexture(0) { } + uint texture; // a texture from 'image' or the atlas + Qt::CursorShape shape; + QRectF textureRect; // normalized rect inside texture + QSize size; // size of the cursor + QPoint hotSpot; + QImage customCursorImage; + uint customCursorTexture; + } m_cursor; + + QPoint m_pos; // current cursor position private: void createShaderPrograms(); static void createCursorTexture(uint *texture, const QImage &image); void initCursorAtlas(); - QPlatformScreen *m_screen; - // cursor atlas information struct CursorAtlas { CursorAtlas() : cursorsPerRow(0), texture(0), cursorWidth(0), cursorHeight(0) { } @@ -84,20 +104,6 @@ private: QImage image; // valid until it's uploaded } m_cursorAtlas; - // current cursor information - struct Cursor { - Cursor() : texture(0), shape(Qt::BlankCursor), customCursorTexture(0) { } - uint texture; // a texture from 'image' or the atlas - Qt::CursorShape shape; - QRectF textureRect; // normalized rect inside texture - QSize size; // size of the cursor - QPoint hotSpot; - QImage customCursorImage; - uint customCursorTexture; - } m_cursor; - - QPoint m_pos; - GLuint m_program; int m_vertexCoordEntry; int m_textureCoordEntry; |