gri3-wm/i3bar/include/ipc.h

41 lines
720 B
C
Raw Permalink Normal View History

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