add libi3/ipc_connect, use it in i3-config-wizard, i3-input, i3bar

This commit is contained in:
Michael Stapelberg
2011-10-23 17:18:14 +01:00
parent 4539546f48
commit 4f57d49318
9 changed files with 46 additions and 99 deletions

View File

@ -53,6 +53,13 @@ char *sstrdup(const char *str);
*/
int sasprintf(char **strp, const char *fmt, ...);
/**
* Connects to the i3 IPC socket and returns the file descriptor for the
* socket. die()s if anything goes wrong.
*
*/
int ipc_connect(const char *socket_path);
/**
* Formats a message (payload) of the given size and type and sends it to i3 via
* the given socket file descriptor.