13#ifndef GP_PROXY_PROTO_H
14#define GP_PROXY_PROTO_H
281#define GP_PROXY_BUF_SIZE 128
gp_pixel_type
List of all pixel types.
gp_proxy_msg_types
A proxy message type, identifies the type of the payload.
@ GP_PROXY_SHOW
Server requests to show application is on screen.
@ GP_PROXY_HIDE
Server requests to hide application is from screen.
@ GP_PROXY_MAX
Last message type + 1.
@ GP_PROXY_MAP
A buffer map request or confirmation.
@ GP_PROXY_CURSOR_POS
Sets a cursor position.
@ GP_PROXY_UNMAP
A buffer unmap request or confirmation.
@ GP_PROXY_UPDATE
Application asks server to update a rect on screen.
@ GP_PROXY_CLI_INIT
Backend sends a basic information to the client (application).
@ GP_PROXY_NAME
Sets an application name.
@ GP_PROXY_EXIT
Requests an application exit.
@ GP_PROXY_EVENT
Backend sends a gp_event to the application.
int gp_proxy_next(gp_proxy_buf *buf, gp_proxy_msg **msg)
Parse next message in the buffer.
#define GP_PROXY_BUF_SIZE
A proxy buffer size.
int gp_proxy_buf_recv(int fd, gp_proxy_buf *buf)
Receives data from from fd and stores them to the proxy buffer.
static void gp_proxy_buf_init(gp_proxy_buf *buf)
Initialize proxy buffer position and size.
int gp_proxy_send(int fd, enum gp_proxy_msg_types type, void *payload)
Sends a message to the server/client.
const char * gp_proxy_msg_type_name(enum gp_proxy_msg_types type)
Returns a string name for a proxy message type.
size_t size
A current buffer size.
size_t pos
A current buffer position.
An initial infromation send to a client (application).
unsigned int dpi
A display DPI.
gp_pixel_type pixel_type
A pixel type for drawing.
An initial infromation send to a client (application).
uint32_t size
Size is set to header size + sizeof(struct gp_proxy_rect_).
uint32_t type
Event type is set to GP_PROXY_CLI_INIT.
struct gp_proxy_cli_init_ cli_init
The client init payload.
uint32_t size
Size is set to header size + sizeof(struct gp_proxy_coord).
struct gp_proxy_coord pos
A cursor coordinates payload.
uint32_t type
Event type set to GP_PROXY_CURSOR_POS.
A proxy input event message.
gp_event ev
The input event.
uint32_t type
Event type set to GP_PROXY_EVENT.
uint32_t size
Event size set to header_size (8) + sizeof(gp_event).
struct gp_proxy_path map
A proxy map payload.
uint32_t size
Size is set to header size + sizeof(struct gp_proxy_path).
uint32_t type
Event type is set to GP_PROXY_MAP.
A SHM path and size for a mmap().
size_t size
A size for the mmap().
char path[64]
A SHM path to mmap().
uint32_t type
Event type is set to GP_PROXY_PIXMAP.
uint32_t size
Size is set to header size + sizeof(gp_pixmap).
gp_pixmap pix
A pixmap payload.
A rectangle update request.
uint32_t size
Size is set to header size + sizeof(struct gp_proxy_rect_).
struct gp_proxy_rect_ rect
The rectangle payload.
uint32_t type
Event type is set to GP_PROXY_UPDATE.