JWM Source Documentation
client.h
Go to the documentation of this file.
00001 00010 #ifndef CLIENT_H 00011 #define CLIENT_H 00012 00013 #include "border.h" 00014 #include "hint.h" 00015 00017 typedef enum { 00018 BORDER_NONE = 0, 00019 BORDER_OUTLINE = 1 << 0, 00020 BORDER_TITLE = 1 << 1, 00021 BORDER_MIN = 1 << 2, 00022 BORDER_MAX = 1 << 3, 00023 BORDER_CLOSE = 1 << 4, 00024 BORDER_RESIZE = 1 << 5, 00025 BORDER_MOVE = 1 << 6, 00026 BORDER_MAX_V = 1 << 7, 00027 BORDER_MAX_H = 1 << 8 00028 } BorderFlags; 00029 00031 #define BORDER_DEFAULT ( \ 00032 BORDER_OUTLINE \ 00033 | BORDER_TITLE \ 00034 | BORDER_MIN \ 00035 | BORDER_MAX \ 00036 | BORDER_CLOSE \ 00037 | BORDER_RESIZE \ 00038 | BORDER_MOVE \ 00039 | BORDER_MAX_V \ 00040 | BORDER_MAX_H ) 00041 00043 typedef enum { 00044 STAT_NONE = 0, 00045 STAT_ACTIVE = 1 << 0, 00046 STAT_MAPPED = 1 << 1, 00047 STAT_HMAX = 1 << 2, 00048 STAT_VMAX = 1 << 3, 00049 STAT_HIDDEN = 1 << 4, 00050 STAT_STICKY = 1 << 5, 00051 STAT_NOLIST = 1 << 6, 00052 STAT_MINIMIZED = 1 << 7, 00053 STAT_SHADED = 1 << 8, 00054 STAT_WMDIALOG = 1 << 9, 00055 STAT_PIGNORE = 1 << 10, 00056 STAT_SHAPE = 1 << 11, 00057 STAT_SDESKTOP = 1 << 12, 00058 STAT_FULLSCREEN = 1 << 13, 00059 STAT_OPACITY = 1 << 14, 00060 STAT_NOFOCUS = 1 << 15 00061 } StatusFlags; 00062 00064 typedef struct ColormapNode { 00065 Window window; 00066 struct ColormapNode *next; 00067 } ColormapNode; 00068 00070 typedef struct AspectRatio { 00071 int minx; 00072 int miny; 00073 int maxx; 00074 int maxy; 00075 } AspectRatio; 00076 00078 typedef struct ClientNode { 00079 00080 Window window; 00081 Window parent; 00083 Window owner; 00085 int x, y; 00086 int width; 00087 int height; 00088 int oldx; 00089 int oldy; 00090 int oldWidth; 00091 int oldHeight; 00093 long sizeFlags; 00094 int baseWidth; 00095 int baseHeight; 00096 int minWidth; 00097 int minHeight; 00098 int maxWidth; 00099 int maxHeight; 00100 int xinc; 00101 int yinc; 00102 AspectRatio aspect; 00103 int gravity; 00105 Colormap cmap; 00106 ColormapNode *colormaps; 00108 char *name; 00109 char *instanceName; 00110 char *className; 00112 ClientState state; 00114 BorderActionType borderAction; 00115 00116 struct IconNode *icon; 00119 void (*controller)(int wasDestroyed); 00120 00121 struct ClientNode *prev; 00122 struct ClientNode *next; 00124 } ClientNode; 00125 00130 ClientNode *FindClientByWindow(Window w); 00131 00136 ClientNode *FindClientByParent(Window p); 00137 00141 ClientNode *GetActiveClient(); 00142 00143 void InitializeClients(); 00144 void StartupClients(); 00145 void ShutdownClients(); 00146 void DestroyClients(); 00147 00154 ClientNode *AddClientWindow(Window w, char alreadyMapped, char notOwner); 00155 00159 void RemoveClient(ClientNode *np); 00160 00164 void MinimizeClient(ClientNode *np); 00165 00169 void ShadeClient(ClientNode *np); 00170 00174 void UnshadeClient(ClientNode *np); 00175 00182 void SetClientWithdrawn(ClientNode *np); 00183 00188 void RestoreClient(ClientNode *np, char raise); 00189 00195 void MaximizeClient(ClientNode *np, char horiz, char vert); 00196 00200 void MaximizeClientDefault(ClientNode *np); 00201 00206 void SetClientFullScreen(ClientNode *np, char fullScreen); 00207 00211 void FocusClient(ClientNode *np); 00212 00214 void RefocusClient(); 00215 00219 void DeleteClient(ClientNode *np); 00220 00224 void KillClient(ClientNode *np); 00225 00229 void RaiseClient(ClientNode *np); 00230 00234 void LowerClient(ClientNode *np); 00235 00240 void RestackClients(); 00241 00246 void SetClientLayer(ClientNode *np, unsigned int layer); 00247 00252 void SetClientDesktop(ClientNode *np, unsigned int desktop); 00253 00259 void SetClientSticky(ClientNode *np, char isSticky); 00260 00265 void HideClient(ClientNode *np); 00266 00271 void ShowClient(ClientNode *np); 00272 00276 void UpdateClientColormap(ClientNode *np); 00277 00281 void SetShape(ClientNode *np); 00282 00287 void SendConfigureEvent(ClientNode *np); 00288 00294 void SendClientMessage(Window w, AtomType type, AtomType message); 00295 00299 void SetActiveClientOpacity(const char *str); 00300 00304 void SetInactiveClientOpacity(const char *str); 00305 00306 #endif /* CLIENT_H */ 00307