2 Copyright 2004-2005 Chris Tallon, 2009 Marten Richter
\r
3 Portions copyright 2004 Jon Gettler
\r
5 This file is part of VOMP.
\r
7 VOMP is free software; you can redistribute it and/or modify
\r
8 it under the terms of the GNU General Public License as published by
\r
9 the Free Software Foundation; either version 2 of the License, or
\r
10 (at your option) any later version.
\r
12 VOMP is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with VOMP; if not, write to the Free Software
\r
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
22 #ifndef SURFACEDirectFB_H
\r
23 #define SURFACEDirectFB_H
\r
28 #include <sys/mman.h>
\r
29 #include <sys/ioctl.h>
\r
33 #include <jpeglib.h>
\r
36 #include "defines.h"
\r
37 #include "surface.h"
\r
39 #include <directfb.h>
\r
43 class SurfaceDirectFB : public Surface
\r
46 SurfaceDirectFB(int id = 0);
\r
47 virtual ~SurfaceDirectFB();
\r
49 int create(UINT width, UINT height);
\r
52 int fillblt(int x, int y, int width, int height, unsigned int rgba);
\r
54 void drawHorzLine(int x1, int x2, int y, unsigned int c);
\r
55 void drawVertLine(int x, int y1, int y2, unsigned int c);
\r
56 void drawBitmap(int x, int y, const Bitmap& bm);
\r
57 int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
\r
58 void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
\r
59 void screenShot(const char* fileName);
\r
60 IDirectFBSurface* getSurfaceDFB(){return surface;};
\r
63 int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy);
\r
66 IDirectFBSurface *surface;
\r
68 void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);
\r
69 void drawPixel(int x, int y, Colour& c, bool fastdraw=false);
\r