summaryrefslogtreecommitdiffstats
path: root/include/gui/gui.h
blob: 829d1568424ff490284f7fa996101ed11ecb14af (plain)
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
/*
 * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
 *
 * GPL v2
 */

#ifndef __GUI_H__
#define __GUI_H__

#include <fb.h>

struct surface {
	int x;
	int y;
	int width;
	int height;
};

struct screen {
	int fd;
	struct fb_info info;

	struct surface s;

	void *fb;
	void *offscreenbuf;
	int fbsize;
};

static inline void* gui_screen_redering_buffer(struct screen *sc)
{
	if (sc->offscreenbuf)
		return sc->offscreenbuf;
	return sc->fb;
}


#endif /* __GUI_H__ */