Merge pull request #1263 from nyorain/master

Implement get_clipboard ipc message
This commit is contained in:
Drew DeVault 2017-10-08 11:05:54 -04:00 committed by GitHub
commit 6d83a59b46
10 changed files with 574 additions and 8 deletions

View file

@ -13,6 +13,7 @@ enum ipc_command_type {
IPC_GET_BAR_CONFIG = 6,
IPC_GET_VERSION = 7,
IPC_GET_INPUTS = 8,
IPC_GET_CLIPBOARD = 9,
// Events send from sway to clients. Events have the highest bits set.
IPC_EVENT_WORKSPACE = ((1<<31) | 0),
IPC_EVENT_OUTPUT = ((1<<31) | 1),

View file

@ -235,8 +235,9 @@ enum ipc_feature {
IPC_FEATURE_EVENT_WINDOW = 2048,
IPC_FEATURE_EVENT_BINDING = 4096,
IPC_FEATURE_EVENT_INPUT = 8192,
IPC_FEATURE_GET_CLIPBOARD = 16384,
IPC_FEATURE_ALL_COMMANDS = 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
IPC_FEATURE_ALL_COMMANDS = 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 16384,
IPC_FEATURE_ALL_EVENTS = 256 | 512 | 1024 | 2048 | 4096 | 8192,
IPC_FEATURE_ALL = IPC_FEATURE_ALL_COMMANDS | IPC_FEATURE_ALL_EVENTS,

View file

@ -3,6 +3,7 @@
#include <stdint.h>
#include <unistd.h>
#include <sys/types.h>
#include <xkbcommon/xkbcommon.h>
/**
@ -57,4 +58,8 @@ uint32_t parse_color(const char *color);
* to a dangling symlink, NULL is returned.
*/
char* resolve_path(const char* path);
char *b64_encode(const char* binaryData, size_t len, size_t *flen);
unsigned char *b64_decode(const char *ascii, size_t len, size_t *flen);
#endif