]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
05d3a176 | 2 | #pragma once |
e9d21f24 | 3 | |
e9d21f24 LP |
4 | typedef struct Button Button; |
5 | ||
e9d21f24 LP |
6 | #include "logind.h" |
7 | ||
8 | struct Button { | |
9 | Manager *manager; | |
10 | ||
ed4ba7e4 LP |
11 | sd_event_source *io_event_source; |
12 | sd_event_source *check_event_source; | |
cc377381 | 13 | |
e9d21f24 LP |
14 | char *name; |
15 | char *seat; | |
16 | int fd; | |
65b51162 | 17 | |
ed4ba7e4 | 18 | bool lid_closed; |
2d62c530 | 19 | bool docked; |
e9d21f24 LP |
20 | }; |
21 | ||
22 | Button* button_new(Manager *m, const char *name); | |
f2a3de01 | 23 | void button_free(Button *b); |
e9d21f24 | 24 | int button_open(Button *b); |
e9d21f24 | 25 | int button_set_seat(Button *b, const char *sn); |
2d62c530 | 26 | int button_check_switches(Button *b); |