rpi4b-temp-humidity/src/ui/powerscreen.h

33 lines
830 B
C

/*
* powerscreen.h - Screen for rebooting or halting
* Copyright (C) 2024 Alexander Rosenberg
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version. See the LICENSE file for more information.
*/
#ifndef INCLUDED_POWERSCREEN_H
#define INCLUDED_POWERSCREEN_H
#include "screen.h"
typedef struct {
Screen parent;
enum {
POWER_SCREEN_RESTART_PROGRAM = 0,
POWER_SCREEN_REBOOT,
POWER_SCREEN_POWEROFF,
POWER_SCREEN_NCHOICE,
};
int choice;
} PowerScreen;
/*
* Create a new power screen that can be used to reboot or halt the device.
*/
PowerScreen *power_screen_new(void);
#endif