blob: f459d18fd0617b494d90591b98b9e62bc1929cd6 [file] [log] [blame]
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +00001/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
Pierre Ossman49f88222009-03-20 13:02:50 +00002 * Copyright 2009 Pierre Ossman for Cendio AB
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +00003 *
4 * This is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this software; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 * USA.
18 */
Pierre Ossmancbd1b2c2009-03-20 16:05:04 +000019#include <stdio.h>
20
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +000021#include <rfb/Exception.h>
22#include <rfb/CMsgHandler.h>
Pierre Ossman49f88222009-03-20 13:02:50 +000023#include <rfb/screenTypes.h>
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +000024
25using namespace rfb;
26
27CMsgHandler::CMsgHandler()
28{
29}
30
31CMsgHandler::~CMsgHandler()
32{
33}
34
35void CMsgHandler::setDesktopSize(int width, int height)
36{
37 cp.width = width;
38 cp.height = height;
39}
40
Pierre Ossmancbd1b2c2009-03-20 16:05:04 +000041void CMsgHandler::setExtendedDesktopSize(int reason, int result,
42 int width, int height,
43 const ScreenSet& layout)
Pierre Ossman49f88222009-03-20 13:02:50 +000044{
Pierre Ossmancbd1b2c2009-03-20 16:05:04 +000045 cp.supportsSetDesktopSize = true;
46
Pierre Ossman49f88222009-03-20 13:02:50 +000047 if ((reason == reasonClient) && (result != resultSuccess))
48 return;
49
Pierre Ossmancbd1b2c2009-03-20 16:05:04 +000050 if (!layout.validate(width, height))
51 fprintf(stderr, "Server sent us an invalid screen layout\n");
52
Pierre Ossman49f88222009-03-20 13:02:50 +000053 cp.width = width;
54 cp.height = height;
Pierre Ossmancbd1b2c2009-03-20 16:05:04 +000055 cp.screenLayout = layout;
Pierre Ossman49f88222009-03-20 13:02:50 +000056}
57
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +000058void CMsgHandler::setCursor(int w, int h, const Point& hotspot, void* data, void* mask)
59{
60}
61
62void CMsgHandler::setPixelFormat(const PixelFormat& pf)
63{
64 cp.setPF(pf);
65}
66
67void CMsgHandler::setName(const char* name)
68{
69 cp.setName(name);
70}
71
72void CMsgHandler::serverInit()
73{
74 throw Exception("CMsgHandler::serverInit called");
75}
76
77void CMsgHandler::framebufferUpdateStart()
78{
79}
80
81void CMsgHandler::framebufferUpdateEnd()
82{
83}
84
85void CMsgHandler::beginRect(const Rect& r, unsigned int encoding)
86{
87}
88
89void CMsgHandler::endRect(const Rect& r, unsigned int encoding)
90{
91}
92
93
94void CMsgHandler::setColourMapEntries(int firstColour, int nColours,
95 rdr::U16* rgbs)
96{
97 throw Exception("CMsgHandler::setColourMapEntries called");
98}
99
100void CMsgHandler::bell()
101{
102}
103
Adam Tkacacf6c6b2009-02-13 12:42:05 +0000104void CMsgHandler::serverCutText(const char* str, rdr::U32 len)
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +0000105{
106}
107
108void CMsgHandler::fillRect(const Rect& r, Pixel pix)
109{
110}
111
112void CMsgHandler::imageRect(const Rect& r, void* pixels)
113{
114}
115
116void CMsgHandler::copyRect(const Rect& r, int srcX, int srcY)
117{
118}
119
120bool CMsgHandler::processFTMsg(int type)
121{
122 return false;
123}
124