File: splash.h

package info (click to toggle)
uswsusp 1.0+20120915-6.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,572 kB
  • ctags: 1,440
  • sloc: ansic: 7,164; sh: 566; makefile: 223; perl: 65
file content (47 lines) | stat: -rw-r--r-- 1,065 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * splash.h
 *
 * Splash related definitions for userspace suspend and resume tools.
 *
 * Copyright (C) 2006 Holger Macht <holger@homac.de>
 *
 * This file is released under the GPLv2.
 *
 */

#ifndef SPLASH_H
#define SPLASH_H

#include <linux/input.h>
#include <termios.h>

#define ABORT_KEY_CODE	KEY_BACKSPACE
#define ABORT_KEY_NAME	"backspace"
#define REBOOT_KEY_CODE	KEY_R
#define REBOOT_KEY_NAME	"r"
#define ENTER_KEY_CODE	KEY_ENTER
#define ENTER_KEY_NAME	"ENTER"

#define SPL_SUSPEND 1
#define SPL_RESUME 2

#define SPLASH_GENERIC_MESSAGE_SIZE 1024

/* generic interface functions for an arbitary splash method */
struct splash {
	int (*finish) (void);
	int (*progress) (int p);
	void (*switch_to) (void);
	void (*read_password) (char *, int);
	int (*dialog) (const char *);
	int (*prepare_abort) (struct termios *, struct termios *);
	char (*key_pressed) (void);
	void (*restore_abort) (struct termios *);
	void (*set_caption) (const char *);
};

void splash_prepare(struct splash *splash, int mode);

extern struct splash splash;

#endif /* SPLASH_H */