Constantin Kaplinsky | b3530d4 | 2007-12-26 19:17:02 +0000 | [diff] [blame] | 1 | /* Copyright (C) 2007 Constantin Kaplinsky. All Rights Reserved. |
| 2 | * |
| 3 | * This is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * This software is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this software; if not, write to the Free Software |
| 15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
| 16 | * USA. |
| 17 | */ |
| 18 | |
| 19 | // |
| 20 | // XPixelBuffer.cxx |
| 21 | // |
| 22 | |
Constantin Kaplinsky | 936c369 | 2007-12-27 08:42:53 +0000 | [diff] [blame] | 23 | #include <X11/Xlib.h> |
Constantin Kaplinsky | b3530d4 | 2007-12-26 19:17:02 +0000 | [diff] [blame] | 24 | #include <x0vncserver/XPixelBuffer.h> |
| 25 | |
Constantin Kaplinsky | 936c369 | 2007-12-27 08:42:53 +0000 | [diff] [blame] | 26 | using namespace rfb; |
| 27 | |
| 28 | XPixelBuffer::XPixelBuffer(Display *dpy, Image* image, |
| 29 | int offsetLeft, int offsetTop, |
| 30 | const PixelFormat& pf, ColourMap* cm) |
| 31 | : FullFramePixelBuffer(pf, image->xim->width, image->xim->height, |
| 32 | (rdr::U8 *)image->xim->data, cm), |
| 33 | m_dpy(dpy), |
| 34 | m_image(image), |
| 35 | m_offsetLeft(offsetLeft), |
| 36 | m_offsetTop(offsetTop), |
| 37 | m_stride(image->xim->bytes_per_line * 8 / image->xim->bits_per_pixel) |
Constantin Kaplinsky | b3530d4 | 2007-12-26 19:17:02 +0000 | [diff] [blame] | 38 | { |
| 39 | } |
| 40 | |
Constantin Kaplinsky | 936c369 | 2007-12-27 08:42:53 +0000 | [diff] [blame] | 41 | XPixelBuffer::~XPixelBuffer() |
| 42 | { |
| 43 | } |
| 44 | |
| 45 | void |
| 46 | XPixelBuffer::grabRegion(const rfb::Region& region) |
| 47 | { |
| 48 | // m_image->get(DefaultRootWindow(m_dpy), m_offsetLeft, m_offsetTop); |
| 49 | } |
| 50 | |