Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqnxwindowgrabber_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 Research In Motion
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
#
ifndef
QQnxWindowGrabber_H
4
#
define
QQnxWindowGrabber_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#
define
EGL_EGLEXT_PROTOTYPES
18
#
define
GL_GLEXT_PROTOTYPES
19
#
include
<
EGL
/
egl
.
h
>
20
#
include
<
GLES2
/
gl2
.
h
>
21
#
include
<
GLES2
/
gl2ext
.
h
>
22
#
include
<
EGL
/
eglext
.
h
>
23
#
include
<
QAbstractNativeEventFilter
>
24
#
include
<
QObject
>
25
#
include
<
QSize
>
26
#
include
<
QTimer
>
27
28
#
include
<
memory
>
29
30
#
include
<
screen
/
screen
.
h
>
31
32
QT_BEGIN_NAMESPACE
33
34
class
QRhi;
35
class
QQnxWindowGrabberImage
;
36
37
class
QQnxWindowGrabber
:
public
QObject
,
public
QAbstractNativeEventFilter
38
{
39
Q_OBJECT
40
41
public
:
42
struct
BufferView
43
{
44
int
width
= -1;
45
int
height
= -1;
46
int
stride
= -1;
47
48
unsigned
char
*
data
=
nullptr
;
49
50
static
constexpr
int
pixelSize
= 4;
// BGRX8888;
51
};
52
53
explicit
QQnxWindowGrabber
(QObject *parent = 0);
54
~
QQnxWindowGrabber
();
55
56
void
setFrameRate
(
int
frameRate);
57
58
void
setWindowId
(
const
QByteArray &windowId);
59
60
void
setRhi
(QRhi *rhi);
61
62
void
start
();
63
void
stop
();
64
65
void
pause
();
66
void
resume
();
67
68
void
forceUpdate
();
69
70
bool
nativeEventFilter
(
const
QByteArray &eventType,
void
*message, qintptr *result)
override
;
71
72
bool
handleScreenEvent
(screen_event_t event);
73
74
QByteArray
windowGroupId
()
const
;
75
76
bool
isEglImageSupported
()
const
;
77
78
int
getNextTextureId
();
79
BufferView
getNextBuffer
();
80
81
Q_SIGNALS
:
82
void
updateScene
(
const
QSize
&
size
);
83
84
private
Q_SLOTS
:
85
void
triggerUpdate
();
86
87
private
:
88
bool
selectBuffer();
89
void
resetBuffers();
90
void
checkForEglImageExtension();
91
92
QTimer m_timer;
93
94
QByteArray m_windowId;
95
96
screen_window_t m_windowParent;
97
screen_window_t m_window;
98
screen_context_t m_screenContext;
99
100
std::unique_ptr<QQnxWindowGrabberImage> m_frontBuffer;
101
std::unique_ptr<QQnxWindowGrabberImage> m_backBuffer;
102
103
QSize m_size;
104
105
QRhi *m_rhi;
106
107
bool
m_active;
108
bool
m_eglImageSupported;
109
bool
m_startPending;
110
};
111
112
QT_END_NAMESPACE
113
114
#
endif
QQnxWindowGrabberImage
Definition
qqnxwindowgrabber.cpp:34
QQnxWindowGrabberImage::QQnxWindowGrabberImage
QQnxWindowGrabberImage()
Definition
qqnxwindowgrabber.cpp:311
QQnxWindowGrabberImage::~QQnxWindowGrabberImage
~QQnxWindowGrabberImage()
Definition
qqnxwindowgrabber.cpp:319
QQnxWindowGrabberImage::initialize
bool initialize(screen_context_t screenContext)
Definition
qqnxwindowgrabber.cpp:325
QQnxWindowGrabberImage::getTexture
GLuint getTexture(screen_window_t window, const QSize &size)
Definition
qqnxwindowgrabber.cpp:395
QQnxWindowGrabberImage::getBuffer
QQnxWindowGrabber::BufferView getBuffer(screen_window_t window, const QSize &size)
Definition
qqnxwindowgrabber.cpp:378
QQnxWindowGrabber
Definition
qqnxwindowgrabber_p.h:38
QQnxWindowGrabber::QQnxWindowGrabber
QQnxWindowGrabber(QObject *parent=0)
Definition
qqnxwindowgrabber.cpp:57
QQnxWindowGrabber::stop
void stop()
Definition
qqnxwindowgrabber.cpp:133
QQnxWindowGrabber::~QQnxWindowGrabber
~QQnxWindowGrabber()
Definition
qqnxwindowgrabber.cpp:90
QQnxWindowGrabber::start
void start()
Definition
qqnxwindowgrabber.cpp:113
QQnxWindowGrabber::isEglImageSupported
bool isEglImageSupported() const
Definition
qqnxwindowgrabber.cpp:223
QQnxWindowGrabber::nativeEventFilter
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override
This method is called for every native event.
Definition
qqnxwindowgrabber.cpp:202
QQnxWindowGrabber::resume
void resume()
Definition
qqnxwindowgrabber.cpp:150
QQnxWindowGrabber::getNextBuffer
BufferView getNextBuffer()
Definition
qqnxwindowgrabber.cpp:297
QQnxWindowGrabber::setWindowId
void setWindowId(const QByteArray &windowId)
Definition
qqnxwindowgrabber.cpp:101
QQnxWindowGrabber::forceUpdate
void forceUpdate()
Definition
qqnxwindowgrabber.cpp:158
QQnxWindowGrabber::handleScreenEvent
bool handleScreenEvent(screen_event_t event)
Definition
qqnxwindowgrabber.cpp:166
QQnxWindowGrabber::windowGroupId
QByteArray windowGroupId() const
Definition
qqnxwindowgrabber.cpp:212
QQnxWindowGrabber::pause
void pause()
Definition
qqnxwindowgrabber.cpp:145
QQnxWindowGrabber::setFrameRate
void setFrameRate(int frameRate)
Definition
qqnxwindowgrabber.cpp:96
QQnxWindowGrabber::getNextTextureId
int getNextTextureId()
Definition
qqnxwindowgrabber.cpp:289
QQnxWindowGrabber::setRhi
void setRhi(QRhi *rhi)
Definition
qqnxwindowgrabber.cpp:106
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtmultimedia
src
plugins
multimedia
qnx
common
qqnxwindowgrabber_p.h
Generated on
for Qt by
1.18.0