salvatorx.h Example File

/**************************************************************************** ** ** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Safe Renderer module ** ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/
#ifndef INTEGRITYWINDOW_H #define INTEGRITYWINDOW_H #include <INTEGRITY.h> #include <memory_region.h> #include "r_mmgr_config.h" #include "r_config_wm.h" #include "r_mmgr_api.h" #include "r_wm_api.h" #include <QtSafeRenderer/qsaferenderer.h> #include <QtSafeRenderer/qsafelayout.h> #include <QtSafeRenderer/qsafewindow.h> using namespace SafeRenderer; class FrameBuffer : public AbstractFrameBuffer { friend class RasterWindow; public: FrameBuffer(int width, int height); virtual ~FrameBuffer(); PixelFormat format() const { return PixelFormat::RGBA8888_LE; } virtual quint8 *bits(); virtual quint32 bytesPerLine(); virtual quint8 bitsPerPixel(); enum WindowManagerException{FailedToInitializeDevice, FailedToSetScreenBackground, FailedToEnableScreen, FailedToCreateWindowLayer, FailedToRegisterVsyncEvent, FailedToEnableWindowSurface}; protected: void initWindow(); private: quint32 m_width; quint32 m_height; quint32 m_unit; r_wm_Window_t m_window; r_mmgr_MemBlock_t * free_FB_Window_buffer; }; class RasterWindow : public AbstractWindow { public: RasterWindow(const QSafeSize &size); void render(); AbstractFrameBuffer *buffer() { return &m_buffer; } private: FrameBuffer m_buffer; QSafeSize m_size; }; #endif

Available under certain Qt licenses.
Find out more.