summaryrefslogtreecommitdiff
path: root/firmware/src/screen.h
blob: b2106199ca892ea22e9f3d452ae3ddeefe406c0e (plain) (blame)
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
/* 
 * File:   screen.h
 * Author: camilstaps
 *
 * Created on August 19, 2015, 12:01 AM
 */

#ifndef SCREEN_H
#define	SCREEN_H

#ifdef	__cplusplus
extern "C" {
#endif

typedef struct Screen {
    unsigned short rows, columns, 
            first_visible_row, first_visible_column,
            cursor_x, cursor_y;
    unsigned char** data;
    void (*update)(struct Screen);
} Screen;

Screen* newScreen(unsigned short rows, unsigned short columns, void (*update)(Screen));
inline void freeScreen(Screen* screen);

//void writeOnS
//void appendToScreen

#ifdef	__cplusplus
}
#endif

#endif	/* SCREEN_H */