lolautoaccept/include/x11helper.h

36 lines
656 B
C++

#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:
static const Window InvalidWindow;
static const bool IsSupported;
explicit X11Helper(QObject* parent = nullptr);
virtual ~X11Helper();
Window findWindow(const QString& name, float aspektRatio = 0.0);
public slots:
void map(Window win);
void unmap(Window win);
void setMap(Window win, bool b);
private:
Window searchWindows(Window top, const QString& search, float aspektRatio);
#ifdef X11SUPPORT
Display* disp;
#endif
};
#endif // X11HELPER_H