-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxlibutil.h
More file actions
66 lines (57 loc) · 2.07 KB
/
xlibutil.h
File metadata and controls
66 lines (57 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef XUTIL_H
#define XUTIL_H
#include <QX11Info>
#include <QWindow>
#include <QScreen>
#include <QDebug>
#include <QApplication>
#include <QThread>
#include <QPixmap>
#include <QImage>
#include <QWindow>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xinerama.h>
#define ALL_DESKTOPS 0xFFFFFFFF
class Xlibutil
{
public:
Xlibutil();
void xactive(Window window);
void xminimize(Window window);
Window* xwindows(unsigned long *size);
int xwindowPid(Window window);
char* xwindowClass(Window window);
char* xwindowName(Window window);
char* xwindowType(Window window);
unsigned char* xwindowState(Window window);
Window xwindowID(int pid);
void xminimizeByClass(QString wmclass);
void xactiveByClass(QString wmclass);
bool xwindowExist(QString wmclass);
bool xisActive(QString wmclass);
Window xwindowIdByClass(QString wmclass);
bool xsingleActive(QString wmclass);
void xchange(Window window, const char * atom);
void xreservedSpace(Window window, int h);
unsigned char* windowProperty(Display *display, Window window, const char *arg, unsigned long *nitems, int *status);
QString xwindowLauncher(Window window);
void xaddDesktopFile(int pid, QString arg);
QPixmap xwindowScreenShot(Window window, bool argb = false);
QPixmap xwindowIcon(Window window, QSize size, bool smooth = false);
Atom atom(const char* atomName);
XWindowAttributes attrWindow(Display *display, Window window);
void resizeWindow(Display *display, Window window, int x, int y, unsigned int w, unsigned int h);
void xwindowClose(Window window);
void xchangeProperty(Window window, const char * atom, const char * internalAtom, int format);
void xchangeProperty(Window window, int atom, const char * internalAtom, int format);
void openboxChange(Window window, long atom);
int xwindowMove(Window win, int x, int y, int w, int h);
QString xgetWindowFocused();
private:
QThread t;
//Display *display = QX11Info::display();
};
#endif // XUTIL_H