GXDE Bernese
Loading...
Searching...
No Matches
window_geometry.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 WINDOW_UTILS_WINDOW_GEOMETRY_H_
19#define WINDOW_UTILS_WINDOW_GEOMETRY_H_
20
21#include "QPoint"
22#include "QRect"
23#include "QScreen"
24#include "QWidget"
25#include "QWindow"
26
27#include "bernese/export.h"
28
29namespace bernese {
30namespace window_utils {
31
45BERNESE_EXPORT QRect ToNativePixels(
46 const QRect& rect, const QPoint& screen_origin, qreal scale);
47
61BERNESE_EXPORT QRect FromNativePixels(
62 const QRect& rect, const QPoint& screen_origin, qreal scale);
63
75BERNESE_EXPORT QRect NativeWindowGeometry(const QWindow* window);
76
88BERNESE_EXPORT void SetTopLevelGeometry(
89 QWidget* widget, QScreen* screen, const QRect& rect);
90
101BERNESE_EXPORT void SetTopLevelWindowGeometry(
102 QWindow* window, QScreen* screen, const QRect& rect);
103
104} // namespace window_utils
105} // namespace bernese
106
107#endif // WINDOW_UTILS_WINDOW_GEOMETRY_H_