15#include <yajl/yajl_gen.h>
16#include <yajl/yajl_parse.h>
59#define IPC_HANDLER(name) \
60 static void handle_##name(ipc_client *client, uint8_t *message, \
61 int size, uint32_t message_size, \
62 uint32_t message_type)
88void ipc_send_event(
const char *event, uint32_t message_type,
const char *payload);
107void dump_node(yajl_gen gen,
Con *con,
bool inplace_restart);
void ipc_set_kill_timeout(ev_tstamp new)
Set the maximum duration that we allow for a connection with an unwriteable socket.
void(* handler_t)(ipc_client *, uint8_t *, int, uint32_t, uint32_t)
void dump_node(yajl_gen gen, Con *con, bool inplace_restart)
void ipc_confirm_restart(ipc_client *client)
Sends a restart reply to the IPC client on the specified fd.
ipc_client * ipc_new_client_on_fd(EV_P_ int fd)
ipc_new_client_on_fd() only sets up the event handler for activity on the new connection and inserts ...
char * current_socketpath
void ipc_send_binding_event(const char *event_type, Binding *bind, const char *modename)
For the binding events, we send the serialized binding struct.
shutdown_reason_t
Calls to ipc_shutdown() should provide a reason for the shutdown.
@ SHUTDOWN_REASON_RESTART
void ipc_shutdown(shutdown_reason_t reason, int exempt_fd)
Calls shutdown() on each socket and closes it.
void ipc_send_workspace_event(const char *change, Con *current, Con *old)
For the workspace events we send, along with the usual "change" field, also the workspace container i...
void ipc_new_client(EV_P_ struct ev_io *w, int revents)
Handler for activity on the listening socket, meaning that a new client has just connected and we sho...
void ipc_send_barconfig_update_event(Barconfig *barconfig)
For the barconfig update events, we send the serialized barconfig.
void ipc_send_event(const char *event, uint32_t message_type, const char *payload)
Sends the specified event to all IPC clients which are currently connected and subscribed to this kin...
yajl_gen ipc_marshal_workspace_event(const char *change, Con *current, Con *old)
Generates a json workspace event.
struct ipc_client ipc_client
void ipc_send_window_event(const char *property, Con *con)
For the window events we send, along the usual "change" field, also the window container,...
Holds the status bar configuration (i3bar).
Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed...
A 'Con' represents everything from the X11 root window down to a single X11 window.
TAILQ_ENTRY(ipc_client) clients
struct ev_io * read_callback
struct ev_timer * timeout
struct ev_io * write_callback