-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstance.h
More file actions
89 lines (63 loc) · 2.22 KB
/
instance.h
File metadata and controls
89 lines (63 loc) · 2.22 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//
// Created by jaakko on 9.4.2020.
//
#ifndef WM_INSTANCE_H
#define WM_INSTANCE_H
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "types.h"
extern int wmMouseX;
extern int wmMouseY;
extern unsigned wmActiveWorkspace;
typedef enum { RIGHT, LEFT } wmHorizontalDirection;
typedef enum { DOWN, UP } wmVerticalDirection;
extern wmWorkspace wmWorkspaces[];
extern int wmRunning;
extern int wmExitCode;
extern Cursor wmCursors[];
extern Display* wmDisplay;
extern Window wmRoot;
extern int wmDepth;
extern Visual* wmVisual;
extern Colormap wmColormap;
extern int wmScreenWidth;
extern int wmScreenHeight;
extern int skipNextEnterNotify;
#define _NET_WM_WINDOW_TYPE_SUPPORTED_COUNT 1
#define _NET_WM_STATE_SUPPORTED_COUNT 3
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
typedef struct {
Atom* atom;
void (*handler)(XClientMessageEvent*);
} ClientMessageHandler;
extern const unsigned clientMessageHandlersCount;
extern ClientMessageHandler clientMessageHandler[];
int wmInitialize();
void wmRun();
void wmFree();
wmWindow* wmNextVisibleWindow(unsigned workspace);
wmWindow* wmPreviousVisibleWindow(unsigned workspace);
void wmMoveActiveWindow(unsigned workspace);
void wmToggleActiveWindow(unsigned workspaceIndex);
void wmFocusWindow(wmWindow* window);
void wmRequestCloseWindow(wmWindow* window);
void wmNewWindow(Window window, const XWindowAttributes* attributes);
void wmFreeWindow(wmWindow* window);
wmWindow* wmWindowTowmWindow(Window window);
void wmSelectWorkspace(unsigned workspaceIndex);
void wmShowActiveWorkspace();
void wmLowerSplit(wmSplitMode orientation);
void wmRaiseSplit(wmSplitMode orientation);
void wmUpdateBorders();
void wmMoveLeftEdgeHorizontally(wmHorizontalDirection direction);
void wmMoveRightEdgeHorizontally(wmHorizontalDirection direction);
void wmMoveUpperEdgeVertically(wmVerticalDirection direction);
void wmMoveLowerEdgeVertically(wmVerticalDirection direction);
void wmConfigureWindow(wmWindow* window);
void wmUpdateBounds();
void wmMoveNode(wmMoveDirection direction);
void wmUpdateMouseCoords();
void wmToggleFullscreen();
#endif //WM_INSTANCE_H