X11FrameBuffer.hpp

00001 /*********************************************************************** 00002 * * 00003 * ViTooKi * 00004 * * 00005 * title: X11FrameBuffer.hpp * 00006 * * 00007 * * 00008 * * 00009 * ITEC institute of the University of Klagenfurt (Austria) * 00010 * http://www.itec.uni-klu.ac.at * 00011 * * 00012 * * 00013 * For more information visit the ViTooKi homepage: * 00014 * http://ViTooKi.sourceforge.net * 00015 * vitooki-user@lists.sourceforge.net * 00016 * vitooki-devel@lists.sourceforge.net * 00017 * * 00018 * This file is part of ViTooKi, a free video toolkit. * 00019 * ViTooKi is free software; you can redistribute it and/or * 00020 * modify it under the terms of the GNU General Public License * 00021 * as published by the Free Software Foundation; either version 2 * 00022 * of the License, or (at your option) any later version. * 00023 * * 00024 * This program is distributed in the hope that it will be useful, * 00025 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00027 * GNU General Public License for more details. * 00028 * * 00029 * You should have received a copy of the GNU General Public License * 00030 * along with this program; if not, write to the Free Software * 00031 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, * 00032 * MA 02111-1307, USA. * 00033 * * 00034 ***********************************************************************/ 00035 00036 /*********************************************************************** 00037 * * 00038 * REVISION HISTORY: * 00039 * * 00040 * $Id: X11FrameBuffer.hpp,v 1.8 2005/04/19 12:51:55 mkropfbe Exp $ 00041 * * 00042 ***********************************************************************/ 00043 00044 00045 #ifndef WIN32 00046 00047 #ifndef _X11FRAMEBUFFER_HPP 00048 #define _X11FRAMEBUFFER_HPP 00049 00050 #include <X11/Xatom.h> 00051 #include <unistd.h> 00052 00053 #include <X11/X.h> 00054 #include <X11/Xlib.h> 00055 #include <X11/Xutil.h> 00056 #include <X11/xpm.h> 00057 #include <X11/extensions/shape.h> 00058 00059 #include "IO.hpp" 00060 #include "VideoESInfo.hpp" 00061 #include "adaptors/MP4Decoder.hpp" 00062 #include "VideoFrameBuffer.hpp" 00063 00064 00072 class X11FrameBuffer :public VideoFrameBuffer 00073 { 00074 public: 00084 X11FrameBuffer(Display *display, Window *xwin, int depth, bool gray, int width, int height); 00085 00087 virtual ~X11FrameBuffer(); 00088 00093 inline void setPixel(int x, int y, uint value); 00094 00097 void bitBlt(AU *au); 00098 00105 void postPaintEvent(); 00106 00107 protected: 00108 Display *display; 00109 Window *xwin; 00110 GC gc; 00111 XImage *image; 00112 char *pixmap; 00113 00114 int width; 00115 int height; 00116 int row_size; 00117 uint *pixel32; 00118 unsigned short int *pixel16; 00119 int depth; 00120 }; 00121 00122 00123 #endif /* _X11FRAMEBUFFER_HPP */ 00124 00125 #endif /* WIN32 */