input skeleton
This commit is contained in:
parent
3fe64482bb
commit
338a0399f8
18
include/sway/input.h
Normal file
18
include/sway/input.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef _SWAY_INPUT_H
|
||||
#define _SWAY_INPUT_H
|
||||
#include <libinput.h>
|
||||
#include "sway/server.h"
|
||||
#include "config.h"
|
||||
#include "list.h"
|
||||
|
||||
struct sway_input {
|
||||
list_t *input_devices;
|
||||
};
|
||||
|
||||
struct input_config *new_input_config(const char* identifier);
|
||||
|
||||
char* libinput_dev_unique_id(struct libinput_device *dev);
|
||||
|
||||
struct sway_input *sway_input_create(struct sway_server *server);
|
||||
|
||||
#endif
|
|
@ -29,6 +29,7 @@ xkbcommon = dependency('xkbcommon')
|
|||
pango = dependency('pango')
|
||||
pixman = dependency('pixman-1')
|
||||
libcap = dependency('libcap')
|
||||
libinput = dependency('libinput')
|
||||
math = cc.find_library('m')
|
||||
git = find_program('git', required: false)
|
||||
a2x = find_program('a2x', required: false)
|
||||
|
|
|
@ -2,6 +2,7 @@ sway_sources = files(
|
|||
'main.c',
|
||||
'server.c',
|
||||
'commands.c',
|
||||
'input/input.c',
|
||||
'commands/exit.c',
|
||||
'commands/exec.c',
|
||||
'commands/exec_always.c',
|
||||
|
@ -25,6 +26,7 @@ sway_deps = [
|
|||
wlroots,
|
||||
libcap,
|
||||
math,
|
||||
libinput,
|
||||
]
|
||||
|
||||
executable(
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
// TODO WLR: make Xwayland optional
|
||||
#include <wlr/xwayland.h>
|
||||
#include "sway/server.h"
|
||||
#include "sway/input.h"
|
||||
#include "log.h"
|
||||
|
||||
bool server_init(struct sway_server *server) {
|
||||
|
@ -58,6 +59,9 @@ bool server_init(struct sway_server *server) {
|
|||
wlr_backend_destroy(server->backend);
|
||||
return false;
|
||||
}
|
||||
|
||||
server->input = sway_input_create(server);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue