1 #ifndef _BERRY_TYPES_H_ 2 #define _BERRY_TYPES_H_ 3 4 #include "config.h" 5 6 #include <X11/Xlib.h> 7 #include <stdbool.h> 8 #include <stdint.h> 9 10 #include "ipc.h" 11 12 struct client_geom { 13 int x, y, width, height; 14 }; 15 16 struct client { 17 Window window, dec; 18 int ws, x_hide; 19 bool decorated, hidden, fullscreen, mono, was_fs; 20 struct client_geom geom; 21 struct client_geom prev; 22 struct client *next, *f_next; 23 char title[512]; 24 }; 25 26 struct config { 27 int b_width, i_width, t_height, top_gap, bot_gap, left_gap, right_gap, r_step, m_step, move_mask, resize_mask, pointer_interval; 28 unsigned long bf_color, bu_color, if_color, iu_color; 29 bool focus_new, focus_motion, edge_lock, t_center, smart_place, draw_text, json_status, decorate, fs_remove_dec, fs_max; 30 bool follow_pointer, warp_pointer; 31 bool manage[WindowLast]; 32 }; 33 34 struct monitor { 35 int x, y, width, height, screen; 36 }; 37 38 enum atoms_net { 39 NetSupported, 40 NetNumberOfDesktops, 41 NetActiveWindow, 42 NetCurrentDesktop, 43 NetClientList, 44 NetWMStateFullscreen, 45 NetWMCheck, 46 NetWMState, 47 NetWMName, 48 NetWMWindowType, 49 NetWMWindowTypeMenu, 50 NetWMWindowTypeToolbar, 51 NetWMWindowTypeDock, 52 NetWMWindowTypeDialog, 53 NetWMWindowTypeUtility, 54 NetWMWindowTypeSplash, 55 NetWMDesktop, 56 NetWMFrameExtents, 57 NetWMMoveResize, 58 NetDesktopNames, 59 NetDesktopViewport, 60 NetLast 61 }; 62 63 enum atoms_wm { 64 WMDeleteWindow, 65 WMProtocols, 66 WMTakeFocus, 67 WMLast, 68 }; 69 70 enum berry_net { 71 BerryWindowStatus, 72 BerryClientEvent, 73 BerryFontProperty, 74 BerryLast 75 }; 76 77 enum direction { 78 EAST, 79 NORTH, 80 WEST, 81 SOUTH 82 }; 83 84 enum dec { 85 TOP, 86 LEFT, 87 RIGHT, 88 BOT, 89 TITLE, 90 DECLast 91 }; 92 93 #endif 94