2010-08-07 12:05:16 -04:00
|
|
|
/*
|
2011-10-25 16:19:38 -04:00
|
|
|
* vim:ts=4:sw=4:expandtab
|
2010-08-07 12:05:16 -04:00
|
|
|
*
|
2011-10-25 16:19:38 -04:00
|
|
|
* i3bar - an xcb-based status- and ws-bar for i3
|
2015-04-03 20:17:56 -04:00
|
|
|
* © 2010 Axel Wagner and contributors (see also: LICENSE)
|
2010-08-07 12:05:16 -04:00
|
|
|
*
|
2011-10-25 16:19:38 -04:00
|
|
|
* ipc.c: Communicating with i3
|
2010-08-07 12:05:16 -04:00
|
|
|
*
|
|
|
|
*/
|
2013-12-28 21:11:50 -05:00
|
|
|
#pragma once
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-07-22 22:43:43 -04:00
|
|
|
#include <stdint.h>
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-08-06 20:10:05 -04:00
|
|
|
/*
|
|
|
|
* Initiate a connection to i3.
|
2015-03-23 15:56:49 -04:00
|
|
|
* socket_path must be a valid path to the ipc_socket of i3
|
2010-08-06 20:10:05 -04:00
|
|
|
*
|
|
|
|
*/
|
2010-07-22 22:43:43 -04:00
|
|
|
int init_connection(const char *socket_path);
|
2010-08-06 20:10:05 -04:00
|
|
|
|
2010-12-26 13:29:57 -05:00
|
|
|
/*
|
|
|
|
* Destroy the connection to i3.
|
|
|
|
*
|
|
|
|
*/
|
2012-08-23 06:55:28 -04:00
|
|
|
void destroy_connection(void);
|
2010-12-26 13:29:57 -05:00
|
|
|
|
2010-08-06 20:10:05 -04:00
|
|
|
/*
|
2015-03-24 08:41:16 -04:00
|
|
|
* Sends a message to i3.
|
2010-08-06 20:10:05 -04:00
|
|
|
* type must be a valid I3_IPC_MESSAGE_TYPE (see i3/ipc.h for further information)
|
|
|
|
*
|
|
|
|
*/
|
2014-06-19 05:20:32 -04:00
|
|
|
int i3_send_msg(uint32_t type, const char *payload);
|
2010-08-06 20:10:05 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Subscribe to all the i3-events, we need
|
|
|
|
*
|
|
|
|
*/
|
2012-08-23 06:55:28 -04:00
|
|
|
void subscribe_events(void);
|