1 /*
2  * xen/drivers/video/lfb.h
3  *
4  * Cross-platform framebuffer library
5  *
6  * Stefano Stabellini <stefano.stabellini@eu.citrix.com>
7  * Copyright (c) 2013 Citrix Systems.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  */
19 
20 #ifndef _XEN_LFB_H
21 #define _XEN_LFB_H
22 
23 #include <xen/init.h>
24 
25 struct lfb_prop {
26     const struct font_desc *font;
27     unsigned char *lfb;
28     unsigned int pixel_on;
29     uint16_t width, height;
30     uint16_t bytes_per_line;
31     uint16_t bits_per_pixel;
32     void (*flush)(void);
33 
34     unsigned int text_columns;
35     unsigned int text_rows;
36 };
37 
38 void lfb_redraw_puts(const char *s);
39 void lfb_scroll_puts(const char *s);
40 void lfb_carriage_return(void);
41 void lfb_free(void);
42 
43 /* initialize the framebuffer */
44 int lfb_init(struct lfb_prop *lfbp);
45 
46 #endif
47