GXDE Bernese
Loading...
Searching...
No Matches
x11_info.h
1/*
2 * Copyright (C) 2026 CharOfString <root@charofstring.cc>
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation, either version 3 of the License, or (at your option)
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef X11_INFO_X11_INFO_H_
19#define X11_INFO_X11_INFO_H_
20
21#include "QGuiApplication"
22#include "QWindow"
23#include "X11/Xlib.h"
24#include "xcb/xcb.h"
25
26#include "bernese/export.h"
27
28namespace bernese {
29
30class BERNESE_EXPORT X11Info {
31 public:
38 static bool IsPlatformX11();
39
48 static Display* GetDisplay();
49
58 static xcb_connection_t* GetConnection();
59
66 static Time GetTimestamp();
67};
68
69} // namespace bernese
70
71#endif // X11_INFO_X11_INFO_H_
Definition x11_info.h:30
static xcb_connection_t * GetConnection()
Access the XCB connection we already have.
Definition x11_info.cc:50
static Time GetTimestamp()
Get an X server timestamp.
Definition x11_info.cc:59
static bool IsPlatformX11()
Check whether we're using Qt XCB platform.
Definition x11_info.cc:30
static Display * GetDisplay()
Access the Xlib display connection.
Definition x11_info.cc:40