Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
Loading...
Searching...
No Matches
PlatformInfo.h
Go to the documentation of this file.
1
/*
2
* Deskflow -- mouse and keyboard sharing utility
3
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
4
* SPDX-FileCopyrightText: (C) 2024 Synergy App Ltd
5
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6
*/
7
8
#pragma once
9
10
#include <QFileInfo>
11
#include <QSysInfo>
12
13
namespace
deskflow::platform
{
14
15
inline
bool
isWayland
()
16
{
17
return
qEnvironmentVariable(
"XDG_SESSION_TYPE"
) == QStringLiteral(
"wayland"
);
18
}
19
24
inline
bool
isWindows
()
25
{
26
return
QSysInfo::productType() == QStringLiteral(
"windows"
);
27
}
28
33
inline
bool
isMac
()
34
{
35
return
QSysInfo::productType() == QStringLiteral(
"macos"
);
36
}
37
42
inline
bool
isFlatpak
()
43
{
44
return
QFileInfo::exists(QStringLiteral(
"/.flatpak-info"
));
45
}
46
51
inline
bool
isSnap
()
52
{
53
return
qEnvironmentVariableIsSet(
"SNAP"
);
54
}
55
60
inline
bool
isSandboxed
()
61
{
62
return
isFlatpak
() ||
isSnap
();
63
}
64
65
}
// namespace deskflow::platform
deskflow::platform
Definition
PlatformInfo.h:13
deskflow::platform::isSandboxed
bool isSandboxed()
isSandboxed
Definition
PlatformInfo.h:60
deskflow::platform::isSnap
bool isSnap()
isSnap
Definition
PlatformInfo.h:51
deskflow::platform::isWayland
bool isWayland()
Definition
PlatformInfo.h:15
deskflow::platform::isWindows
bool isWindows()
isWindows
Definition
PlatformInfo.h:24
deskflow::platform::isMac
bool isMac()
isMac
Definition
PlatformInfo.h:33
deskflow::platform::isFlatpak
bool isFlatpak()
isFlatpak
Definition
PlatformInfo.h:42
src
lib
common
PlatformInfo.h
Generated by
1.18.0