~ubuntu-branches/debian/lenny/italc/lenny

« back to all changes in this revision

Viewing changes to master/icv/include/vncviewer.h

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2008-06-17 13:46:54 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20080617134654-2y5m7ki93r5c1ysf
Tags: upstream-1.0.9~rc3
ImportĀ upstreamĀ versionĀ 1.0.9~rc3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef VNCVIEWER_H
2
 
#define VNCVIEWER_H
3
 
/*
4
 
 *  Copyright (C) 2000, 2001 Const Kaplinsky.  All Rights Reserved.
5
 
 *  Copyright (C) 2000 Tridia Corporation.  All Rights Reserved.
6
 
 *  Copyright (C) 1999 AT&T Laboratories Cambridge.  All Rights Reserved.
7
 
 *
8
 
 *  This is free software; you can redistribute it and/or modify
9
 
 *  it under the terms of the GNU General Public License as published by
10
 
 *  the Free Software Foundation; either version 2 of the License, or
11
 
 *  (at your option) any later version.
12
 
 *
13
 
 *  This software is distributed in the hope that it will be useful,
14
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 *  GNU General Public License for more details.
17
 
 *
18
 
 *  You should have received a copy of the GNU General Public License
19
 
 *  along with this software; if not, write to the Free Software
20
 
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
21
 
 *  USA.
22
 
 */
23
 
 
24
 
/*
25
 
 * vncviewer.h
26
 
 */
27
 
 
28
 
#include <stdio.h>
29
 
#include <stdlib.h>
30
 
#include <string.h>
31
 
#include <sys/time.h>
32
 
#include <unistd.h>
33
 
#include <X11/IntrinsicP.h>
34
 
#include <X11/StringDefs.h>
35
 
#include <X11/Shell.h>
36
 
#include <X11/keysym.h>
37
 
#include <X11/Xatom.h>
38
 
#include <X11/Xmu/StdSel.h>
39
 
#include "vnctypes.h" 
40
 
 
41
 
#if(defined __cplusplus)
42
 
extern "C"
43
 
{
44
 
#endif
45
 
 
46
 
#include "rfbproto.h"
47
 
 
48
 
extern int endianTest;
49
 
 
50
 
#define Swap16IfLE(s) \
51
 
    (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
52
 
 
53
 
#define Swap32IfLE(l) \
54
 
    (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \
55
 
                             (((l) & 0x00ff0000) >> 8)  | \
56
 
                             (((l) & 0x0000ff00) << 8)  | \
57
 
                             (((l) & 0x000000ff) << 24))  : (l))
58
 
 
59
 
#define MAX_ENCODINGS 20
60
 
 
61
 
 
62
 
/** kvncview.cpp **/
63
 
 
64
 
extern AppData appData;
65
 
 
66
 
extern Display* dpy;
67
 
extern const char *vncServerHost;
68
 
extern int vncServerPort;
69
 
 
70
 
extern int isQuitFlagSet();
71
 
extern int getPassword(char *passwd, int pwlen);
72
 
extern void DrawScreenRegion(int x, int y, int width, int height);
73
 
extern void DrawAnyScreenRegionX11Thread(int x, int y, int width, int height);
74
 
extern void LockFramebuffer();
75
 
extern void UnlockFramebuffer();
76
 
extern void EnableClientCursor(int state);
77
 
extern void beep();
78
 
extern void newServerCut(char *bytes, int len);
79
 
extern void postMouseEvent(int x, int y, int buttonMask);
80
 
 
81
 
/** threads.cpp **/
82
 
 
83
 
extern void queueIncrementalUpdateRequest();
84
 
extern void announceIncrementalUpdateRequest();
85
 
 
86
 
/* colour.c */
87
 
 
88
 
extern unsigned long BGR233ToPixel[];
89
 
 
90
 
extern Colormap cmap;
91
 
extern Visual *vis;
92
 
extern unsigned int visdepth, visbpp;
93
 
 
94
 
extern void SetVisualAndCmap(void);
95
 
 
96
 
/* desktop.c */
97
 
 
98
 
extern Widget form, viewport, desktop;
99
 
extern GC gc;
100
 
extern GC srcGC, dstGC;
101
 
extern Dimension dpyWidth, dpyHeight;
102
 
 
103
 
extern void DesktopInit(Window win);
104
 
extern void ToplevelInit(void);
105
 
extern void SendRFBEvent(XEvent *event, String *params, Cardinal *num_params);
106
 
extern void CopyDataToScreen(char *buf, int x, int y, int width, int height);
107
 
extern void CopyDataFromScreen(char *buf, int x, int y, int width, int height);
108
 
extern void FillRectangle8(CARD8, int x, int y, int width, int height);
109
 
extern void FillRectangle16(CARD16, int x, int y, int width, int height);
110
 
extern void FillRectangle32(CARD32, int x, int y, int width, int height);
111
 
extern void CopyArea(int srcX, int srcY, int width, int height, int x, int y);
112
 
extern void SyncScreenRegion(int x, int y, int width, int height);
113
 
extern void SyncScreenRegionX11Thread(int x, int y, int width, int height);
114
 
extern void drawCursor(void);
115
 
extern void DrawCursorX11Thread(int x, int y);
116
 
extern void undrawCursor(void);
117
 
extern void getBoundingRectCursor(int cx, int cy, int _imageIndex,
118
 
                                  int *x, int *y, int *w, int *h);
119
 
extern int rectsIntersect(int x, int y, int w, int h, 
120
 
                          int x2, int y2, int w2, int h2);
121
 
extern int rectContains(int outX, int outY, int outW, int outH, 
122
 
                        int inX, int inY, int inW, int inH);
123
 
extern void rectsJoin(int *nx1, int *ny1, int *nw1, int *nh1, 
124
 
                      int x2, int y2, int w2, int h2);
125
 
extern void DrawZoomedScreenRegionX11Thread(Window win, int zwidth, 
126
 
                                            int zheight, 
127
 
                                            int x, int y, 
128
 
                                            int width, int height);
129
 
extern void DrawScreenRegionX11Thread(Window win, int x, int y, 
130
 
                                      int width, int height);
131
 
extern void Cleanup(void);
132
 
extern XImage *CreateShmZoomImage(void);
133
 
extern XImage *CreateShmImage(void);
134
 
extern void ShmCleanup(void);
135
 
extern void freeDesktopResources(void);
136
 
 
137
 
/* rfbproto.c */
138
 
 
139
 
extern int rfbsock;
140
 
extern Bool canUseCoRRE;
141
 
extern Bool canUseHextile;
142
 
extern char *desktopName;
143
 
extern rfbPixelFormat myFormat;
144
 
extern rfbServerInitMsg si;
145
 
 
146
 
extern int cursorX, cursorY;
147
 
extern int imageIndex;
148
 
typedef struct {
149
 
  int set;
150
 
  int w, h;
151
 
  int hotX, hotY;
152
 
  int len;
153
 
  char *image;
154
 
} PointerImage;
155
 
extern PointerImage pointerImages[];
156
 
 
157
 
extern int ConnectToRFBServer(const char *hostname, int port);
158
 
extern enum InitStatus InitialiseRFBConnection(void);
159
 
extern Bool SetFormatAndEncodings(void);
160
 
extern Bool SendIncrementalFramebufferUpdateRequest(void);
161
 
extern Bool SendFramebufferUpdateRequest(int x, int y, int w, int h,
162
 
                                         Bool incremental);
163
 
extern Bool SendPointerEvent(int x, int y, int buttonMask);
164
 
extern Bool SendKeyEvent(CARD32 key, Bool down);
165
 
extern Bool SendClientCutText(const char *str, int len);
166
 
extern Bool HandleRFBServerMessage(void);
167
 
 
168
 
extern void PrintPixelFormat(rfbPixelFormat *format);
169
 
extern void freeRFBProtoResources(void);
170
 
extern void freeResources(void);
171
 
 
172
 
/* sockets.c */
173
 
 
174
 
extern Bool errorMessageOnReadFailure;
175
 
 
176
 
extern Bool ReadFromRFBServer(char *out, unsigned int n);
177
 
extern Bool WriteExact(int sock, const char *buf, int n);
178
 
extern int ConnectToTcpAddr(unsigned int host, int port);
179
 
 
180
 
extern int StringToIPAddr(const char *str, unsigned int *addr);
181
 
extern void freeSocketsResources(void);
182
 
 
183
 
#if(defined __cplusplus)
184
 
}
185
 
#endif
186
 
#endif