2023-02-16 13:51:55 +08:00
|
|
|
// Copyright (C) 2015 ~ 2018 Deepin Technology Co., Ltd.
|
|
|
|
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
|
2022-09-06 11:36:55 +08:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
2016-02-04 10:01:38 +08:00
|
|
|
|
2015-07-16 15:52:14 +08:00
|
|
|
#ifndef XCB_MISC_H
|
|
|
|
#define XCB_MISC_H
|
|
|
|
|
2016-02-29 15:00:51 +08:00
|
|
|
#include <QtCore>
|
|
|
|
|
2015-07-16 15:52:14 +08:00
|
|
|
#include <xcb/xcb_ewmh.h>
|
|
|
|
|
|
|
|
class XcbMisc
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum Orientation {
|
|
|
|
OrientationLeft,
|
|
|
|
OrientationRight,
|
|
|
|
OrientationTop,
|
|
|
|
OrientationBottom
|
|
|
|
};
|
|
|
|
|
2015-07-16 19:51:42 +08:00
|
|
|
enum WindowType {
|
|
|
|
Dock,
|
|
|
|
Desktop
|
|
|
|
};
|
|
|
|
|
2015-07-16 15:52:14 +08:00
|
|
|
virtual ~XcbMisc();
|
|
|
|
|
|
|
|
static XcbMisc * instance();
|
|
|
|
|
2015-07-16 19:51:42 +08:00
|
|
|
void set_window_type(xcb_window_t winId, WindowType winType);
|
2016-06-15 11:09:34 +08:00
|
|
|
void clear_strut_partial(xcb_window_t winId);
|
2015-07-16 19:51:42 +08:00
|
|
|
void set_strut_partial(xcb_window_t winId, Orientation orientation, uint strut, uint start, uint end);
|
2016-02-29 15:00:51 +08:00
|
|
|
void set_window_icon_geometry(xcb_window_t winId, QRect geo);
|
2015-07-16 15:52:14 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
XcbMisc();
|
|
|
|
|
|
|
|
xcb_ewmh_connection_t m_ewmh_connection;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // XCB_MISC_H
|