mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Move IPC client into common, refactor IPC
This commit is contained in:
parent
5ae359279b
commit
27f03c705d
8 changed files with 105 additions and 79 deletions
9
include/ipc-client.h
Normal file
9
include/ipc-client.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef _SWAY_IPC_CLIENT_H
|
||||
#define _SWAY_IPC_CLIENT_H
|
||||
|
||||
#include "ipc.h"
|
||||
|
||||
char *get_socketpath(void);
|
||||
char *ipc_single_command(const char *socket_path, uint32_t type, const char *payload, uint32_t len);
|
||||
|
||||
#endif
|
||||
13
include/ipc-server.h
Normal file
13
include/ipc-server.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef _SWAY_IPC_SERVER_H
|
||||
#define _SWAY_IPC_SERVER_H
|
||||
|
||||
#include "container.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);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef _SWAY_IPC_H
|
||||
#define _SWAY_IPC_H
|
||||
|
||||
#include "container.h"
|
||||
|
||||
enum ipc_command_type {
|
||||
IPC_COMMAND = 0,
|
||||
IPC_GET_WORKSPACES = 1,
|
||||
|
|
@ -15,10 +13,4 @@ enum ipc_command_type {
|
|||
IPC_SWAY_GET_PIXELS = 0x81
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue