summaryrefslogtreecommitdiffstats
path: root/src/device/screen.h
blob: ec30cd5ccec5bd51cbfe675230d51aca37d1dfd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef DEVICE_SCREEN_H
#define DEVICE_SCREEN_H

#include <time.h>

/**
 * Struct that keeps track of the lines on the screen.
 */
struct display_status {
	time_t delta;			/* Seconds/Line */
	time_t last_scroll_time;	/* Last second the line was scrolled */
	char *message;			/* Entire message to be shown */
	char *first_line;		/* First line on display */
	char *second_line;		/* Second line on display */
	size_t message_len;		/* Length of the message */
	size_t line_cursor;		/* Index of the first line being displayed. */
};

void display_update_scroll(struct display_status *status);
void display_status_init(struct display_status *status, char *msg);

#endif /* DEVICE_SCREEN_H */