Fixed the ISA Clock/RTC cards for IRQ operation. Verified with a new DOS tool, cross-checked on real hardware.
Removed some old, unneeded files.
This commit is contained in:
@@ -1,261 +0,0 @@
|
||||
unsigned char default8x16FontData[4096+1]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x81,0x7e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7e,0xff,0xdb,0xff,0xff,0xc3,0xe7,0xff,0xff,0x7e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x6c,0xfe,0xfe,0xfe,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x3c,0x3c,0xe7,0xe7,0xe7,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x3c,0x7e,0xff,0xff,0x7e,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x00,0x1e,0x0e,0x1a,0x32,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3c,0x66,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3f,0x33,0x3f,0x30,0x30,0x30,0x30,0x70,0xf0,0xe0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7f,0x63,0x7f,0x63,0x63,0x63,0x63,0x67,0xe7,0xe6,0xc0,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x18,0x18,0xdb,0x3c,0xe7,0x3c,0xdb,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfe,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,
|
||||
0x00,0x02,0x06,0x0e,0x1e,0x3e,0xfe,0x3e,0x1e,0x0e,0x06,0x02,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7f,0xdb,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x1b,0x1b,0x00,0x00,0x00,0x00,
|
||||
0x00,0x7c,0xc6,0x60,0x38,0x6c,0xc6,0xc6,0x6c,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xfe,0xfe,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7c,0x7c,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xfe,0xfe,0x7c,0x7c,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x3c,0x3c,0x3c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x7c,0xc6,0xc2,0xc0,0x7c,0x06,0x06,0x86,0xc6,0x7c,0x18,0x18,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xc2,0xc6,0x0c,0x18,0x30,0x60,0xc6,0x86,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6c,0x6c,0x38,0x76,0xdc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0x06,0x0c,0x18,0x30,0x60,0xc0,0xc6,0xfe,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0x06,0x06,0x3c,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x0c,0x1e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xfc,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x60,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xfe,0xc6,0x06,0x06,0x0c,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x0c,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0x0c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xde,0xde,0xde,0xdc,0xc0,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xde,0xc6,0xc6,0x66,0x3a,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc3,0xe7,0xff,0xff,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xde,0x7c,0x0c,0x0e,0x00,0x00,
|
||||
0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x7c,0xc6,0xc6,0x60,0x38,0x0c,0x06,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xff,0xdb,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x3c,0x66,0xc3,0xc3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xff,0xc3,0x86,0x0c,0x18,0x30,0x60,0xc1,0xc3,0xff,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0e,0x06,0x02,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,
|
||||
0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xe0,0x60,0x60,0x78,0x6c,0x66,0x66,0x66,0x66,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1c,0x0c,0x0c,0x3c,0x6c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,0x78,0x00,
|
||||
0x00,0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x06,0x06,0x00,0x0e,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3c,0x00,
|
||||
0x00,0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xe6,0xff,0xdb,0xdb,0xdb,0xdb,0xdb,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xf0,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1e,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x66,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x60,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x10,0x30,0x30,0xfc,0x30,0x30,0x30,0x30,0x36,0x1c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xc3,0x66,0x3c,0x18,0x3c,0x66,0xc3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0xf8,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xfe,0xcc,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0e,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x70,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xfe,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x0c,0x06,0x7c,0x00,0x00,
|
||||
0x00,0x00,0xcc,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0c,0x18,0x30,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6c,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xcc,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6c,0x38,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x3c,0x66,0x60,0x60,0x66,0x3c,0x0c,0x06,0x3c,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x3c,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0xc6,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
|
||||
0x38,0x6c,0x38,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
|
||||
0x18,0x30,0x60,0x00,0xfe,0x66,0x60,0x7c,0x60,0x60,0x66,0xfe,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x6e,0x3b,0x1b,0x7e,0xd8,0xdc,0x77,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x3e,0x6c,0xcc,0xcc,0xfe,0xcc,0xcc,0xcc,0xcc,0xce,0x00,0x00,0x00,0x00,
|
||||
0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x30,0x78,0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x60,0x30,0x18,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc6,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0x78,0x00,
|
||||
0x00,0xc6,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0xc6,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x18,0x7e,0xc3,0xc0,0xc0,0xc0,0xc3,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xe6,0xfc,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xc3,0x66,0x3c,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0xfc,0x66,0x66,0x7c,0x62,0x66,0x6f,0x66,0x66,0x66,0xf3,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0e,0x1b,0x18,0x18,0x18,0x7e,0x18,0x18,0x18,0x18,0x18,0xd8,0x70,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0c,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x18,0x30,0x60,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x76,0xdc,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
|
||||
0x76,0xdc,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x3c,0x6c,0x6c,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6c,0x6c,0x38,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xc0,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x60,0xce,0x9b,0x06,0x0c,0x1f,0x00,0x00,
|
||||
0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x66,0xce,0x96,0x3e,0x06,0x06,0x00,0x00,
|
||||
0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x36,0x6c,0xd8,0x6c,0x36,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xd8,0x6c,0x36,0x6c,0xd8,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,
|
||||
0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,
|
||||
0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x18,0x18,0x18,0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
|
||||
0x18,0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,
|
||||
0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0xd8,0xd8,0xd8,0xdc,0x76,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x78,0xcc,0xcc,0xcc,0xd8,0xcc,0xc6,0xc6,0xc6,0xcc,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0xfe,0xc6,0xc6,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xfe,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7e,0xd8,0xd8,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xc0,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x76,0xdc,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7e,0x18,0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0x6c,0x6c,0x6c,0x6c,0xee,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1e,0x30,0x18,0x0c,0x3e,0x66,0x66,0x66,0x66,0x3c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x7e,0xdb,0xdb,0xdb,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x03,0x06,0x7e,0xdb,0xdb,0xf3,0x7e,0x60,0xc0,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x1c,0x30,0x60,0x60,0x7c,0x60,0x60,0x60,0x30,0x1c,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0xff,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x00,0x7e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x00,0x7e,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x0e,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7e,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x38,0x6c,0x6c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0xec,0x6c,0x6c,0x3c,0x1c,0x00,0x00,0x00,0x00,
|
||||
0x00,0xd8,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
};
|
||||
int default8x16FontMetaData[256*5+1]={
|
||||
0,8,16,0,0,16,8,16,0,0,32,8,16,0,0,48,8,16,0,0,64,8,16,0,0,80,8,16,0,0,96,8,16,0,0,112,8,16,0,0,128,8,16,0,0,144,8,16,0,0,160,8,16,0,0,176,8,16,0,0,192,8,16,0,0,208,8,16,0,0,224,8,16,0,0,240,8,16,0,0,256,8,16,0,0,272,8,16,0,0,288,8,16,0,0,304,8,16,0,0,320,8,16,0,0,336,8,16,0,0,352,8,16,0,0,368,8,16,0,0,384,8,16,0,0,400,8,16,0,0,416,8,16,0,0,432,8,16,0,0,448,8,16,0,0,464,8,16,0,0,480,8,16,0,0,496,8,16,0,0,512,8,16,0,0,528,8,16,0,0,544,8,16,0,0,560,8,16,0,0,576,8,16,0,0,592,8,16,0,0,608,8,16,0,0,624,8,16,0,0,640,8,16,0,0,656,8,16,0,0,672,8,16,0,0,688,8,16,0,0,704,8,16,0,0,720,8,16,0,0,736,8,16,0,0,752,8,16,0,0,768,8,16,0,0,784,8,16,0,0,800,8,16,0,0,816,8,16,0,0,832,8,16,0,0,848,8,16,0,0,864,8,16,0,0,880,8,16,0,0,896,8,16,0,0,912,8,16,0,0,928,8,16,0,0,944,8,16,0,0,960,8,16,0,0,976,8,16,0,0,992,8,16,0,0,1008,8,16,0,0,1024,8,16,0,0,1040,8,16,0,0,1056,8,16,0,0,1072,8,16,0,0,1088,8,16,0,0,1104,8,16,0,0,1120,8,16,0,0,1136,8,16,0,0,1152,8,16,0,0,1168,8,16,0,0,1184,8,16,0,0,1200,8,16,0,0,1216,8,16,0,0,1232,8,16,0,0,1248,8,16,0,0,1264,8,16,0,0,1280,8,16,0,0,1296,8,16,0,0,1312,8,16,0,0,1328,8,16,0,0,1344,8,16,0,0,1360,8,16,0,0,1376,8,16,0,0,1392,8,16,0,0,1408,8,16,0,0,1424,8,16,0,0,1440,8,16,0,0,1456,8,16,0,0,1472,8,16,0,0,1488,8,16,0,0,1504,8,16,0,0,1520,8,16,0,0,1536,8,16,0,0,1552,8,16,0,0,1568,8,16,0,0,1584,8,16,0,0,1600,8,16,0,0,1616,8,16,0,0,1632,8,16,0,0,1648,8,16,0,0,1664,8,16,0,0,1680,8,16,0,0,1696,8,16,0,0,1712,8,16,0,0,1728,8,16,0,0,1744,8,16,0,0,1760,8,16,0,0,1776,8,16,0,0,1792,8,16,0,0,1808,8,16,0,0,1824,8,16,0,0,1840,8,16,0,0,1856,8,16,0,0,1872,8,16,0,0,1888,8,16,0,0,1904,8,16,0,0,1920,8,16,0,0,1936,8,16,0,0,1952,8,16,0,0,1968,8,16,0,0,1984,8,16,0,0,2000,8,16,0,0,2016,8,16,0,0,2032,8,16,0,0,2048,8,16,0,0,2064,8,16,0,0,2080,8,16,0,0,2096,8,16,0,0,2112,8,16,0,0,2128,8,16,0,0,2144,8,16,0,0,2160,8,16,0,0,2176,8,16,0,0,2192,8,16,0,0,2208,8,16,0,0,2224,8,16,0,0,2240,8,16,0,0,2256,8,16,0,0,2272,8,16,0,0,2288,8,16,0,0,2304,8,16,0,0,2320,8,16,0,0,2336,8,16,0,0,2352,8,16,0,0,2368,8,16,0,0,2384,8,16,0,0,2400,8,16,0,0,2416,8,16,0,0,2432,8,16,0,0,2448,8,16,0,0,2464,8,16,0,0,2480,8,16,0,0,2496,8,16,0,0,2512,8,16,0,0,2528,8,16,0,0,2544,8,16,0,0,2560,8,16,0,0,2576,8,16,0,0,2592,8,16,0,0,2608,8,16,0,0,2624,8,16,0,0,2640,8,16,0,0,2656,8,16,0,0,2672,8,16,0,0,2688,8,16,0,0,2704,8,16,0,0,2720,8,16,0,0,2736,8,16,0,0,2752,8,16,0,0,2768,8,16,0,0,2784,8,16,0,0,2800,8,16,0,0,2816,8,16,0,0,2832,8,16,0,0,2848,8,16,0,0,2864,8,16,0,0,2880,8,16,0,0,2896,8,16,0,0,2912,8,16,0,0,2928,8,16,0,0,2944,8,16,0,0,2960,8,16,0,0,2976,8,16,0,0,2992,8,16,0,0,3008,8,16,0,0,3024,8,16,0,0,3040,8,16,0,0,3056,8,16,0,0,3072,8,16,0,0,3088,8,16,0,0,3104,8,16,0,0,3120,8,16,0,0,3136,8,16,0,0,3152,8,16,0,0,3168,8,16,0,0,3184,8,16,0,0,3200,8,16,0,0,3216,8,16,0,0,3232,8,16,0,0,3248,8,16,0,0,3264,8,16,0,0,3280,8,16,0,0,3296,8,16,0,0,3312,8,16,0,0,3328,8,16,0,0,3344,8,16,0,0,3360,8,16,0,0,3376,8,16,0,0,3392,8,16,0,0,3408,8,16,0,0,3424,8,16,0,0,3440,8,16,0,0,3456,8,16,0,0,3472,8,16,0,0,3488,8,16,0,0,3504,8,16,0,0,3520,8,16,0,0,3536,8,16,0,0,3552,8,16,0,0,3568,8,16,0,0,3584,8,16,0,0,3600,8,16,0,0,3616,8,16,0,0,3632,8,16,0,0,3648,8,16,0,0,3664,8,16,0,0,3680,8,16,0,0,3696,8,16,0,0,3712,8,16,0,0,3728,8,16,0,0,3744,8,16,0,0,3760,8,16,0,0,3776,8,16,0,0,3792,8,16,0,0,3808,8,16,0,0,3824,8,16,0,0,3840,8,16,0,0,3856,8,16,0,0,3872,8,16,0,0,3888,8,16,0,0,3904,8,16,0,0,3920,8,16,0,0,3936,8,16,0,0,3952,8,16,0,0,3968,8,16,0,0,3984,8,16,0,0,4000,8,16,0,0,4016,8,16,0,0,4032,8,16,0,0,4048,8,16,0,0,4064,8,16,0,0,4080,8,16,0,0,};
|
||||
rfbFontData default8x16Font = { default8x16FontData, default8x16FontMetaData };
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,796 +0,0 @@
|
||||
#ifndef RFB_H
|
||||
#define RFB_H
|
||||
|
||||
/*
|
||||
* rfb.h - header file for RFB DDX implementation.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 RealVNC Ltd.
|
||||
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
|
||||
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#if(defined __cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <rfb/rfbproto.h>
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
|
||||
#include <pthread.h>
|
||||
#if 0 /* debugging */
|
||||
#define LOCK(mutex) (rfbLog("%s:%d LOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_lock(&(mutex)))
|
||||
#define UNLOCK(mutex) (rfbLog("%s:%d UNLOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_unlock(&(mutex)))
|
||||
#define MUTEX(mutex) pthread_mutex_t (mutex)
|
||||
#define INIT_MUTEX(mutex) (rfbLog("%s:%d INIT_MUTEX(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_init(&(mutex),NULL))
|
||||
#define TINI_MUTEX(mutex) (rfbLog("%s:%d TINI_MUTEX(%s)\n",__FILE__,__LINE__,#mutex), pthread_mutex_destroy(&(mutex)))
|
||||
#define TSIGNAL(cond) (rfbLog("%s:%d TSIGNAL(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_signal(&(cond)))
|
||||
#define WAIT(cond,mutex) (rfbLog("%s:%d WAIT(%s,%s)\n",__FILE__,__LINE__,#cond,#mutex), pthread_cond_wait(&(cond),&(mutex)))
|
||||
#define COND(cond) pthread_cond_t (cond)
|
||||
#define INIT_COND(cond) (rfbLog("%s:%d INIT_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_init(&(cond),NULL))
|
||||
#define TINI_COND(cond) (rfbLog("%s:%d TINI_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_destroy(&(cond)))
|
||||
#define IF_PTHREADS(x) x
|
||||
#else
|
||||
#define LOCK(mutex) pthread_mutex_lock(&(mutex));
|
||||
#define UNLOCK(mutex) pthread_mutex_unlock(&(mutex));
|
||||
#define MUTEX(mutex) pthread_mutex_t (mutex)
|
||||
#define INIT_MUTEX(mutex) pthread_mutex_init(&(mutex),NULL)
|
||||
#define TINI_MUTEX(mutex) pthread_mutex_destroy(&(mutex))
|
||||
#define TSIGNAL(cond) pthread_cond_signal(&(cond))
|
||||
#define WAIT(cond,mutex) pthread_cond_wait(&(cond),&(mutex))
|
||||
#define COND(cond) pthread_cond_t (cond)
|
||||
#define INIT_COND(cond) pthread_cond_init(&(cond),NULL)
|
||||
#define TINI_COND(cond) pthread_cond_destroy(&(cond))
|
||||
#define IF_PTHREADS(x) x
|
||||
#endif
|
||||
#else
|
||||
#define LOCK(mutex)
|
||||
#define UNLOCK(mutex)
|
||||
#define MUTEX(mutex)
|
||||
#define INIT_MUTEX(mutex)
|
||||
#define TINI_MUTEX(mutex)
|
||||
#define TSIGNAL(cond)
|
||||
#define WAIT(cond,mutex) this_is_unsupported
|
||||
#define COND(cond)
|
||||
#define INIT_COND(cond)
|
||||
#define TINI_COND(cond)
|
||||
#define IF_PTHREADS(x)
|
||||
#endif
|
||||
|
||||
/* end of stuff for autoconf */
|
||||
|
||||
/* if you use pthreads, but don't define LIBVNCSERVER_HAVE_LIBPTHREAD, the structs
|
||||
get all mixed up. So this gives a linker error reminding you to compile
|
||||
the library and your application (at least the parts including rfb.h)
|
||||
with the same support for pthreads. */
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBZ
|
||||
#define rfbInitServer rfbInitServerWithPthreadsAndZRLE
|
||||
#else
|
||||
#define rfbInitServer rfbInitServerWithPthreadsButWithoutZRLE
|
||||
#endif
|
||||
#else
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBZ
|
||||
#define rfbInitServer rfbInitServerWithoutPthreadsButWithZRLE
|
||||
#else
|
||||
#define rfbInitServer rfbInitServerWithoutPthreadsAndZRLE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct _rfbClientRec;
|
||||
struct _rfbScreenInfo;
|
||||
struct rfbCursor;
|
||||
|
||||
enum rfbNewClientAction {
|
||||
RFB_CLIENT_ACCEPT,
|
||||
RFB_CLIENT_ON_HOLD,
|
||||
RFB_CLIENT_REFUSE
|
||||
};
|
||||
|
||||
typedef void (*rfbKbdAddEventProcPtr) (rfbBool down, rfbKeySym keySym, struct _rfbClientRec* cl);
|
||||
typedef void (*rfbKbdReleaseAllKeysProcPtr) (struct _rfbClientRec* cl);
|
||||
typedef void (*rfbPtrAddEventProcPtr) (int buttonMask, int x, int y, struct _rfbClientRec* cl);
|
||||
typedef void (*rfbSetXCutTextProcPtr) (char* str,int len, struct _rfbClientRec* cl);
|
||||
typedef struct rfbCursor* (*rfbGetCursorProcPtr) (struct _rfbClientRec* pScreen);
|
||||
typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl);
|
||||
typedef rfbBool (*rfbPasswordCheckProcPtr)(struct _rfbClientRec* cl,const char* encryptedPassWord,int len);
|
||||
typedef enum rfbNewClientAction (*rfbNewClientHookPtr)(struct _rfbClientRec* cl);
|
||||
typedef void (*rfbDisplayHookPtr)(struct _rfbClientRec* cl);
|
||||
|
||||
typedef struct {
|
||||
uint32_t count;
|
||||
rfbBool is16; /* is the data format short? */
|
||||
union {
|
||||
uint8_t* bytes;
|
||||
uint16_t* shorts;
|
||||
} data; /* there have to be count*3 entries */
|
||||
} rfbColourMap;
|
||||
|
||||
/*
|
||||
* Per-screen (framebuffer) structure. There can be as many as you wish,
|
||||
* each serving different clients. However, you have to call
|
||||
* rfbProcessEvents for each of these.
|
||||
*/
|
||||
|
||||
typedef struct _rfbScreenInfo
|
||||
{
|
||||
int width;
|
||||
int paddedWidthInBytes;
|
||||
int height;
|
||||
int depth;
|
||||
int bitsPerPixel;
|
||||
int sizeInBytes;
|
||||
|
||||
rfbPixel blackPixel;
|
||||
rfbPixel whitePixel;
|
||||
|
||||
/* some screen specific data can be put into a struct where screenData
|
||||
* points to. You need this if you have more than one screen at the
|
||||
* same time while using the same functions.
|
||||
*/
|
||||
void* screenData;
|
||||
|
||||
/* The following two members are used to minimise the amount of unnecessary
|
||||
drawing caused by cursor movement. Whenever any drawing affects the
|
||||
part of the screen where the cursor is, the cursor is removed first and
|
||||
then the drawing is done (this is what the sprite routines test for).
|
||||
Afterwards, however, we do not replace the cursor, even when the cursor
|
||||
is logically being moved across the screen. We only draw the cursor
|
||||
again just as we are about to send the client a framebuffer update.
|
||||
|
||||
We need to be careful when removing and drawing the cursor because of
|
||||
their relationship with the normal drawing routines. The drawing
|
||||
routines can invoke the cursor routines, but also the cursor routines
|
||||
themselves end up invoking drawing routines.
|
||||
|
||||
Removing the cursor (rfbUndrawCursor) is eventually achieved by
|
||||
doing a CopyArea from a pixmap to the screen, where the pixmap contains
|
||||
the saved contents of the screen under the cursor. Before doing this,
|
||||
however, we set cursorIsDrawn to FALSE. Then, when CopyArea is called,
|
||||
it sees that cursorIsDrawn is FALSE and so doesn't feel the need to
|
||||
(recursively!) remove the cursor before doing it.
|
||||
|
||||
Putting up the cursor (rfbDrawCursor) involves a call to
|
||||
PushPixels. While this is happening, cursorIsDrawn must be FALSE so
|
||||
that PushPixels doesn't think it has to remove the cursor first.
|
||||
Obviously cursorIsDrawn is set to TRUE afterwards.
|
||||
|
||||
Another problem we face is that drawing routines sometimes cause a
|
||||
framebuffer update to be sent to the RFB client. When the RFB client is
|
||||
already waiting for a framebuffer update and some drawing to the
|
||||
framebuffer then happens, the drawing routine sees that the client is
|
||||
ready, so it calls rfbSendFramebufferUpdate. If the cursor is not drawn
|
||||
at this stage, it must be put up, and so rfbSpriteRestoreCursor is
|
||||
called. However, if the original drawing routine was actually called
|
||||
from within rfbSpriteRestoreCursor or rfbSpriteRemoveCursor we don't
|
||||
want this to happen. So both the cursor routines set
|
||||
dontSendFramebufferUpdate to TRUE, and all the drawing routines check
|
||||
this before calling rfbSendFramebufferUpdate. */
|
||||
|
||||
rfbBool cursorIsDrawn; /* TRUE if the cursor is currently drawn */
|
||||
rfbBool dontSendFramebufferUpdate; /* TRUE while removing or drawing the
|
||||
cursor */
|
||||
|
||||
/* additions by libvncserver */
|
||||
|
||||
rfbPixelFormat serverFormat;
|
||||
rfbColourMap colourMap; /* set this if rfbServerFormat.trueColour==FALSE */
|
||||
const char* desktopName;
|
||||
char thisHost[255];
|
||||
|
||||
rfbBool autoPort;
|
||||
int port;
|
||||
SOCKET listenSock;
|
||||
int maxSock;
|
||||
int maxFd;
|
||||
#ifdef __MINGW32__
|
||||
struct fd_set allFds;
|
||||
#else
|
||||
fd_set allFds;
|
||||
#endif
|
||||
|
||||
rfbBool socketInitDone;
|
||||
SOCKET inetdSock;
|
||||
rfbBool inetdInitDone;
|
||||
|
||||
int udpPort;
|
||||
SOCKET udpSock;
|
||||
struct _rfbClientRec* udpClient;
|
||||
rfbBool udpSockConnected;
|
||||
struct sockaddr_in udpRemoteAddr;
|
||||
|
||||
int maxClientWait;
|
||||
|
||||
/* http stuff */
|
||||
rfbBool httpInitDone;
|
||||
rfbBool httpEnableProxyConnect;
|
||||
int httpPort;
|
||||
char* httpDir;
|
||||
SOCKET httpListenSock;
|
||||
SOCKET httpSock;
|
||||
|
||||
rfbPasswordCheckProcPtr passwordCheck;
|
||||
void* authPasswdData;
|
||||
/* If rfbAuthPasswdData is given a list, this is the first
|
||||
view only password. */
|
||||
int authPasswdFirstViewOnly;
|
||||
|
||||
/* send only this many rectangles in one update */
|
||||
int maxRectsPerUpdate;
|
||||
/* this is the amount of milliseconds to wait at least before sending
|
||||
* an update. */
|
||||
int deferUpdateTime;
|
||||
#ifdef TODELETE
|
||||
char* screen;
|
||||
#endif
|
||||
rfbBool alwaysShared;
|
||||
rfbBool neverShared;
|
||||
rfbBool dontDisconnect;
|
||||
struct _rfbClientRec* clientHead;
|
||||
|
||||
/* cursor */
|
||||
int cursorX, cursorY,oldCursorX,oldCursorY,underCursorBufferLen;
|
||||
char* underCursorBuffer;
|
||||
rfbBool dontConvertRichCursorToXCursor;
|
||||
struct rfbCursor* cursor;
|
||||
|
||||
/* the frameBufferhas to be supplied by the serving process.
|
||||
* The buffer will not be freed by
|
||||
*/
|
||||
char* frameBuffer;
|
||||
rfbKbdAddEventProcPtr kbdAddEvent;
|
||||
rfbKbdReleaseAllKeysProcPtr kbdReleaseAllKeys;
|
||||
rfbPtrAddEventProcPtr ptrAddEvent;
|
||||
rfbSetXCutTextProcPtr setXCutText;
|
||||
rfbGetCursorProcPtr getCursorPtr;
|
||||
rfbSetTranslateFunctionProcPtr setTranslateFunction;
|
||||
|
||||
/* newClientHook is called just after a new client is created */
|
||||
rfbNewClientHookPtr newClientHook;
|
||||
/* displayHook is called just before a frame buffer update */
|
||||
rfbDisplayHookPtr displayHook;
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
|
||||
MUTEX(cursorMutex);
|
||||
rfbBool backgroundLoop;
|
||||
#endif
|
||||
|
||||
/* if TRUE, an ignoring signal handler is installed for SIGPIPE */
|
||||
rfbBool ignoreSIGPIPE;
|
||||
|
||||
/* if not zero, only a slice of this height is processed every time
|
||||
* an update should be sent. This should make working on a slow
|
||||
* link more interactive. */
|
||||
int progressiveSliceHeight;
|
||||
} rfbScreenInfo, *rfbScreenInfoPtr;
|
||||
|
||||
|
||||
/*
|
||||
* rfbTranslateFnType is the type of translation functions.
|
||||
*/
|
||||
|
||||
typedef void (*rfbTranslateFnType)(char *table, rfbPixelFormat *in,
|
||||
rfbPixelFormat *out,
|
||||
char *iptr, char *optr,
|
||||
int bytesBetweenInputLines,
|
||||
int width, int height);
|
||||
|
||||
|
||||
/* region stuff */
|
||||
|
||||
struct sraRegion;
|
||||
typedef struct sraRegion* sraRegionPtr;
|
||||
|
||||
/*
|
||||
* Per-client structure.
|
||||
*/
|
||||
|
||||
typedef void (*ClientGoneHookPtr)(struct _rfbClientRec* cl);
|
||||
|
||||
typedef struct _rfbClientRec {
|
||||
|
||||
/* back pointer to the screen */
|
||||
rfbScreenInfoPtr screen;
|
||||
|
||||
/* private data. You should put any application client specific data
|
||||
* into a struct and let clientData point to it. Don't forget to
|
||||
* free the struct via clientGoneHook!
|
||||
*
|
||||
* This is useful if the IO functions have to behave client specific.
|
||||
*/
|
||||
void* clientData;
|
||||
ClientGoneHookPtr clientGoneHook;
|
||||
|
||||
SOCKET sock;
|
||||
char *host;
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
|
||||
pthread_t client_thread;
|
||||
#endif
|
||||
/* Possible client states: */
|
||||
enum {
|
||||
RFB_PROTOCOL_VERSION, /* establishing protocol version */
|
||||
RFB_AUTHENTICATION, /* authenticating */
|
||||
RFB_INITIALISATION, /* sending initialisation messages */
|
||||
RFB_NORMAL /* normal protocol messages */
|
||||
} state;
|
||||
|
||||
rfbBool reverseConnection;
|
||||
rfbBool onHold;
|
||||
rfbBool readyForSetColourMapEntries;
|
||||
rfbBool useCopyRect;
|
||||
int preferredEncoding;
|
||||
int correMaxWidth, correMaxHeight;
|
||||
|
||||
rfbBool viewOnly;
|
||||
|
||||
/* The following member is only used during VNC authentication */
|
||||
uint8_t authChallenge[CHALLENGESIZE];
|
||||
|
||||
/* The following members represent the update needed to get the client's
|
||||
framebuffer from its present state to the current state of our
|
||||
framebuffer.
|
||||
|
||||
If the client does not accept CopyRect encoding then the update is
|
||||
simply represented as the region of the screen which has been modified
|
||||
(modifiedRegion).
|
||||
|
||||
If the client does accept CopyRect encoding, then the update consists of
|
||||
two parts. First we have a single copy from one region of the screen to
|
||||
another (the destination of the copy is copyRegion), and second we have
|
||||
the region of the screen which has been modified in some other way
|
||||
(modifiedRegion).
|
||||
|
||||
Although the copy is of a single region, this region may have many
|
||||
rectangles. When sending an update, the copyRegion is always sent
|
||||
before the modifiedRegion. This is because the modifiedRegion may
|
||||
overlap parts of the screen which are in the source of the copy.
|
||||
|
||||
In fact during normal processing, the modifiedRegion may even overlap
|
||||
the destination copyRegion. Just before an update is sent we remove
|
||||
from the copyRegion anything in the modifiedRegion. */
|
||||
|
||||
sraRegionPtr copyRegion; /* the destination region of the copy */
|
||||
int copyDX, copyDY; /* the translation by which the copy happens */
|
||||
|
||||
sraRegionPtr modifiedRegion;
|
||||
|
||||
/* As part of the FramebufferUpdateRequest, a client can express interest
|
||||
in a subrectangle of the whole framebuffer. This is stored in the
|
||||
requestedRegion member. In the normal case this is the whole
|
||||
framebuffer if the client is ready, empty if it's not. */
|
||||
|
||||
sraRegionPtr requestedRegion;
|
||||
|
||||
/* The following member represents the state of the "deferred update" timer
|
||||
- when the framebuffer is modified and the client is ready, in most
|
||||
cases it is more efficient to defer sending the update by a few
|
||||
milliseconds so that several changes to the framebuffer can be combined
|
||||
into a single update. */
|
||||
|
||||
struct timeval startDeferring;
|
||||
|
||||
/* translateFn points to the translation function which is used to copy
|
||||
and translate a rectangle from the framebuffer to an output buffer. */
|
||||
|
||||
rfbTranslateFnType translateFn;
|
||||
char *translateLookupTable;
|
||||
rfbPixelFormat format;
|
||||
|
||||
/*
|
||||
* UPDATE_BUF_SIZE must be big enough to send at least one whole line of the
|
||||
* framebuffer. So for a max screen width of say 2K with 32-bit pixels this
|
||||
* means 8K minimum.
|
||||
*/
|
||||
|
||||
#define UPDATE_BUF_SIZE 30000
|
||||
|
||||
char updateBuf[UPDATE_BUF_SIZE];
|
||||
int ublen;
|
||||
|
||||
/* statistics */
|
||||
|
||||
int bytesSent[MAX_ENCODINGS];
|
||||
int rectanglesSent[MAX_ENCODINGS];
|
||||
int lastRectMarkersSent;
|
||||
int lastRectBytesSent;
|
||||
int cursorShapeBytesSent;
|
||||
int cursorShapeUpdatesSent;
|
||||
int cursorPosBytesSent;
|
||||
int cursorPosUpdatesSent;
|
||||
int framebufferUpdateMessagesSent;
|
||||
int rawBytesEquivalent;
|
||||
int keyEventsRcvd;
|
||||
int pointerEventsRcvd;
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBZ
|
||||
/* zlib encoding -- necessary compression state info per client */
|
||||
|
||||
struct z_stream_s compStream;
|
||||
rfbBool compStreamInited;
|
||||
uint32_t zlibCompressLevel;
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
|
||||
/* tight encoding -- preserve zlib streams' state for each client */
|
||||
z_stream zsStruct[4];
|
||||
rfbBool zsActive[4];
|
||||
int zsLevel[4];
|
||||
int tightCompressLevel;
|
||||
int tightQualityLevel;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
rfbBool enableLastRectEncoding; /* client supports LastRect encoding */
|
||||
rfbBool enableCursorShapeUpdates; /* client supports cursor shape updates */
|
||||
rfbBool enableCursorPosUpdates; /* client supports cursor position updates */
|
||||
rfbBool useRichCursorEncoding; /* rfbEncodingRichCursor is preferred */
|
||||
rfbBool cursorWasChanged; /* cursor shape update should be sent */
|
||||
rfbBool cursorWasMoved; /* cursor position update should be sent */
|
||||
|
||||
rfbBool useNewFBSize; /* client supports NewFBSize encoding */
|
||||
rfbBool newFBSizePending; /* framebuffer size was changed */
|
||||
|
||||
#ifdef LIBVNCSERVER_BACKCHANNEL
|
||||
rfbBool enableBackChannel; /* custom channel for special clients */
|
||||
#endif
|
||||
|
||||
struct _rfbClientRec *prev;
|
||||
struct _rfbClientRec *next;
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
|
||||
/* whenever a client is referenced, the refCount has to be incremented
|
||||
and afterwards decremented, so that the client is not cleaned up
|
||||
while being referenced.
|
||||
Use the functions rfbIncrClientRef(cl) and rfbDecrClientRef(cl);
|
||||
*/
|
||||
int refCount;
|
||||
MUTEX(refCountMutex);
|
||||
COND(deleteCond);
|
||||
|
||||
MUTEX(outputMutex);
|
||||
MUTEX(updateMutex);
|
||||
COND(updateCond);
|
||||
#endif
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBZ
|
||||
void* zrleData;
|
||||
#endif
|
||||
|
||||
/* if progressive updating is on, this variable holds the current
|
||||
* y coordinate of the progressive slice. */
|
||||
int progressiveSliceY;
|
||||
} rfbClientRec, *rfbClientPtr;
|
||||
|
||||
/*
|
||||
* This macro is used to test whether there is a framebuffer update needing to
|
||||
* be sent to the client.
|
||||
*/
|
||||
|
||||
#define FB_UPDATE_PENDING(cl) \
|
||||
((!(cl)->enableCursorShapeUpdates && !(cl)->screen->cursorIsDrawn) || \
|
||||
((cl)->enableCursorShapeUpdates && (cl)->cursorWasChanged) || \
|
||||
((cl)->useNewFBSize && (cl)->newFBSizePending) || \
|
||||
((cl)->enableCursorPosUpdates && (cl)->cursorWasMoved) || \
|
||||
!sraRgnEmpty((cl)->copyRegion) || !sraRgnEmpty((cl)->modifiedRegion))
|
||||
|
||||
/*
|
||||
* Macros for endian swapping.
|
||||
*/
|
||||
|
||||
#define Swap16(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff))
|
||||
|
||||
#define Swap24(l) ((((l) & 0xff) << 16) | (((l) >> 16) & 0xff) | \
|
||||
(((l) & 0x00ff00)))
|
||||
|
||||
#define Swap32(l) (((l) >> 24) | \
|
||||
(((l) & 0x00ff0000) >> 8) | \
|
||||
(((l) & 0x0000ff00) << 8) | \
|
||||
((l) << 24))
|
||||
|
||||
|
||||
extern char rfbEndianTest;
|
||||
|
||||
#define Swap16IfLE(s) (rfbEndianTest ? Swap16(s) : (s))
|
||||
#define Swap24IfLE(l) (rfbEndianTest ? Swap24(l) : (l))
|
||||
#define Swap32IfLE(l) (rfbEndianTest ? Swap32(l) : (l))
|
||||
|
||||
/* sockets.c */
|
||||
|
||||
extern int rfbMaxClientWait;
|
||||
|
||||
extern void rfbInitSockets(rfbScreenInfoPtr rfbScreen);
|
||||
extern void rfbDisconnectUDPSock(rfbScreenInfoPtr rfbScreen);
|
||||
extern void rfbCloseClient(rfbClientPtr cl);
|
||||
extern int rfbReadExact(rfbClientPtr cl, char *buf, int len);
|
||||
extern int rfbReadExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout);
|
||||
extern int rfbWriteExact(rfbClientPtr cl, const char *buf, int len);
|
||||
extern void rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec);
|
||||
extern int rfbConnect(rfbScreenInfoPtr rfbScreen, char* host, int port);
|
||||
extern int rfbConnectToTcpAddr(char* host, int port);
|
||||
extern int rfbListenOnTCPPort(int port);
|
||||
extern int rfbListenOnUDPPort(int port);
|
||||
|
||||
/* rfbserver.c */
|
||||
|
||||
/* Routines to iterate over the client list in a thread-safe way.
|
||||
Only a single iterator can be in use at a time process-wide. */
|
||||
typedef struct rfbClientIterator *rfbClientIteratorPtr;
|
||||
|
||||
extern void rfbClientListInit(rfbScreenInfoPtr rfbScreen);
|
||||
extern rfbClientIteratorPtr rfbGetClientIterator(rfbScreenInfoPtr rfbScreen);
|
||||
extern rfbClientPtr rfbClientIteratorNext(rfbClientIteratorPtr iterator);
|
||||
extern void rfbReleaseClientIterator(rfbClientIteratorPtr iterator);
|
||||
|
||||
extern void rfbNewClientConnection(rfbScreenInfoPtr rfbScreen,int sock);
|
||||
extern rfbClientPtr rfbNewClient(rfbScreenInfoPtr rfbScreen,int sock);
|
||||
extern rfbClientPtr rfbNewUDPClient(rfbScreenInfoPtr rfbScreen);
|
||||
extern rfbClientPtr rfbReverseConnection(rfbScreenInfoPtr rfbScreen,char *host, int port);
|
||||
extern void rfbClientConnectionGone(rfbClientPtr cl);
|
||||
extern void rfbProcessClientMessage(rfbClientPtr cl);
|
||||
extern void rfbClientConnFailed(rfbClientPtr cl, char *reason);
|
||||
extern void rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen,int sock);
|
||||
extern void rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen);
|
||||
extern rfbBool rfbSendFramebufferUpdate(rfbClientPtr cl, sraRegionPtr updateRegion);
|
||||
extern rfbBool rfbSendRectEncodingRaw(rfbClientPtr cl, int x,int y,int w,int h);
|
||||
extern rfbBool rfbSendUpdateBuf(rfbClientPtr cl);
|
||||
extern void rfbSendServerCutText(rfbScreenInfoPtr rfbScreen,char *str, int len);
|
||||
extern rfbBool rfbSendCopyRegion(rfbClientPtr cl,sraRegionPtr reg,int dx,int dy);
|
||||
extern rfbBool rfbSendLastRectMarker(rfbClientPtr cl);
|
||||
extern rfbBool rfbSendNewFBSize(rfbClientPtr cl, int w, int h);
|
||||
extern rfbBool rfbSendSetColourMapEntries(rfbClientPtr cl, int firstColour, int nColours);
|
||||
extern void rfbSendBell(rfbScreenInfoPtr rfbScreen);
|
||||
|
||||
void rfbGotXCutText(rfbScreenInfoPtr rfbScreen, char *str, int len);
|
||||
|
||||
#ifdef LIBVNCSERVER_BACKCHANNEL
|
||||
extern void rfbSendBackChannel(rfbScreenInfoPtr s,char* message,int len);
|
||||
#endif
|
||||
|
||||
/* translate.c */
|
||||
|
||||
extern rfbBool rfbEconomicTranslate;
|
||||
|
||||
extern void rfbTranslateNone(char *table, rfbPixelFormat *in,
|
||||
rfbPixelFormat *out,
|
||||
char *iptr, char *optr,
|
||||
int bytesBetweenInputLines,
|
||||
int width, int height);
|
||||
extern rfbBool rfbSetTranslateFunction(rfbClientPtr cl);
|
||||
extern rfbBool rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours);
|
||||
extern void rfbSetClientColourMaps(rfbScreenInfoPtr rfbScreen, int firstColour, int nColours);
|
||||
|
||||
/* httpd.c */
|
||||
|
||||
extern void rfbHttpInitSockets(rfbScreenInfoPtr rfbScreen);
|
||||
extern void rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen);
|
||||
|
||||
|
||||
|
||||
/* auth.c */
|
||||
|
||||
extern void rfbAuthNewClient(rfbClientPtr cl);
|
||||
extern void rfbAuthProcessClientMessage(rfbClientPtr cl);
|
||||
|
||||
|
||||
/* rre.c */
|
||||
|
||||
extern rfbBool rfbSendRectEncodingRRE(rfbClientPtr cl, int x,int y,int w,int h);
|
||||
|
||||
|
||||
/* corre.c */
|
||||
|
||||
extern rfbBool rfbSendRectEncodingCoRRE(rfbClientPtr cl, int x,int y,int w,int h);
|
||||
|
||||
|
||||
/* hextile.c */
|
||||
|
||||
extern rfbBool rfbSendRectEncodingHextile(rfbClientPtr cl, int x, int y, int w,
|
||||
int h);
|
||||
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBZ
|
||||
/* zlib.c */
|
||||
|
||||
/* Minimum zlib rectangle size in bytes. Anything smaller will
|
||||
* not compress well due to overhead.
|
||||
*/
|
||||
#define VNC_ENCODE_ZLIB_MIN_COMP_SIZE (17)
|
||||
|
||||
/* Set maximum zlib rectangle size in pixels. Always allow at least
|
||||
* two scan lines.
|
||||
*/
|
||||
#define ZLIB_MAX_RECT_SIZE (128*256)
|
||||
#define ZLIB_MAX_SIZE(min) ((( min * 2 ) > ZLIB_MAX_RECT_SIZE ) ? \
|
||||
( min * 2 ) : ZLIB_MAX_RECT_SIZE )
|
||||
|
||||
extern rfbBool rfbSendRectEncodingZlib(rfbClientPtr cl, int x, int y, int w,
|
||||
int h);
|
||||
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
|
||||
/* tight.c */
|
||||
|
||||
#define TIGHT_DEFAULT_COMPRESSION 6
|
||||
|
||||
extern rfbBool rfbTightDisableGradient;
|
||||
|
||||
extern int rfbNumCodedRectsTight(rfbClientPtr cl, int x,int y,int w,int h);
|
||||
extern rfbBool rfbSendRectEncodingTight(rfbClientPtr cl, int x,int y,int w,int h);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* cursor.c */
|
||||
|
||||
typedef struct rfbCursor {
|
||||
/* set this to true if LibVNCServer has to free this cursor */
|
||||
rfbBool cleanup, cleanupSource, cleanupMask, cleanupRichSource;
|
||||
unsigned char *source; /* points to bits */
|
||||
unsigned char *mask; /* points to bits */
|
||||
unsigned short width, height, xhot, yhot; /* metrics */
|
||||
unsigned short foreRed, foreGreen, foreBlue; /* device-independent colour */
|
||||
unsigned short backRed, backGreen, backBlue; /* device-independent colour */
|
||||
unsigned char *richSource; /* source bytes for a rich cursor */
|
||||
} rfbCursor, *rfbCursorPtr;
|
||||
extern unsigned char rfbReverseByte[0x100];
|
||||
|
||||
extern rfbBool rfbSendCursorShape(rfbClientPtr cl/*, rfbScreenInfoPtr pScreen*/);
|
||||
extern rfbBool rfbSendCursorPos(rfbClientPtr cl);
|
||||
extern void rfbConvertLSBCursorBitmapOrMask(int width,int height,unsigned char* bitmap);
|
||||
extern rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskString);
|
||||
extern char* rfbMakeMaskForXCursor(int width,int height,char* cursorString);
|
||||
extern void rfbMakeXCursorFromRichCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor);
|
||||
extern void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor);
|
||||
extern void rfbFreeCursor(rfbCursorPtr cursor);
|
||||
extern void rfbDrawCursor(rfbScreenInfoPtr rfbScreen);
|
||||
extern void rfbUndrawCursor(rfbScreenInfoPtr rfbScreen);
|
||||
extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c,rfbBool freeOld);
|
||||
|
||||
/* cursor handling for the pointer */
|
||||
extern void rfbDefaultPtrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl);
|
||||
|
||||
/* zrle.c */
|
||||
#ifdef LIBVNCSERVER_HAVE_LIBZ
|
||||
extern rfbBool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w,int h);
|
||||
extern void rfbFreeZrleData(rfbClientPtr cl);
|
||||
#endif
|
||||
|
||||
/* stats.c */
|
||||
|
||||
extern void rfbResetStats(rfbClientPtr cl);
|
||||
extern void rfbPrintStats(rfbClientPtr cl);
|
||||
|
||||
/* font.c */
|
||||
|
||||
typedef struct rfbFontData {
|
||||
unsigned char* data;
|
||||
/*
|
||||
metaData is a 256*5 array:
|
||||
for each character
|
||||
(offset,width,height,x,y)
|
||||
*/
|
||||
int* metaData;
|
||||
} rfbFontData,* rfbFontDataPtr;
|
||||
|
||||
int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,rfbPixel colour);
|
||||
void rfbDrawString(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,rfbPixel colour);
|
||||
/* if colour==backColour, background is transparent */
|
||||
int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour);
|
||||
void rfbDrawStringWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour);
|
||||
int rfbWidthOfString(rfbFontDataPtr font,const char* string);
|
||||
int rfbWidthOfChar(rfbFontDataPtr font,unsigned char c);
|
||||
void rfbFontBBox(rfbFontDataPtr font,unsigned char c,int* x1,int* y1,int* x2,int* y2);
|
||||
/* this returns the smallest box enclosing any character of font. */
|
||||
void rfbWholeFontBBox(rfbFontDataPtr font,int *x1, int *y1, int *x2, int *y2);
|
||||
|
||||
/* dynamically load a linux console font (4096 bytes, 256 glyphs a 8x16 */
|
||||
rfbFontDataPtr rfbLoadConsoleFont(char *filename);
|
||||
/* free a dynamically loaded font */
|
||||
void rfbFreeFont(rfbFontDataPtr font);
|
||||
|
||||
/* draw.c */
|
||||
|
||||
/* You have to call rfbUndrawCursor before using these functions */
|
||||
void rfbFillRect(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col);
|
||||
void rfbDrawPixel(rfbScreenInfoPtr s,int x,int y,rfbPixel col);
|
||||
void rfbDrawLine(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col);
|
||||
|
||||
/* selbox.c */
|
||||
|
||||
/* this opens a modal select box. list is an array of strings, the end marked
|
||||
with a NULL.
|
||||
It returns the index in the list or -1 if cancelled or something else
|
||||
wasn't kosher. */
|
||||
typedef void (*SelectionChangedHookPtr)(int _index);
|
||||
extern int rfbSelectBox(rfbScreenInfoPtr rfbScreen,
|
||||
rfbFontDataPtr font, char** list,
|
||||
int x1, int y1, int x2, int y2,
|
||||
rfbPixel foreColour, rfbPixel backColour,
|
||||
int border,SelectionChangedHookPtr selChangedHook);
|
||||
|
||||
/* cargs.c */
|
||||
|
||||
extern void rfbUsage(void);
|
||||
extern void rfbPurgeArguments(int* argc,int* position,int count,char *argv[]);
|
||||
extern rfbBool rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[]);
|
||||
extern rfbBool rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[]);
|
||||
|
||||
/* main.c */
|
||||
|
||||
extern void rfbLogEnable(int enabled);
|
||||
typedef void (*rfbLogProc)(const char *format, ...);
|
||||
extern rfbLogProc rfbLog, rfbErr;
|
||||
extern void rfbLogPerror(const char *str);
|
||||
|
||||
void rfbScheduleCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy);
|
||||
void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy);
|
||||
|
||||
void rfbDoCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy);
|
||||
void rfbDoCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy);
|
||||
|
||||
void rfbMarkRectAsModified(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2);
|
||||
void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion);
|
||||
void rfbDoNothingWithClient(rfbClientPtr cl);
|
||||
enum rfbNewClientAction defaultNewClientHook(rfbClientPtr cl);
|
||||
|
||||
/* to check against plain passwords */
|
||||
rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len);
|
||||
|
||||
/* functions to make a vnc server */
|
||||
extern rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
|
||||
int width,int height,int bitsPerSample,int samplesPerPixel,
|
||||
int bytesPerPixel);
|
||||
extern void rfbInitServer(rfbScreenInfoPtr rfbScreen);
|
||||
extern void rfbNewFramebuffer(rfbScreenInfoPtr rfbScreen,char *framebuffer,
|
||||
int width,int height, int bitsPerSample,int samplesPerPixel,
|
||||
int bytesPerPixel);
|
||||
|
||||
extern void rfbScreenCleanup(rfbScreenInfoPtr screenInfo);
|
||||
|
||||
/* functions to accept/refuse a client that has been put on hold
|
||||
by a NewClientHookPtr function. Must not be called in other
|
||||
situations. */
|
||||
extern void rfbStartOnHoldClient(rfbClientPtr cl);
|
||||
extern void rfbRefuseOnHoldClient(rfbClientPtr cl);
|
||||
|
||||
/* call one of these two functions to service the vnc clients.
|
||||
usec are the microseconds the select on the fds waits.
|
||||
if you are using the event loop, set this to some value > 0, so the
|
||||
server doesn't get a high load just by listening. */
|
||||
|
||||
extern void rfbRunEventLoop(rfbScreenInfoPtr screenInfo, long usec, rfbBool runInBackground);
|
||||
extern void rfbProcessEvents(rfbScreenInfoPtr screenInfo,long usec);
|
||||
|
||||
#endif
|
||||
|
||||
#if(defined __cplusplus)
|
||||
}
|
||||
#endif
|
||||
@@ -1,204 +0,0 @@
|
||||
#ifndef RFBCLIENT_H
|
||||
#define RFBCLIENT_H
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved.
|
||||
* Copyright (C) 2000 Tridia Corporation. All Rights Reserved.
|
||||
* Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* vncviewer.h
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <rfb/rfbproto.h>
|
||||
#include <rfb/keysym.h>
|
||||
|
||||
#define rfbClientSwap16IfLE(s) \
|
||||
(*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
|
||||
|
||||
#define rfbClientSwap32IfLE(l) \
|
||||
(*(char *)&client->endianTest ? ((((l) & 0xff000000) >> 24) | \
|
||||
(((l) & 0x00ff0000) >> 8) | \
|
||||
(((l) & 0x0000ff00) << 8) | \
|
||||
(((l) & 0x000000ff) << 24)) : (l))
|
||||
|
||||
#define FLASH_PORT_OFFSET 5400
|
||||
#define LISTEN_PORT_OFFSET 5500
|
||||
#define TUNNEL_PORT_OFFSET 5500
|
||||
#define SERVER_PORT_OFFSET 5900
|
||||
|
||||
#define DEFAULT_SSH_CMD "/usr/bin/ssh"
|
||||
#define DEFAULT_TUNNEL_CMD \
|
||||
(DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20")
|
||||
#define DEFAULT_VIA_CMD \
|
||||
(DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20")
|
||||
|
||||
/* vncrec */
|
||||
|
||||
typedef struct {
|
||||
FILE* file;
|
||||
struct timeval tv;
|
||||
rfbBool readTimestamp;
|
||||
rfbBool doNotSleep;
|
||||
} rfbVNCRec;
|
||||
|
||||
|
||||
typedef struct {
|
||||
rfbBool shareDesktop;
|
||||
rfbBool viewOnly;
|
||||
|
||||
const char* encodingsString;
|
||||
|
||||
rfbBool useBGR233;
|
||||
int nColours;
|
||||
rfbBool forceOwnCmap;
|
||||
rfbBool forceTrueColour;
|
||||
int requestedDepth;
|
||||
|
||||
int compressLevel;
|
||||
int qualityLevel;
|
||||
rfbBool enableJPEG;
|
||||
rfbBool useRemoteCursor;
|
||||
} AppData;
|
||||
|
||||
|
||||
struct _rfbClient;
|
||||
|
||||
typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y);
|
||||
typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h);
|
||||
typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client);
|
||||
typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h);
|
||||
typedef char* (*GetPasswordProc)(struct _rfbClient* client);
|
||||
typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
|
||||
typedef void (*BellProc)(struct _rfbClient* client);
|
||||
|
||||
typedef struct _rfbClient {
|
||||
uint8_t* frameBuffer;
|
||||
int width, height;
|
||||
|
||||
int endianTest;
|
||||
|
||||
AppData appData;
|
||||
|
||||
const char* programName;
|
||||
char* serverHost;
|
||||
int serverPort; /* if -1, then use file recorded by vncrec */
|
||||
rfbBool listenSpecified;
|
||||
int listenPort, flashPort;
|
||||
|
||||
/* Note that the CoRRE encoding uses this buffer and assumes it is big enough
|
||||
to hold 255 * 255 * 32 bits -> 260100 bytes. 640*480 = 307200 bytes.
|
||||
Hextile also assumes it is big enough to hold 16 * 16 * 32 bits.
|
||||
Tight encoding assumes BUFFER_SIZE is at least 16384 bytes. */
|
||||
|
||||
#define RFB_BUFFER_SIZE (640*480)
|
||||
char buffer[RFB_BUFFER_SIZE];
|
||||
|
||||
/* rfbproto.c */
|
||||
|
||||
int sock;
|
||||
rfbBool canUseCoRRE;
|
||||
rfbBool canUseHextile;
|
||||
char *desktopName;
|
||||
rfbPixelFormat format;
|
||||
rfbServerInitMsg si;
|
||||
char *serverCutText;
|
||||
rfbBool newServerCutText;
|
||||
|
||||
/* sockets.c */
|
||||
#define RFB_BUF_SIZE 8192
|
||||
char buf[RFB_BUF_SIZE];
|
||||
char *bufoutptr;
|
||||
int buffered;
|
||||
|
||||
|
||||
/* cursor.c */
|
||||
uint8_t *rcSource, *rcMask;
|
||||
|
||||
/* private data pointer */
|
||||
void* clientData;
|
||||
|
||||
rfbVNCRec* vncRec;
|
||||
|
||||
/* hooks */
|
||||
HandleCursorPosProc HandleCursorPos;
|
||||
SoftCursorLockAreaProc SoftCursorLockArea;
|
||||
SoftCursorUnlockScreenProc SoftCursorUnlockScreen;
|
||||
GotFrameBufferUpdateProc GotFrameBufferUpdate;
|
||||
/* the pointer returned by GetPassword will be freed after use! */
|
||||
GetPasswordProc GetPassword;
|
||||
MallocFrameBufferProc MallocFrameBuffer;
|
||||
BellProc Bell;
|
||||
} rfbClient;
|
||||
|
||||
/* cursor.c */
|
||||
|
||||
extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc);
|
||||
|
||||
/* listen.c */
|
||||
|
||||
extern void listenForIncomingConnections(rfbClient* viewer);
|
||||
|
||||
/* rfbproto.c */
|
||||
|
||||
extern rfbBool rfbEnableClientLogging;
|
||||
typedef void (*rfbClientLogProc)(const char *format, ...);
|
||||
extern rfbClientLogProc rfbClientLog,rfbClientErr;
|
||||
extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port);
|
||||
extern rfbBool InitialiseRFBConnection(rfbClient* client);
|
||||
extern rfbBool SetFormatAndEncodings(rfbClient* client);
|
||||
extern rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient* client);
|
||||
extern rfbBool SendFramebufferUpdateRequest(rfbClient* client,
|
||||
int x, int y, int w, int h,
|
||||
rfbBool incremental);
|
||||
extern rfbBool SendPointerEvent(rfbClient* client,int x, int y, int buttonMask);
|
||||
extern rfbBool SendKeyEvent(rfbClient* client,uint32_t key, rfbBool down);
|
||||
extern rfbBool SendClientCutText(rfbClient* client,char *str, int len);
|
||||
extern rfbBool HandleRFBServerMessage(rfbClient* client);
|
||||
|
||||
extern void PrintPixelFormat(rfbPixelFormat *format);
|
||||
|
||||
/* sockets.c */
|
||||
|
||||
extern rfbBool errorMessageOnReadFailure;
|
||||
|
||||
extern rfbBool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n);
|
||||
extern rfbBool WriteToRFBServer(rfbClient* client, char *buf, int n);
|
||||
extern int FindFreeTcpPort(void);
|
||||
extern int ListenAtTcpPort(int port);
|
||||
extern int ConnectClientToTcpAddr(unsigned int host, int port);
|
||||
extern int AcceptTcpConnection(int listenSock);
|
||||
extern rfbBool SetNonBlocking(int sock);
|
||||
|
||||
extern rfbBool StringToIPAddr(const char *str, unsigned int *addr);
|
||||
extern rfbBool SameMachine(int sock);
|
||||
extern int WaitForMessage(rfbClient* client,unsigned int usecs);
|
||||
|
||||
/* vncviewer.c */
|
||||
rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,int bytesPerPixel);
|
||||
rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv);
|
||||
void rfbClientCleanup(rfbClient* client);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,344 +0,0 @@
|
||||
#ifndef _RFB_RFBCONFIG_H
|
||||
# define _RFB_RFBCONFIG_H
|
||||
|
||||
|
||||
/* Enable 24 bit per pixel in native framebuffer */
|
||||
#ifndef LIBVNCSERVER_ALLOW24BPP
|
||||
# define LIBVNCSERVER_ALLOW24BPP 1
|
||||
#endif
|
||||
|
||||
/* Enable BackChannel communication */
|
||||
#ifndef LIBVNCSERVER_BACKCHANNEL
|
||||
# define LIBVNCSERVER_BACKCHANNEL 1
|
||||
#endif
|
||||
|
||||
/* Use ffmpeg (for vnc2mpg) */
|
||||
/* #undef LIBVNCSERVER_FFMPEG */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_ARPA_INET_H
|
||||
# define LIBVNCSERVER_HAVE_ARPA_INET_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||
/* #undef LIBVNCSERVER_HAVE_DOPRNT */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_FCNTL_H
|
||||
# define LIBVNCSERVER_HAVE_FCNTL_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
/* #undef LIBVNCSERVER_HAVE_FORK */
|
||||
|
||||
/* Define to 1 if you have the `ftime' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_FTIME
|
||||
#define LIBVNCSERVER_HAVE_FTIME 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_GETHOSTBYNAME
|
||||
#define LIBVNCSERVER_HAVE_GETHOSTBYNAME 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_GETHOSTNAME
|
||||
#define LIBVNCSERVER_HAVE_GETHOSTNAME 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_GETTIMEOFDAY
|
||||
#define LIBVNCSERVER_HAVE_GETTIMEOFDAY 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_INET_NTOA
|
||||
#define LIBVNCSERVER_HAVE_INET_NTOA 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_INTTYPES_H
|
||||
#define LIBVNCSERVER_HAVE_INTTYPES_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
|
||||
/* #undef LIBVNCSERVER_HAVE_LIBJPEG */
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
/* #undef LIBVNCSERVER_HAVE_LIBNSL */
|
||||
|
||||
/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
#ifndef LIBVNCSERVER_HAVE_LIBPTHREAD
|
||||
#ifndef _WIN32
|
||||
# define LIBVNCSERVER_HAVE_LIBPTHREAD 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef LIBVNCSERVER_HAVE_LIBSOCKET */
|
||||
|
||||
/* Define to 1 if you have the `z' library (-lz). */
|
||||
#ifndef LIBVNCSERVER_HAVE_LIBZ
|
||||
#define LIBVNCSERVER_HAVE_LIBZ 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#ifndef LIBVNCSERVER_HAVE_MALLOC
|
||||
#define LIBVNCSERVER_HAVE_MALLOC 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_MEMMOVE
|
||||
#define LIBVNCSERVER_HAVE_MEMMOVE 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_MEMORY_H
|
||||
#define LIBVNCSERVER_HAVE_MEMORY_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_MEMSET
|
||||
#define LIBVNCSERVER_HAVE_MEMSET 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `mkfifo' function. */
|
||||
/* #unndef LIBVNCSERVER_HAVE_MKFIFO */
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_NETDB_H
|
||||
#define LIBVNCSERVER_HAVE_NETDB_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
/* #undef LIBVNCSERVER_HAVE_NETINET_IN_H */
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_SELECT
|
||||
#define LIBVNCSERVER_HAVE_SELECT 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
/* #undef LIBVNCSERVER_HAVE_SETSID */
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_SOCKET
|
||||
#define LIBVNCSERVER_HAVE_SOCKET 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if `stat' has the bug that it succeeds when given the
|
||||
zero-length file name argument. */
|
||||
/* #undef LIBVNCSERVER_HAVE_STAT_EMPTY_STRING_BUG */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STDINT_H
|
||||
#define LIBVNCSERVER_HAVE_STDINT_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STDLIB_H
|
||||
#define LIBVNCSERVER_HAVE_STDLIB_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRCHR
|
||||
#define LIBVNCSERVER_HAVE_STRCHR 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `strcspn' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRCSPN
|
||||
#define LIBVNCSERVER_HAVE_STRCSPN 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRDUP
|
||||
#define LIBVNCSERVER_HAVE_STRDUP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRERROR
|
||||
#define LIBVNCSERVER_HAVE_STRERROR 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRFTIME
|
||||
#define LIBVNCSERVER_HAVE_STRFTIME 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRINGS_H
|
||||
#define LIBVNCSERVER_HAVE_STRINGS_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRING_H
|
||||
#define LIBVNCSERVER_HAVE_STRING_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_STRSTR
|
||||
#define LIBVNCSERVER_HAVE_STRSTR 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
/* #undef LIBVNCSERVER_HAVE_SYSLOG_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
/* #undef LIBVNCSERVER_HAVE_SYS_SOCKET_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_SYS_STAT_H
|
||||
#define LIBVNCSERVER_HAVE_SYS_STAT_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_SYS_TIMEB_H
|
||||
#define LIBVNCSERVER_HAVE_SYS_TIMEB_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_SYS_TIME_H
|
||||
#define LIBVNCSERVER_HAVE_SYS_TIME_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_SYS_TYPES_H
|
||||
#define LIBVNCSERVER_HAVE_SYS_TYPES_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#ifndef LIBVNCSERVER_HAVE_SYS_WAIT_H
|
||||
#define LIBVNCSERVER_HAVE_SYS_WAIT_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#ifndef LIBVNCSERVER_HAVE_UNISTD_H
|
||||
#define LIBVNCSERVER_HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `vfork' function. */
|
||||
/* #undef LIBVNCSERVER_HAVE_VFORK */
|
||||
|
||||
/* Define to 1 if you have the <vfork.h> header file. */
|
||||
/* #undef LIBVNCSERVER_HAVE_VFORK_H */
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#ifndef LIBVNCSERVER_HAVE_VPRINTF
|
||||
#define LIBVNCSERVER_HAVE_VPRINTF 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if `fork' works. */
|
||||
/* #undef LIBVNCSERVER_HAVE_WORKING_FORK */
|
||||
|
||||
/* Define to 1 if `vfork' works. */
|
||||
/* #undef LIBVNCSERVER_HAVE_WORKING_VFORK */
|
||||
|
||||
/* XKEYBOARD extension build environment present */
|
||||
/* #undef LIBVNCSERVER_HAVE_XKEYBOARD */
|
||||
|
||||
/* MIT-SHM extension build environment present */
|
||||
/* #undef LIBVNCSERVER_HAVE_XSHM */
|
||||
|
||||
/* XTEST extension build environment present */
|
||||
/* #undef LIBVNCSERVER_HAVE_XTEST */
|
||||
|
||||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
/* #undef LIBVNCSERVER_LSTAT_FOLLOWS_SLASHED_SYMLINK */
|
||||
|
||||
/* Name of package */
|
||||
#ifndef LIBVNCSERVER_PACKAGE
|
||||
#define LIBVNCSERVER_PACKAGE "LibVNCServer"
|
||||
#endif
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#ifndef LIBVNCSERVER_PACKAGE_BUGREPORT
|
||||
#define LIBVNCSERVER_PACKAGE_BUGREPORT "http://sourceforge.net/projects/libvncserver"
|
||||
#endif
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#ifndef LIBVNCSERVER_PACKAGE_NAME
|
||||
#define LIBVNCSERVER_PACKAGE_NAME "LibVNCServer"
|
||||
#endif
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#ifndef LIBVNCSERVER_PACKAGE_STRING
|
||||
#define LIBVNCSERVER_PACKAGE_STRING "LibVNCServer 0.7"
|
||||
#endif
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#ifndef LIBVNCSERVER_PACKAGE_TARNAME
|
||||
#define LIBVNCSERVER_PACKAGE_TARNAME "libvncserver"
|
||||
#endif
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#ifndef LIBVNCSERVER_PACKAGE_VERSION
|
||||
#define LIBVNCSERVER_PACKAGE_VERSION "0.7"
|
||||
#endif
|
||||
|
||||
/* The number of bytes in type char */
|
||||
/* #undef LIBVNCSERVER_SIZEOF_CHAR */
|
||||
|
||||
/* The number of bytes in type int */
|
||||
/* #undef LIBVNCSERVER_SIZEOF_INT */
|
||||
|
||||
/* The number of bytes in type long */
|
||||
/* #undef LIBVNCSERVER_SIZEOF_LONG */
|
||||
|
||||
/* The number of bytes in type short */
|
||||
/* #undef LIBVNCSERVER_SIZEOF_SHORT */
|
||||
|
||||
/* The number of bytes in type void* */
|
||||
/* #undef LIBVNCSERVER_SIZEOF_VOIDP */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#ifndef LIBVNCSERVER_STDC_HEADERS
|
||||
#define LIBVNCSERVER_STDC_HEADERS 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#ifndef LIBVNCSERVER_TIME_WITH_SYS_TIME
|
||||
#define LIBVNCSERVER_TIME_WITH_SYS_TIME 1
|
||||
#endif
|
||||
|
||||
/* Version number of package */
|
||||
#ifndef LIBVNCSERVER_VERSION
|
||||
#define LIBVNCSERVER_VERSION "0.7"
|
||||
#endif
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef LIBVNCSERVER_WORDS_BIGENDIAN */
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
#ifndef LIBVNCSERVER_X_DISPLAY_MISSING
|
||||
#define LIBVNCSERVER_X_DISPLAY_MISSING 1
|
||||
#endif
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef _libvncserver_const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef _libvncserver_inline */
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
/* #undef _libvncserver_malloc */
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef _libvncserver_pid_t */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* #undef _libvncserver_size_t */
|
||||
|
||||
/* The type for socklen */
|
||||
/* #undef _libvncserver_socklen_t */
|
||||
|
||||
/* Define as `fork' if `vfork' does not work. */
|
||||
/* #undef _libvncserver_vfork */
|
||||
|
||||
/* once: _RFB_RFBCONFIG_H */
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
#ifndef _RFB_RFBINT_H
|
||||
#define _RFB_RFBINT_H 1
|
||||
#ifndef _GENERATED_STDINT_H
|
||||
#define _GENERATED_STDINT_H "LibVNCServer 0.7"
|
||||
/* generated using a gnu compiler version gcc (Debian 4.9.2-10) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
/* system headers have good uint64_t */
|
||||
#ifndef _HAVE_UINT64_T
|
||||
#define _HAVE_UINT64_T
|
||||
#endif
|
||||
|
||||
/* once */
|
||||
#endif
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,62 +0,0 @@
|
||||
#ifndef SRAREGION_H
|
||||
#define SRAREGION_H
|
||||
|
||||
/* -=- SRA - Simple Region Algorithm
|
||||
* A simple rectangular region implementation.
|
||||
* Copyright (c) 2001 James "Wez" Weatherall, Johannes E. Schindelin
|
||||
*/
|
||||
|
||||
/* -=- sraRect */
|
||||
|
||||
typedef struct _rect {
|
||||
int x1;
|
||||
int y1;
|
||||
int x2;
|
||||
int y2;
|
||||
} sraRect;
|
||||
|
||||
typedef struct sraRegion sraRegion;
|
||||
|
||||
/* -=- Region manipulation functions */
|
||||
|
||||
extern sraRegion *sraRgnCreate();
|
||||
extern sraRegion *sraRgnCreateRect(int x1, int y1, int x2, int y2);
|
||||
extern sraRegion *sraRgnCreateRgn(const sraRegion *src);
|
||||
|
||||
extern void sraRgnDestroy(sraRegion *rgn);
|
||||
extern void sraRgnMakeEmpty(sraRegion *rgn);
|
||||
extern rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src);
|
||||
extern void sraRgnOr(sraRegion *dst, const sraRegion *src);
|
||||
extern rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src);
|
||||
|
||||
extern void sraRgnOffset(sraRegion *dst, int dx, int dy);
|
||||
|
||||
extern rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect,
|
||||
unsigned long flags);
|
||||
|
||||
extern unsigned long sraRgnCountRects(const sraRegion *rgn);
|
||||
extern rfbBool sraRgnEmpty(const sraRegion *rgn);
|
||||
|
||||
extern sraRegion *sraRgnBBox(const sraRegion *src);
|
||||
|
||||
/* -=- rectangle iterator */
|
||||
|
||||
typedef struct sraRectangleIterator {
|
||||
rfbBool reverseX,reverseY;
|
||||
int ptrSize,ptrPos;
|
||||
struct sraSpan** sPtrs;
|
||||
} sraRectangleIterator;
|
||||
|
||||
extern sraRectangleIterator *sraRgnGetIterator(sraRegion *s);
|
||||
extern sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,rfbBool reverseX,rfbBool reverseY);
|
||||
extern rfbBool sraRgnIteratorNext(sraRectangleIterator *i,sraRect *r);
|
||||
extern void sraRgnReleaseIterator(sraRectangleIterator *i);
|
||||
|
||||
void sraRgnPrint(const sraRegion *s);
|
||||
|
||||
/* -=- Rectangle clipper (for speed) */
|
||||
|
||||
extern rfbBool sraClipRect(int *x, int *y, int *w, int *h,
|
||||
int cx, int cy, int cw, int ch);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user