]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/login/logind-button.h
pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir}
[thirdparty/systemd.git] / src / login / logind-button.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 typedef struct Button Button;
5
6 #include "logind.h"
7
8 struct Button {
9 Manager *manager;
10
11 sd_event_source *io_event_source;
12 sd_event_source *check_event_source;
13
14 char *name;
15 char *seat;
16 int fd;
17
18 bool lid_closed;
19 bool docked;
20 };
21
22 Button* button_new(Manager *m, const char *name);
23 void button_free(Button*b);
24 int button_open(Button *b);
25 int button_set_seat(Button *b, const char *sn);
26 int button_check_switches(Button *b);