summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxlgmon.h
blob: 50344b6774789d58cb926052dd8c99d04077963d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2014 BlackBerry Limited. All rights reserved.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QQNXLGMON_H
#define QQNXLGMON_H

#include <qglobal.h>

#if defined(QQNX_LGMON)
#include <lgmon.h>
#endif

QT_BEGIN_NAMESPACE

#if defined(QQNX_LGMON)

extern bool qqnxLgmonFirstFrame;

inline void qqnxLgmonInit()
{
    lgmon_supported(getpid());
}

inline void qqnxLgmonFramePosted(bool isCover)
{
    if (qqnxLgmonFirstFrame && !isCover) {
        qqnxLgmonFirstFrame = false;
        lgmon_app_ready_for_user_input(getpid());
    }
}

#else

inline void qqnxLgmonInit() {}
inline void qqnxLgmonFramePosted(bool /*isCover*/) {}

#endif

QT_END_NAMESPACE

#endif  // QQNXLGMON_H