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

« back to all changes in this revision

Viewing changes to ica/x11/x11vnc/x11vnc_defs.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2008-06-17 13:46:54 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080617134654-cl0gi4u524cv1ici
Tags: 1:1.0.9~rc3-1
* Package new upstream version
  - upstream ported the code to qt4.4 (Closes: #481974)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -- x11vnc_defs.c -- */
 
2
 
 
3
#include "x11vnc.h"
 
4
 
 
5
int overlay_present = 0;
 
6
 
 
7
int xrandr_base_event_type = 0;
 
8
 
 
9
int xfixes_base_event_type = 0;
 
10
int xtest_base_event_type = 0;
 
11
#if LIBVNCSERVER_HAVE_LIBXTRAP
 
12
XETC *trap_ctx = NULL;
 
13
#endif
 
14
int xtrap_base_event_type = 0;
 
15
int xdamage_base_event_type = 0;
 
16
 
 
17
/*               date +'lastmod: %Y-%m-%d' */
 
18
char lastmod[] = "0.9.4 lastmod: 2008-01-24";
 
19
 
 
20
/* X display info */
 
21
 
 
22
Display *dpy = NULL;            /* the single display screen we connect to */
 
23
int scr = 0;
 
24
char *xauth_raw_data = NULL;
 
25
int xauth_raw_len = 0;
 
26
Window window = None, rootwin = None;   /* polled window, root window (usu. same) */
 
27
Visual *default_visual = NULL;  /* the default visual (unless -visual) */
 
28
int bpp = 0, depth = 0;
 
29
int indexed_color = 0;
 
30
int dpy_x = 0, dpy_y = 0;               /* size of display */
 
31
int fb_x = 0, fb_y = 0, fb_b = 0;       /* fb size and bpp guesses at display */
 
32
int off_x, off_y;               /* offsets for -sid */
 
33
int wdpy_x, wdpy_y;             /* for actual sizes in case of -clip */
 
34
int cdpy_x, cdpy_y, coff_x, coff_y;     /* the -clip params */
 
35
int button_mask = 0;            /* button state and info */
 
36
int button_mask_prev = 0;
 
37
int num_buttons = -1;
 
38
 
 
39
long xselectinput_rootwin = 0;
 
40
 
 
41
unsigned int display_button_mask = 0;
 
42
unsigned int display_mod_mask = 0;
 
43
 
 
44
/* image structures */
 
45
XImage *scanline = NULL;
 
46
XImage *fullscreen = NULL;
 
47
XImage **tile_row = NULL;       /* for all possible row runs */
 
48
XImage *snaprect = NULL;        /* for XShmGetImage (fs_factor) */
 
49
XImage *snap = NULL;            /* the full snap fb */
 
50
XImage *raw_fb_image = NULL;    /* the raw fb */
 
51
 
 
52
/* corresponding shm structures */
 
53
XShmSegmentInfo scanline_shm;
 
54
XShmSegmentInfo fullscreen_shm;
 
55
XShmSegmentInfo *tile_row_shm;  /* for all possible row runs */
 
56
XShmSegmentInfo snaprect_shm;
 
57
 
 
58
/* rfb screen info */
 
59
rfbScreenInfoPtr screen = NULL;
 
60
char *rfb_desktop_name = NULL;
 
61
char *http_dir = NULL;
 
62
char vnc_desktop_name[256];
 
63
char *main_fb = NULL;           /* our copy of the X11 fb */
 
64
char *rfb_fb = NULL;            /* same as main_fb unless transformation */
 
65
char *fake_fb = NULL;           /* used under -padgeom */
 
66
char *snap_fb = NULL;           /* used under -snapfb */
 
67
char *cmap8to24_fb = NULL;      /* used under -8to24 */
 
68
char *rot_fb = NULL;
 
69
char *raw_fb = NULL;            /* when used should be main_fb */
 
70
char *raw_fb_addr = NULL;
 
71
int raw_fb_offset = 0;
 
72
int raw_fb_shm = 0;
 
73
int raw_fb_mmap = 0;
 
74
int raw_fb_seek = 0;
 
75
int raw_fb_fd = -1;
 
76
int raw_fb_back_to_X = 0;       /* kludge for testing rawfb -> X */
 
77
 
 
78
int rfb_bytes_per_line = 0;
 
79
int main_bytes_per_line = 0;
 
80
int rot_bytes_per_line = 0;
 
81
unsigned long  main_red_mask = 0,  main_green_mask = 0,  main_blue_mask = 0;
 
82
unsigned short main_red_max = 0,   main_green_max = 0,   main_blue_max = 0;
 
83
unsigned short main_red_shift = 0, main_green_shift = 0, main_blue_shift = 0;
 
84
 
 
85
int raw_fb_bytes_per_line = 0;
 
86
 
 
87
/* scaling parameters */
 
88
char *scale_str = NULL;
 
89
double scale_fac = 1.0;
 
90
int scaling = 0;
 
91
int scaling_blend = 1;          /* for no blending option (very course) */
 
92
int scaling_nomult4 = 0;        /* do not require width = n * 4 */
 
93
int scaling_pad = 0;            /* pad out scaled sizes to fit denominator */
 
94
int scaling_interpolate = 0;    /* use interpolation scheme when shrinking */
 
95
int scaled_x = 0, scaled_y = 0; /* dimensions of scaled display */
 
96
int scale_numer = 0, scale_denom = 0;   /* n/m */
 
97
char *rotating_str = NULL;
 
98
int rotating = 0;
 
99
int rotating_same = 0;
 
100
int rotating_cursors = 0;
 
101
 
 
102
/* scale cursor */
 
103
char *scale_cursor_str = NULL;
 
104
double scale_cursor_fac = 1.0;
 
105
int scaling_cursor = 0;
 
106
int scaling_cursor_blend = 1;
 
107
int scaling_cursor_interpolate = 0;
 
108
int scale_cursor_numer = 0, scale_cursor_denom = 0;
 
109
 
 
110
/* size of the basic tile unit that is polled for changes: */
 
111
int tile_x = 32;
 
112
int tile_y = 32;
 
113
int ntiles, ntiles_x = 0, ntiles_y = 0;
 
114
 
 
115
/* arrays that indicate changed or checked tiles. */
 
116
unsigned char *tile_has_diff = NULL, *tile_tried = NULL, *tile_copied = NULL;
 
117
unsigned char *tile_has_xdamage_diff = NULL, *tile_row_has_xdamage_diff = NULL;
 
118
 
 
119
/* times of recent events */
 
120
time_t last_event = 0, last_input = 0, last_client = 0;
 
121
time_t last_local_input = 0;
 
122
time_t last_keyboard_input = 0, last_pointer_input = 0; 
 
123
time_t last_fb_bytes_sent = 0;
 
124
double last_keyboard_time = 0.0;
 
125
double last_pointer_time = 0.0;
 
126
double last_pointer_click_time = 0.0;
 
127
double last_pointer_motion_time = 0.0;
 
128
double last_key_to_button_remap_time = 0.0;
 
129
double last_copyrect = 0.0;
 
130
double last_copyrect_fix = 0.0;
 
131
double last_wireframe = 0.0;
 
132
double servertime_diff = 0.0;
 
133
double x11vnc_start = 0.0;
 
134
double x11vnc_current = 0.0;
 
135
double g_now = 0.0;
 
136
 
 
137
double last_get_wm_frame_time = 0.0;
 
138
Window last_get_wm_frame = None;
 
139
double last_bs_restore = 0.0;
 
140
double last_su_restore = 0.0;
 
141
double last_bs_save = 0.0;
 
142
double last_su_save = 0.0;
 
143
 
 
144
int hack_val = 0;
 
145
 
 
146
/* last client to move pointer */
 
147
rfbClientPtr last_pointer_client = NULL;
 
148
rfbClientPtr latest_client = NULL;
 
149
double last_client_gone = 0.0;
 
150
 
 
151
int waited_for_client = 0;
 
152
int findcreatedisplay = 0;
 
153
char *terminal_services_daemon = NULL;
 
154
 
 
155
int client_count = 0;
 
156
int clients_served = 0;
 
157
 
 
158
/* more transient kludge variables: */
 
159
int cursor_x = 0, cursor_y = 0;         /* x and y from the viewer(s) */
 
160
int button_change_x = 0, button_change_y = 0;
 
161
int got_user_input = 0;
 
162
int got_pointer_input = 0;
 
163
int got_local_pointer_input = 0;
 
164
int got_pointer_calls = 0;
 
165
int got_keyboard_input = 0;
 
166
int got_keyboard_calls = 0;
 
167
int urgent_update = 0;
 
168
int last_keyboard_keycode = 0;
 
169
rfbBool last_rfb_down = FALSE;
 
170
rfbBool last_rfb_key_accepted = FALSE;
 
171
rfbKeySym last_rfb_keysym = 0;
 
172
double last_rfb_keytime = 0.0;
 
173
int fb_copy_in_progress = 0;    
 
174
int drag_in_progress = 0;       
 
175
int shut_down = 0;      
 
176
int do_copy_screen = 0; 
 
177
time_t damage_time = 0;
 
178
int damage_delay = 0;
 
179
 
 
180
int program_pid = 0;
 
181
char *program_name = NULL;
 
182
char *program_cmdline = NULL;
 
183
 
 
184
struct utsname UT;
 
185
 
 
186