move client functions to client.h and client.c

This commit is contained in:
2022-09-19 13:47:39 +02:00
parent 1efe8fe1eb
commit 495f515c98
6 changed files with 427 additions and 415 deletions

31
client.h Normal file
View File

@ -0,0 +1,31 @@
#ifndef CLIENT_H
#define CLIENT_H
#include "wm.h"
XWindowChanges wm_client_to_xwchanges(Client c);
Client* wm_client_find(Wm* wm, Window w);
Client *wm_get_last_client(Wm *wm, Monitor m);
Client* wm_client_create(Wm *wm, Window w);
void wm_client_hide(Wm *wm, Client *c);
void wm_client_show(Wm* wm, Client *c);
void wm_client_focus(Wm* wm, Client *c);
void wm_client_focus_dir(Wm* wm, Client *c, int dir);
void wm_client_free(Wm *wm, Client *c);
void wm_client_kill(Wm *wm, Client *c);
void wm_client_set_atom(Wm *wm, Client *c, const char *name, const unsigned char *data,
Atom type, int nelements);
Atom wm_client_get_atom(Wm *wm, Client *c, const char *name, unsigned char **atom_ret,
unsigned long *nitems_ret);
Client* wm_client_get_dir_rel_c(Client *c, int dir);
Client* wm_client_get_focused(Wm* wm);
void wm_client_border(Wm* wm, Client *c);
void wm_client_border_focused(Wm* wm, Client *c);
void wm_monitor_clients_border(Wm* wm, Monitor *m);
bool wm_client_is_focused(Wm* wm, Client *c);
#endif