lolautoaccept/include/x11helper.h

36 lines
656 B
C
Raw Permalink Normal View History

2023-09-05 22:20:06 +02:00
#ifndef X11HELPER_H
#define X11HELPER_H
#include <QObject>
using Window = unsigned long;
struct _XDisplay;
using Display = struct _XDisplay;
class X11Helper : public QObject
{
Q_OBJECT
public:
2023-09-06 21:17:05 +02:00
static const Window InvalidWindow;
static const bool IsSupported;
2023-09-05 22:20:06 +02:00
explicit X11Helper(QObject* parent = nullptr);
virtual ~X11Helper();
2023-10-21 21:30:25 +02:00
Window findWindow(const QString& name, float aspektRatio = 0.0);
2023-09-05 22:20:06 +02:00
public slots:
void map(Window win);
void unmap(Window win);
void setMap(Window win, bool b);
private:
2023-10-21 21:30:25 +02:00
Window searchWindows(Window top, const QString& search, float aspektRatio);
2023-09-05 22:20:06 +02:00
2023-09-06 21:17:05 +02:00
#ifdef X11SUPPORT
2023-09-05 22:20:06 +02:00
Display* disp;
2023-09-06 21:17:05 +02:00
#endif
2023-09-05 22:20:06 +02:00
};
#endif // X11HELPER_H