mirror of
https://github.com/swaywm/sway.git
synced 2024-11-30 03:41:27 +00:00
6f7cbf2eac
This makes IPC GET_PIXELS use the new `wlc_pixels_read` call instead of the deprecated `wlc_output_get_pixels`. The old version worked by passing a callback function to wlc which would grab the pixels and send them to the IPC client. The new version works by maintaining a list of clients who have requested the pixels of some output and then grap and send the pixels in the output_post_render hook of the `wlc_interface`.
38 lines
967 B
C
38 lines
967 B
C
#ifndef _SWAY_IPC_SERVER_H
|
|
#define _SWAY_IPC_SERVER_H
|
|
|
|
#include <wlc/wlc.h>
|
|
|
|
#include "container.h"
|
|
#include "config.h"
|
|
#include "ipc.h"
|
|
|
|
void ipc_init(void);
|
|
void ipc_terminate(void);
|
|
struct sockaddr_un *ipc_user_sockaddr(void);
|
|
|
|
void ipc_event_workspace(swayc_t *old, swayc_t *new, const char *change);
|
|
void ipc_event_barconfig_update(struct bar_config *bar);
|
|
/**
|
|
* Send IPC mode event to all listening clients
|
|
*/
|
|
void ipc_event_mode(const char *mode);
|
|
/**
|
|
* Sends an IPC modifier event to all listening clients. The modifier event
|
|
* includes a key 'change' with the value of state and a key 'modifier' with
|
|
* the name of that modifier.
|
|
*/
|
|
void ipc_event_modifier(uint32_t modifier, const char *state);
|
|
/**
|
|
* Send IPC keyboard binding event.
|
|
*/
|
|
void ipc_event_binding_keyboard(struct sway_binding *sb);
|
|
const char *swayc_type_string(enum swayc_types type);
|
|
|
|
/**
|
|
* Send pixel data to registered clients.
|
|
*/
|
|
void ipc_get_pixels(wlc_handle output);
|
|
|
|
#endif
|