]>
Commit | Line | Data |
---|---|---|
a032b68d | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
60f067b4 | 2 | #pragma once |
663996b3 | 3 | |
663996b3 MS |
4 | typedef struct Button Button; |
5 | ||
663996b3 MS |
6 | #include "logind.h" |
7 | ||
8 | struct Button { | |
9 | Manager *manager; | |
10 | ||
60f067b4 JS |
11 | sd_event_source *io_event_source; |
12 | sd_event_source *check_event_source; | |
13 | ||
663996b3 MS |
14 | char *name; |
15 | char *seat; | |
16 | int fd; | |
17 | ||
60f067b4 JS |
18 | bool lid_closed; |
19 | bool docked; | |
663996b3 MS |
20 | }; |
21 | ||
22 | Button* button_new(Manager *m, const char *name); | |
6e866b33 | 23 | void button_free(Button *b); |
663996b3 | 24 | int button_open(Button *b); |
663996b3 | 25 | int button_set_seat(Button *b, const char *sn); |
60f067b4 | 26 | int button_check_switches(Button *b); |