From 67570b45de74b9357b606729cc43c1d60c480be8 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Mon, 1 Dec 2014 16:32:18 +0900
Subject: [PATCH 1/5] Add Japanese keymap
---
genkeymap/dump-keymaps.sh | 7 +
instfiles/Makefile.am | 6 +-
instfiles/km-0411.ini | 1055 +++++++++++++++++++++++++++++++++++++
instfiles/km-e0010411.ini | 1055 +++++++++++++++++++++++++++++++++++++
instfiles/km-e0200411.ini | 1055 +++++++++++++++++++++++++++++++++++++
instfiles/km-e0210411.ini | 1055 +++++++++++++++++++++++++++++++++++++
6 files changed, 4232 insertions(+), 1 deletion(-)
create mode 100644 instfiles/km-0411.ini
create mode 100644 instfiles/km-e0010411.ini
create mode 100644 instfiles/km-e0200411.ini
create mode 100644 instfiles/km-e0210411.ini
diff --git a/genkeymap/dump-keymaps.sh b/genkeymap/dump-keymaps.sh
index a78caa95..8a7d1c41 100755
--- a/genkeymap/dump-keymaps.sh
+++ b/genkeymap/dump-keymaps.sh
@@ -19,6 +19,13 @@ setxkbmap -model pc104 -layout de
setxkbmap -model pc104 -layout it
./xrdp-genkeymap ../instfiles/km-0410.ini
+# Japanese 'jp' 0x0411
+setxkbmap -model jp106 -layout jp -variant OADG109A
+./xrdp-genkeymap ../instfiles/km-0411.ini
+./xrdp-genkeymap ../instfiles/km-e0010411.ini
+./xrdp-genkeymap ../instfiles/km-e0200411.ini
+./xrdp-genkeymap ../instfiles/km-e0210411.ini
+
# Polish 'pl' 0x0415
setxkbmap -model pc104 -layout pl
./xrdp-genkeymap ../instfiles/km-0415.ini
diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am
index 8b303f63..85b5ffaa 100644
--- a/instfiles/Makefile.am
+++ b/instfiles/Makefile.am
@@ -22,10 +22,14 @@ startscript_DATA = \
km-0409.ini \
km-040c.ini \
km-0410.ini \
+ km-0411.ini \
km-0415.ini \
km-0419.ini \
km-041d.ini \
- km-0816.ini
+ km-0816.ini \
+ km-e0010411.ini \
+ km-e0200411.ini \
+ km-e0210411.ini
# must be tab below
install-data-hook:
diff --git a/instfiles/km-0411.ini b/instfiles/km-0411.ini
new file mode 100644
index 00000000..50ba669f
--- /dev/null
+++ b/instfiles/km-0411.ini
@@ -0,0 +1,1055 @@
+[noshift]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=92:92
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shift]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=95:95
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[altgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslock]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslock]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
diff --git a/instfiles/km-e0010411.ini b/instfiles/km-e0010411.ini
new file mode 100644
index 00000000..50ba669f
--- /dev/null
+++ b/instfiles/km-e0010411.ini
@@ -0,0 +1,1055 @@
+[noshift]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=92:92
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shift]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=95:95
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[altgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslock]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslock]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
diff --git a/instfiles/km-e0200411.ini b/instfiles/km-e0200411.ini
new file mode 100644
index 00000000..50ba669f
--- /dev/null
+++ b/instfiles/km-e0200411.ini
@@ -0,0 +1,1055 @@
+[noshift]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=92:92
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shift]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=95:95
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[altgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslock]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslock]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
diff --git a/instfiles/km-e0210411.ini b/instfiles/km-e0210411.ini
new file mode 100644
index 00000000..50ba669f
--- /dev/null
+++ b/instfiles/km-e0210411.ini
@@ -0,0 +1,1055 @@
+[noshift]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=92:92
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shift]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=95:95
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[altgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslock]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=60:60
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[capslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=49:49
+Key11=50:50
+Key12=51:51
+Key13=52:52
+Key14=53:53
+Key15=54:54
+Key16=55:55
+Key17=56:56
+Key18=57:57
+Key19=48:48
+Key20=45:45
+Key21=94:94
+Key22=65288:8
+Key23=65289:9
+Key24=81:81
+Key25=87:87
+Key26=69:69
+Key27=82:82
+Key28=84:84
+Key29=89:89
+Key30=85:85
+Key31=73:73
+Key32=79:79
+Key33=80:80
+Key34=64:64
+Key35=91:91
+Key36=65293:13
+Key37=65507:0
+Key38=65:65
+Key39=83:83
+Key40=68:68
+Key41=70:70
+Key42=71:71
+Key43=72:72
+Key44=74:74
+Key45=75:75
+Key46=76:76
+Key47=59:59
+Key48=58:58
+Key49=65322:0
+Key50=65505:0
+Key51=93:93
+Key52=90:90
+Key53=88:88
+Key54=67:67
+Key55=86:86
+Key56=66:66
+Key57=78:78
+Key58=77:77
+Key59=44:44
+Key60=46:46
+Key61=47:47
+Key62=65506:0
+Key63=65450:42
+Key64=65513:0
+Key65=32:32
+Key66=65328:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65429:0
+Key80=65431:0
+Key81=65434:0
+Key82=65453:45
+Key83=65430:0
+Key84=65437:0
+Key85=65432:0
+Key86=65451:43
+Key87=65436:0
+Key88=65433:0
+Key89=65435:0
+Key90=65438:0
+Key91=65439:0
+Key92=65377:0
+Key93=0:0
+Key94=124:124
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65514:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=0:0
+Key126=65469:61
+Key127=0:0
+Key128=0:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=165:165
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslock]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=62:62
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
+
+[shiftcapslockaltgr]
+Key8=65406:0
+Key9=65307:27
+Key10=33:33
+Key11=34:34
+Key12=35:35
+Key13=36:36
+Key14=37:37
+Key15=38:38
+Key16=39:39
+Key17=40:40
+Key18=41:41
+Key19=48:48
+Key20=61:61
+Key21=126:126
+Key22=65288:8
+Key23=65056:0
+Key24=113:113
+Key25=119:119
+Key26=101:101
+Key27=114:114
+Key28=116:116
+Key29=121:121
+Key30=117:117
+Key31=105:105
+Key32=111:111
+Key33=112:112
+Key34=96:96
+Key35=123:123
+Key36=65293:13
+Key37=65507:0
+Key38=97:97
+Key39=115:115
+Key40=100:100
+Key41=102:102
+Key42=103:103
+Key43=104:104
+Key44=106:106
+Key45=107:107
+Key46=108:108
+Key47=43:43
+Key48=42:42
+Key49=65322:0
+Key50=65505:0
+Key51=125:125
+Key52=122:122
+Key53=120:120
+Key54=99:99
+Key55=118:118
+Key56=98:98
+Key57=110:110
+Key58=109:109
+Key59=60:60
+Key60=62:62
+Key61=63:63
+Key62=65506:0
+Key63=65450:42
+Key64=65511:0
+Key65=32:32
+Key66=65509:0
+Key67=65470:0
+Key68=65471:0
+Key69=65472:0
+Key70=65473:0
+Key71=65474:0
+Key72=65475:0
+Key73=65476:0
+Key74=65477:0
+Key75=65478:0
+Key76=65479:0
+Key77=65407:0
+Key78=65300:0
+Key79=65463:55
+Key80=65464:56
+Key81=65465:57
+Key82=65453:45
+Key83=65460:52
+Key84=65461:53
+Key85=65462:54
+Key86=65451:43
+Key87=65457:49
+Key88=65458:50
+Key89=65459:51
+Key90=65456:48
+Key91=65454:46
+Key92=65377:0
+Key93=0:0
+Key94=166:166
+Key95=65480:0
+Key96=65481:0
+Key97=65360:0
+Key98=65362:0
+Key99=65365:0
+Key100=65361:0
+Key101=0:0
+Key102=65363:0
+Key103=65367:0
+Key104=65364:0
+Key105=65366:0
+Key106=65379:0
+Key107=65535:127
+Key108=65421:13
+Key109=65508:0
+Key110=65299:0
+Key111=65377:0
+Key112=65455:47
+Key113=65512:0
+Key114=269025049:0
+Key115=65515:0
+Key116=65516:0
+Key117=0:0
+Key118=269025153:0
+Key119=269025093:0
+Key120=269025094:0
+Key121=269025095:0
+Key122=269025096:0
+Key123=0:0
+Key124=65027:0
+Key125=65513:0
+Key126=65469:61
+Key127=65515:0
+Key128=65517:0
+Key129=0:0
+Key130=0:0
+Key131=0:0
+Key132=0:0
+Key133=124:124
+Key134=0:0
+Key135=0:0
+Key136=0:0
+Key137=0:0
From 2212991bd7f51440db787a4f8739defedebde625 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Mon, 8 Dec 2014 11:43:22 +0900
Subject: [PATCH 2/5] Add Japanese keymap codes in xrdp_keyboard.ini
---
xrdp/xrdp_keyboard.ini | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/xrdp/xrdp_keyboard.ini b/xrdp/xrdp_keyboard.ini
index 433d71cf..24722736 100644
--- a/xrdp/xrdp_keyboard.ini
+++ b/xrdp/xrdp_keyboard.ini
@@ -62,6 +62,9 @@ rdp_layout_de=0x00000407
rdp_layout_fr=0x0000040C
rdp_layout_it=0x00000410
rdp_layout_jp=0x00000411
+rdp_layout_jp2=0xe0010411
+rdp_layout_jp3=0xe0200411
+rdp_layout_jp4=0xe0210411
rdp_layout_ru=0x00000419
rdp_layout_se=0x0000041D
rdp_layout_pt=0x00000816
@@ -75,6 +78,9 @@ rdp_layout_de=de
rdp_layout_fr=fr
rdp_layout_it=it
rdp_layout_jp=jp
+rdp_layout_jp2=jp
+rdp_layout_jp3=jp
+rdp_layout_jp4=jp
rdp_layout_ru=ru
rdp_layout_se=se
rdp_layout_pt=pt
@@ -100,6 +106,9 @@ rdp_layout_us=us
rdp_layout_de=de
rdp_layout_fr=fr
rdp_layout_jp=jp
+rdp_layout_jp2=jp
+rdp_layout_jp3=jp
+rdp_layout_jp4=jp
rdp_layout_it=it
rdp_layout_ru=ru
rdp_layout_se=se
From de32ca87b9b147a6e26d06bd13f940a9c38be61f Mon Sep 17 00:00:00 2001
From: Jay Sorg
Date: Wed, 10 Dec 2014 11:34:41 -0800
Subject: [PATCH 3/5] xrdp: jp changes for xrdp_keyboard.ini
---
xrdp/xrdp_keyboard.ini | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xrdp/xrdp_keyboard.ini b/xrdp/xrdp_keyboard.ini
index 433d71cf..a1f8e088 100644
--- a/xrdp/xrdp_keyboard.ini
+++ b/xrdp/xrdp_keyboard.ini
@@ -62,6 +62,9 @@ rdp_layout_de=0x00000407
rdp_layout_fr=0x0000040C
rdp_layout_it=0x00000410
rdp_layout_jp=0x00000411
+rdp_layout_jp1=0x00100411
+rdp_layout_jp2=0x02000411
+rdp_layout_jp3=0x02100411
rdp_layout_ru=0x00000419
rdp_layout_se=0x0000041D
rdp_layout_pt=0x00000816
@@ -75,6 +78,9 @@ rdp_layout_de=de
rdp_layout_fr=fr
rdp_layout_it=it
rdp_layout_jp=jp
+rdp_layout_jp1=jp
+rdp_layout_jp2=jp
+rdp_layout_jp3=jp
rdp_layout_ru=ru
rdp_layout_se=se
rdp_layout_pt=pt
@@ -99,8 +105,11 @@ layouts_map=default_layouts_map
rdp_layout_us=us
rdp_layout_de=de
rdp_layout_fr=fr
-rdp_layout_jp=jp
rdp_layout_it=it
+rdp_layout_jp=jp
+rdp_layout_jp1=jp
+rdp_layout_jp2=jp
+rdp_layout_jp3=jp
rdp_layout_ru=ru
rdp_layout_se=se
rdp_layout_pt=pt
From 3989dfcecc02609a7586b9d51f9c30ad8b114edb Mon Sep 17 00:00:00 2001
From: Jay Sorg
Date: Thu, 11 Dec 2014 14:56:52 -0800
Subject: [PATCH 4/5] pulseaudio: if source and sink are not installed, use
null sink so pulseaudio will always start
---
instfiles/pulse/default.pa | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/instfiles/pulse/default.pa b/instfiles/pulse/default.pa
index 38e9f790..08741741 100644
--- a/instfiles/pulse/default.pa
+++ b/instfiles/pulse/default.pa
@@ -1,7 +1,12 @@
.nofail
.fail
load-module module-augment-properties
+load-module module-always-sink
+.ifexists module-xrdp-sink.so
load-module module-xrdp-sink
+.endif
+.ifexists module-xrdp-source.so
load-module module-xrdp-source
-load-module module-always-sink
+.endif
load-module module-native-protocol-unix
+
From 762209e0dd94a54761d4396b665352f15b3a6100 Mon Sep 17 00:00:00 2001
From: Jay Sorg
Date: Thu, 11 Dec 2014 21:55:21 -0800
Subject: [PATCH 5/5] xorg: server removed and put in submodule
---
xorg/server/Makefile.am | 7 -
xorg/server/bootstrap | 36 -
xorg/server/configure.ac | 35 -
xorg/server/module/Makefile.am | 22 -
xorg/server/module/amd64/cpuid_amd64.asm | 41 -
xorg/server/module/amd64/funcs_amd64.h | 39 -
.../module/amd64/i420_to_rgb32_amd64_sse2.asm | 248 --
.../module/amd64/uyvy_to_rgb32_amd64_sse2.asm | 17 -
.../module/amd64/yuy2_to_rgb32_amd64_sse2.asm | 17 -
.../module/amd64/yv12_to_rgb32_amd64_sse2.asm | 248 --
xorg/server/module/rdp.h | 372 ---
xorg/server/module/rdpCapture.c | 788 ------
xorg/server/module/rdpCapture.h | 41 -
xorg/server/module/rdpClientCon.c | 2283 -----------------
xorg/server/module/rdpClientCon.h | 168 --
xorg/server/module/rdpComposite.c | 94 -
xorg/server/module/rdpComposite.h | 36 -
xorg/server/module/rdpCopyArea.c | 94 -
xorg/server/module/rdpCopyArea.h | 33 -
xorg/server/module/rdpCopyPlane.c | 98 -
xorg/server/module/rdpCopyPlane.h | 34 -
xorg/server/module/rdpCursor.c | 358 ---
xorg/server/module/rdpCursor.h | 45 -
xorg/server/module/rdpDraw.c | 411 ---
xorg/server/module/rdpDraw.h | 93 -
xorg/server/module/rdpFillPolygon.c | 119 -
xorg/server/module/rdpFillPolygon.h | 34 -
xorg/server/module/rdpFillSpans.c | 62 -
xorg/server/module/rdpFillSpans.h | 33 -
xorg/server/module/rdpGC.c | 235 --
xorg/server/module/rdpGC.h | 34 -
xorg/server/module/rdpGlyphs.c | 105 -
xorg/server/module/rdpGlyphs.h | 66 -
xorg/server/module/rdpImageGlyphBlt.c | 89 -
xorg/server/module/rdpImageGlyphBlt.h | 34 -
xorg/server/module/rdpImageText16.c | 87 -
xorg/server/module/rdpImageText16.h | 33 -
xorg/server/module/rdpImageText8.c | 87 -
xorg/server/module/rdpImageText8.h | 33 -
xorg/server/module/rdpInput.c | 133 -
xorg/server/module/rdpInput.h | 50 -
xorg/server/module/rdpMain.c | 111 -
xorg/server/module/rdpMain.h | 34 -
xorg/server/module/rdpMisc.c | 446 ----
xorg/server/module/rdpMisc.h | 265 --
xorg/server/module/rdpPixmap.c | 122 -
xorg/server/module/rdpPixmap.h | 53 -
xorg/server/module/rdpPolyArc.c | 104 -
xorg/server/module/rdpPolyArc.h | 32 -
xorg/server/module/rdpPolyFillArc.c | 104 -
xorg/server/module/rdpPolyFillArc.h | 32 -
xorg/server/module/rdpPolyFillRect.c | 87 -
xorg/server/module/rdpPolyFillRect.h | 33 -
xorg/server/module/rdpPolyGlyphBlt.c | 89 -
xorg/server/module/rdpPolyGlyphBlt.h | 34 -
xorg/server/module/rdpPolyPoint.c | 95 -
xorg/server/module/rdpPolyPoint.h | 33 -
xorg/server/module/rdpPolyRectangle.c | 134 -
xorg/server/module/rdpPolyRectangle.h | 33 -
xorg/server/module/rdpPolySegment.c | 101 -
xorg/server/module/rdpPolySegment.h | 32 -
xorg/server/module/rdpPolyText16.c | 91 -
xorg/server/module/rdpPolyText16.h | 33 -
xorg/server/module/rdpPolyText8.c | 91 -
xorg/server/module/rdpPolyText8.h | 33 -
xorg/server/module/rdpPolylines.c | 103 -
xorg/server/module/rdpPolylines.h | 33 -
xorg/server/module/rdpPri.c | 177 --
xorg/server/module/rdpPri.h | 51 -
xorg/server/module/rdpPushPixels.c | 62 -
xorg/server/module/rdpPushPixels.h | 33 -
xorg/server/module/rdpPutImage.c | 91 -
xorg/server/module/rdpPutImage.h | 33 -
xorg/server/module/rdpRandR.c | 273 --
xorg/server/module/rdpRandR.h | 64 -
xorg/server/module/rdpReg.c | 267 --
xorg/server/module/rdpReg.h | 68 -
xorg/server/module/rdpSetSpans.c | 64 -
xorg/server/module/rdpSetSpans.h | 33 -
xorg/server/module/rdpSimd.c | 110 -
xorg/server/module/rdpSimd.h | 34 -
xorg/server/module/rdpTrapezoids.c | 88 -
xorg/server/module/rdpTrapezoids.h | 34 -
xorg/server/module/rdpXv.c | 690 -----
xorg/server/module/rdpXv.h | 42 -
.../x86/a8r8g8b8_to_a8b8g8r8_box_x86_sse2.asm | 174 --
xorg/server/module/x86/cpuid_x86.asm | 39 -
xorg/server/module/x86/funcs_x86.h | 43 -
.../module/x86/i420_to_rgb32_x86_sse2.asm | 243 --
.../module/x86/uyvy_to_rgb32_x86_sse2.asm | 22 -
.../module/x86/yuy2_to_rgb32_x86_sse2.asm | 22 -
.../module/x86/yv12_to_rgb32_x86_sse2.asm | 243 --
xorg/server/readme.txt | 100 -
xorg/server/test-in-home.sh | 41 -
xorg/server/xrdpdev/Makefile.am | 17 -
xorg/server/xrdpdev/xorg.conf | 68 -
xorg/server/xrdpdev/xrdpdev.c | 779 ------
xorg/server/xrdpkeyb/Makefile.am | 16 -
xorg/server/xrdpkeyb/rdpKeyboard.c | 732 ------
xorg/server/xrdpmouse/Makefile.am | 16 -
xorg/server/xrdpmouse/rdpMouse.c | 367 ---
101 files changed, 14386 deletions(-)
delete mode 100644 xorg/server/Makefile.am
delete mode 100755 xorg/server/bootstrap
delete mode 100644 xorg/server/configure.ac
delete mode 100644 xorg/server/module/Makefile.am
delete mode 100644 xorg/server/module/amd64/cpuid_amd64.asm
delete mode 100644 xorg/server/module/amd64/funcs_amd64.h
delete mode 100644 xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm
delete mode 100644 xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm
delete mode 100644 xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm
delete mode 100644 xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm
delete mode 100644 xorg/server/module/rdp.h
delete mode 100644 xorg/server/module/rdpCapture.c
delete mode 100644 xorg/server/module/rdpCapture.h
delete mode 100644 xorg/server/module/rdpClientCon.c
delete mode 100644 xorg/server/module/rdpClientCon.h
delete mode 100644 xorg/server/module/rdpComposite.c
delete mode 100644 xorg/server/module/rdpComposite.h
delete mode 100644 xorg/server/module/rdpCopyArea.c
delete mode 100644 xorg/server/module/rdpCopyArea.h
delete mode 100644 xorg/server/module/rdpCopyPlane.c
delete mode 100644 xorg/server/module/rdpCopyPlane.h
delete mode 100644 xorg/server/module/rdpCursor.c
delete mode 100644 xorg/server/module/rdpCursor.h
delete mode 100644 xorg/server/module/rdpDraw.c
delete mode 100644 xorg/server/module/rdpDraw.h
delete mode 100644 xorg/server/module/rdpFillPolygon.c
delete mode 100644 xorg/server/module/rdpFillPolygon.h
delete mode 100644 xorg/server/module/rdpFillSpans.c
delete mode 100644 xorg/server/module/rdpFillSpans.h
delete mode 100644 xorg/server/module/rdpGC.c
delete mode 100644 xorg/server/module/rdpGC.h
delete mode 100644 xorg/server/module/rdpGlyphs.c
delete mode 100644 xorg/server/module/rdpGlyphs.h
delete mode 100644 xorg/server/module/rdpImageGlyphBlt.c
delete mode 100644 xorg/server/module/rdpImageGlyphBlt.h
delete mode 100644 xorg/server/module/rdpImageText16.c
delete mode 100644 xorg/server/module/rdpImageText16.h
delete mode 100644 xorg/server/module/rdpImageText8.c
delete mode 100644 xorg/server/module/rdpImageText8.h
delete mode 100644 xorg/server/module/rdpInput.c
delete mode 100644 xorg/server/module/rdpInput.h
delete mode 100644 xorg/server/module/rdpMain.c
delete mode 100644 xorg/server/module/rdpMain.h
delete mode 100644 xorg/server/module/rdpMisc.c
delete mode 100644 xorg/server/module/rdpMisc.h
delete mode 100644 xorg/server/module/rdpPixmap.c
delete mode 100644 xorg/server/module/rdpPixmap.h
delete mode 100644 xorg/server/module/rdpPolyArc.c
delete mode 100644 xorg/server/module/rdpPolyArc.h
delete mode 100644 xorg/server/module/rdpPolyFillArc.c
delete mode 100644 xorg/server/module/rdpPolyFillArc.h
delete mode 100644 xorg/server/module/rdpPolyFillRect.c
delete mode 100644 xorg/server/module/rdpPolyFillRect.h
delete mode 100644 xorg/server/module/rdpPolyGlyphBlt.c
delete mode 100644 xorg/server/module/rdpPolyGlyphBlt.h
delete mode 100644 xorg/server/module/rdpPolyPoint.c
delete mode 100644 xorg/server/module/rdpPolyPoint.h
delete mode 100644 xorg/server/module/rdpPolyRectangle.c
delete mode 100644 xorg/server/module/rdpPolyRectangle.h
delete mode 100644 xorg/server/module/rdpPolySegment.c
delete mode 100644 xorg/server/module/rdpPolySegment.h
delete mode 100644 xorg/server/module/rdpPolyText16.c
delete mode 100644 xorg/server/module/rdpPolyText16.h
delete mode 100644 xorg/server/module/rdpPolyText8.c
delete mode 100644 xorg/server/module/rdpPolyText8.h
delete mode 100644 xorg/server/module/rdpPolylines.c
delete mode 100644 xorg/server/module/rdpPolylines.h
delete mode 100644 xorg/server/module/rdpPri.c
delete mode 100644 xorg/server/module/rdpPri.h
delete mode 100644 xorg/server/module/rdpPushPixels.c
delete mode 100644 xorg/server/module/rdpPushPixels.h
delete mode 100644 xorg/server/module/rdpPutImage.c
delete mode 100644 xorg/server/module/rdpPutImage.h
delete mode 100644 xorg/server/module/rdpRandR.c
delete mode 100644 xorg/server/module/rdpRandR.h
delete mode 100644 xorg/server/module/rdpReg.c
delete mode 100644 xorg/server/module/rdpReg.h
delete mode 100644 xorg/server/module/rdpSetSpans.c
delete mode 100644 xorg/server/module/rdpSetSpans.h
delete mode 100644 xorg/server/module/rdpSimd.c
delete mode 100644 xorg/server/module/rdpSimd.h
delete mode 100644 xorg/server/module/rdpTrapezoids.c
delete mode 100644 xorg/server/module/rdpTrapezoids.h
delete mode 100644 xorg/server/module/rdpXv.c
delete mode 100644 xorg/server/module/rdpXv.h
delete mode 100644 xorg/server/module/x86/a8r8g8b8_to_a8b8g8r8_box_x86_sse2.asm
delete mode 100644 xorg/server/module/x86/cpuid_x86.asm
delete mode 100644 xorg/server/module/x86/funcs_x86.h
delete mode 100644 xorg/server/module/x86/i420_to_rgb32_x86_sse2.asm
delete mode 100644 xorg/server/module/x86/uyvy_to_rgb32_x86_sse2.asm
delete mode 100644 xorg/server/module/x86/yuy2_to_rgb32_x86_sse2.asm
delete mode 100644 xorg/server/module/x86/yv12_to_rgb32_x86_sse2.asm
delete mode 100644 xorg/server/readme.txt
delete mode 100755 xorg/server/test-in-home.sh
delete mode 100644 xorg/server/xrdpdev/Makefile.am
delete mode 100644 xorg/server/xrdpdev/xorg.conf
delete mode 100644 xorg/server/xrdpdev/xrdpdev.c
delete mode 100644 xorg/server/xrdpkeyb/Makefile.am
delete mode 100644 xorg/server/xrdpkeyb/rdpKeyboard.c
delete mode 100644 xorg/server/xrdpmouse/Makefile.am
delete mode 100644 xorg/server/xrdpmouse/rdpMouse.c
diff --git a/xorg/server/Makefile.am b/xorg/server/Makefile.am
deleted file mode 100644
index bee2ef75..00000000
--- a/xorg/server/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-EXTRA_DIST = bootstrap readme.txt
-
-SUBDIRS = \
- module \
- xrdpdev \
- xrdpkeyb \
- xrdpmouse
diff --git a/xorg/server/bootstrap b/xorg/server/bootstrap
deleted file mode 100755
index ec344d3d..00000000
--- a/xorg/server/bootstrap
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-which autoconf
-if ! test $? -eq 0
-then
- echo "error, install autoconf"
- exit 1
-fi
-
-which automake
-if ! test $? -eq 0
-then
- echo "error, install automake"
- exit 1
-fi
-
-which libtool
-if ! test $? -eq 0
-then
- echo "error, install libtool"
- exit 1
-fi
-
-which pkg-config
-if ! test $? -eq 0
-then
- echo "error, install pkg-config"
- exit 1
-fi
-
-touch configure.ac
-touch NEWS
-touch AUTHORS
-touch README
-touch ChangeLog
-autoreconf -fvi
diff --git a/xorg/server/configure.ac b/xorg/server/configure.ac
deleted file mode 100644
index cb78dccf..00000000
--- a/xorg/server/configure.ac
+++ /dev/null
@@ -1,35 +0,0 @@
-# Process this file with autoconf to produce a configure script
-
-AC_PREREQ(2.59)
-AC_INIT([xrdpmod], [0.1.0], [xrdp-devel@lists.sourceforge.net])
-AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in)
-AM_INIT_AUTOMAKE([1.6 foreign])
-AC_PROG_CC
-AC_C_CONST
-AC_PROG_LIBTOOL
-
-AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"])
-
-AC_CHECK_HEADER([xorg/xorg-server.h], [],
- [AC_MSG_ERROR([please install xserver-xorg-dev or xorg-x11-server-sdk])])
-
-PKG_CHECK_MODULES([XORG_SERVER], [xorg-server >= 0])
-AC_SUBST([XORG_SERVER_CFLAGS])
-AC_SUBST([XORG_SERVER_LIBS])
-
-moduledir=`pkg-config xorg-server --variable=moduledir`
-AC_SUBST([moduledir])
-
-if test "x${prefix}" = "xNONE" ; then
-sysconfdir="/etc";
-fi
-
-AC_CONFIG_FILES([Makefile
- module/Makefile
- xrdpdev/Makefile
- xrdpkeyb/Makefile
- xrdpmouse/Makefile
-])
-
-AC_OUTPUT
-
diff --git a/xorg/server/module/Makefile.am b/xorg/server/module/Makefile.am
deleted file mode 100644
index 07b24edc..00000000
--- a/xorg/server/module/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-EXTRA_DIST =
-
-AM_CFLAGS = \
- $(XORG_SERVER_CFLAGS) \
- -I../../../common
-
-libxorgxrdp_la_LTLIBRARIES = libxorgxrdp.la
-
-libxorgxrdp_la_LDFLAGS = -module -avoid-version
-
-libxorgxrdp_ladir = $(moduledir)
-
-libxorgxrdp_la_SOURCES = rdpDraw.c rdpPri.c rdpGC.c rdpFillSpans.c \
-rdpSetSpans.c rdpPutImage.c rdpCopyArea.c rdpCopyPlane.c rdpPolyPoint.c \
-rdpPolylines.c rdpPolySegment.c rdpPolyRectangle.c rdpPolyArc.c \
-rdpFillPolygon.c rdpPolyFillRect.c rdpPolyFillArc.c rdpPolyText8.c \
-rdpPolyText16.c rdpImageText8.c rdpImageText16.c rdpImageGlyphBlt.c \
-rdpPolyGlyphBlt.c rdpPushPixels.c rdpCursor.c rdpMain.c rdpRandR.c \
-rdpMisc.c rdpReg.c rdpComposite.c rdpGlyphs.c rdpPixmap.c rdpInput.c \
-rdpClientCon.c rdpCapture.c rdpTrapezoids.c rdpXv.c rdpSimd.c
-
-libxorgxrdp_la_LIBADD =
diff --git a/xorg/server/module/amd64/cpuid_amd64.asm b/xorg/server/module/amd64/cpuid_amd64.asm
deleted file mode 100644
index b97937ad..00000000
--- a/xorg/server/module/amd64/cpuid_amd64.asm
+++ /dev/null
@@ -1,41 +0,0 @@
-
-SECTION .text
-
-%macro PROC 1
- align 16
- global %1
- %1:
-%endmacro
-
-;The first six integer or pointer arguments are passed in registers
-;RDI, RSI, RDX, RCX, R8, and R9
-
-;int
-;cpuid_amd64(int eax_in, int ecx_in, int *eax, int *ebx, int *ecx, int *edx)
-
-PROC cpuid_amd64
- ; save registers
- push rbx
-
- push rdx
- push rcx
- push r8
- push r9
-
- mov rax, rdi
- mov rcx, rsi
- cpuid
- pop rdi
- mov [rdi], edx
- pop rdi
- mov [rdi], ecx
- pop rdi
- mov [rdi], ebx
- pop rdi
- mov [rdi], eax
- mov eax, 0
- ; restore registers
- pop rbx
- ret;
- align 16
-
diff --git a/xorg/server/module/amd64/funcs_amd64.h b/xorg/server/module/amd64/funcs_amd64.h
deleted file mode 100644
index 10cffe0d..00000000
--- a/xorg/server/module/amd64/funcs_amd64.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright 2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-amd64 asm functions
-
-*/
-
-#ifndef __FUNCS_AMD64_H
-#define __FUNCS_AMD64_H
-
-int
-cpuid_amd64(int eax_in, int ecx_in, int *eax, int *ebx, int *ecx, int *edx);
-int
-yv12_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs);
-int
-i420_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs);
-int
-yuy2_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs);
-int
-uyvy_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs);
-
-#endif
-
diff --git a/xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm
deleted file mode 100644
index d9760caa..00000000
--- a/xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm
+++ /dev/null
@@ -1,248 +0,0 @@
-;
-;Copyright 2014 Jay Sorg
-;
-;Permission to use, copy, modify, distribute, and sell this software and its
-;documentation for any purpose is hereby granted without fee, provided that
-;the above copyright notice appear in all copies and that both that
-;copyright notice and this permission notice appear in supporting
-;documentation.
-;
-;The above copyright notice and this permission notice shall be included in
-;all copies or substantial portions of the Software.
-;
-;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-;OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-;AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-;CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;
-;I420 to RGB32
-;amd64 SSE2 32 bit
-;
-; RGB to YUV
-; 0.299 0.587 0.114
-; -0.14713 -0.28886 0.436
-; 0.615 -0.51499 -0.10001
-; YUV to RGB
-; 1 0 1.13983
-; 1 -0.39465 -0.58060
-; 1 2.03211 0
-; shift left 12
-; 4096 0 4669
-; 4096 -1616 -2378
-; 4096 9324 0
-
-SECTION .data
-align 16
-c128 times 8 dw 128
-c4669 times 8 dw 4669
-c1616 times 8 dw 1616
-c2378 times 8 dw 2378
-c9324 times 8 dw 9324
-
-SECTION .text
-
-%macro PROC 1
- align 16
- global %1
- %1:
-%endmacro
-
-do8_uv:
-
- ; v
- movd xmm1, [rbx] ; 4 at a time
- lea rbx, [rbx + 4]
- punpcklbw xmm1, xmm1
- pxor xmm6, xmm6
- punpcklbw xmm1, xmm6
- movdqa xmm7, [rel c128]
- psubw xmm1, xmm7
- psllw xmm1, 4
-
- ; v
- movd xmm2, [rdx] ; 4 at a time
- lea rdx, [rdx + 4]
- punpcklbw xmm2, xmm2
- punpcklbw xmm2, xmm6
- psubw xmm2, xmm7
- psllw xmm2, 4
-
-do8:
-
- ; y
- movq xmm0, [rsi] ; 8 at a time
- lea rsi, [rsi + 8]
- pxor xmm6, xmm6
- punpcklbw xmm0, xmm6
-
- ; r = y + hiword(4669 * (v << 4))
- movdqa xmm4, [rel c4669]
- pmulhw xmm4, xmm1
- movdqa xmm3, xmm0
- paddw xmm3, xmm4
-
- ; g = y - hiword(1616 * (u << 4)) - hiword(2378 * (v << 4))
- movdqa xmm5, [rel c1616]
- pmulhw xmm5, xmm2
- movdqa xmm6, [rel c2378]
- pmulhw xmm6, xmm1
- movdqa xmm4, xmm0
- psubw xmm4, xmm5
- psubw xmm4, xmm6
-
- ; b = y + hiword(9324 * (u << 4))
- movdqa xmm6, [rel c9324]
- pmulhw xmm6, xmm2
- movdqa xmm5, xmm0
- paddw xmm5, xmm6
-
- packuswb xmm3, xmm3 ; b
- packuswb xmm4, xmm4 ; g
- punpcklbw xmm3, xmm4 ; gb
-
- pxor xmm4, xmm4 ; a
- packuswb xmm5, xmm5 ; r
- punpcklbw xmm5, xmm4 ; ar
-
- movdqa xmm4, xmm3
- punpcklwd xmm3, xmm5 ; argb
- movdqa [rdi], xmm3
- lea rdi, [rdi + 16]
- punpckhwd xmm4, xmm5 ; argb
- movdqa [rdi], xmm4
- lea rdi, [rdi + 16]
-
- ret;
-
-;The first six integer or pointer arguments are passed in registers
-; RDI, RSI, RDX, RCX, R8, and R9
-
-;int
-;i420_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs)
-
-PROC i420_to_rgb32_amd64_sse2
- push rbx
- push rsi
- push rdi
- push rbp
-
- push rdi
- push rdx
- mov rdi, rcx ; rgbs
-
- mov rcx, rsi ; width
- mov rdx, rcx
- pop rbp ; height
- mov rax, rbp
- shr rbp, 1
- imul rax, rcx ; rax = width * height
-
- pop rsi ; y
-
- mov rbx, rsi ; u = y + width * height
- add rbx, rax
-
- ; local vars
- ; char* yptr1
- ; char* yptr2
- ; char* uptr
- ; char* vptr
- ; int* rgbs1
- ; int* rgbs2
- ; int width
- sub rsp, 56 ; local vars, 56 bytes
- mov [rsp + 0], rsi ; save y1
- add rsi, rdx
- mov [rsp + 8], rsi ; save y2
- mov [rsp + 16], rbx ; save u
- shr rax, 2
- add rbx, rax ; v = u + (width * height / 4)
- mov [rsp + 24], rbx ; save v
-
- mov [rsp + 32], rdi ; save rgbs1
- mov rax, rdx
- shl rax, 2
- add rdi, rax
- mov [rsp + 40], rdi ; save rgbs2
-
-loop_y:
-
- mov rcx, rdx ; width
- shr rcx, 3
-
- ; save rdx
- mov [rsp + 48], rdx
-
- ;prefetchnta 4096[rsp + 0] ; y
- ;prefetchnta 1024[rsp + 16] ; u
- ;prefetchnta 1024[rsp + 24] ; v
-
-loop_x:
-
- mov rsi, [rsp + 0] ; y1
- mov rbx, [rsp + 16] ; u
- mov rdx, [rsp + 24] ; v
- mov rdi, [rsp + 32] ; rgbs1
-
- ; y1
- call do8_uv
-
- mov [rsp + 0], rsi ; y1
- mov [rsp + 32], rdi ; rgbs1
-
- mov rsi, [rsp + 8] ; y2
- mov rdi, [rsp + 40] ; rgbs2
-
- ; y2
- call do8
-
- mov [rsp + 8], rsi ; y2
- mov [rsp + 16], rbx ; u
- mov [rsp + 24], rdx ; v
- mov [rsp + 40], rdi ; rgbs2
-
- dec rcx ; width
- jnz loop_x
-
- ; restore rdx
- mov rdx, [rsp + 48]
-
- ; update y1 and 2
- mov rax, [rsp + 0]
- mov rbx, rdx
- add rax, rbx
- mov [rsp + 0], rax
-
- mov rax, [rsp + 8]
- add rax, rbx
- mov [rsp + 8], rax
-
- ; update rgb1 and 2
- mov rax, [rsp + 32]
- mov rbx, rdx
- shl rbx, 2
- add rax, rbx
- mov [rsp + 32], rax
-
- mov rax, [rsp + 40]
- add rax, rbx
- mov [rsp + 40], rax
-
- mov rcx, rbp
- dec rcx ; height
- mov rbp, rcx
- jnz loop_y
-
- add rsp, 56
-
- mov rax, 0
- pop rbp
- pop rdi
- pop rsi
- pop rbx
- ret
- align 16
-
-
diff --git a/xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm
deleted file mode 100644
index 8866fd0f..00000000
--- a/xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-
-%macro PROC 1
- align 16
- global %1
- %1:
-%endmacro
-
-;int
-;uyvy_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs)
-
-PROC uyvy_to_rgb32_amd64_sse2
- push rbx
- mov rax, 0
- pop rbx
- ret
- align 16
-
diff --git a/xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm
deleted file mode 100644
index c0ac5c1b..00000000
--- a/xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-
-%macro PROC 1
- align 16
- global %1
- %1:
-%endmacro
-
-;int
-;yuy2_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs)
-
-PROC yuy2_to_rgb32_amd64_sse2
- push rbx
- mov rax, 0
- pop rbx
- ret
- align 16
-
diff --git a/xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm
deleted file mode 100644
index 13e46878..00000000
--- a/xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm
+++ /dev/null
@@ -1,248 +0,0 @@
-;
-;Copyright 2014 Jay Sorg
-;
-;Permission to use, copy, modify, distribute, and sell this software and its
-;documentation for any purpose is hereby granted without fee, provided that
-;the above copyright notice appear in all copies and that both that
-;copyright notice and this permission notice appear in supporting
-;documentation.
-;
-;The above copyright notice and this permission notice shall be included in
-;all copies or substantial portions of the Software.
-;
-;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-;OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-;AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-;CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;
-;YV12 to RGB32
-;amd64 SSE2 32 bit
-;
-; RGB to YUV
-; 0.299 0.587 0.114
-; -0.14713 -0.28886 0.436
-; 0.615 -0.51499 -0.10001
-; YUV to RGB
-; 1 0 1.13983
-; 1 -0.39465 -0.58060
-; 1 2.03211 0
-; shift left 12
-; 4096 0 4669
-; 4096 -1616 -2378
-; 4096 9324 0
-
-SECTION .data
-align 16
-c128 times 8 dw 128
-c4669 times 8 dw 4669
-c1616 times 8 dw 1616
-c2378 times 8 dw 2378
-c9324 times 8 dw 9324
-
-SECTION .text
-
-%macro PROC 1
- align 16
- global %1
- %1:
-%endmacro
-
-do8_uv:
-
- ; u
- movd xmm1, [rbx] ; 4 at a time
- lea rbx, [rbx + 4]
- punpcklbw xmm1, xmm1
- pxor xmm6, xmm6
- punpcklbw xmm1, xmm6
- movdqa xmm7, [rel c128]
- psubw xmm1, xmm7
- psllw xmm1, 4
-
- ; v
- movd xmm2, [rdx] ; 4 at a time
- lea rdx, [rdx + 4]
- punpcklbw xmm2, xmm2
- punpcklbw xmm2, xmm6
- psubw xmm2, xmm7
- psllw xmm2, 4
-
-do8:
-
- ; y
- movq xmm0, [rsi] ; 8 at a time
- lea rsi, [rsi + 8]
- pxor xmm6, xmm6
- punpcklbw xmm0, xmm6
-
- ; r = y + hiword(4669 * (v << 4))
- movdqa xmm4, [rel c4669]
- pmulhw xmm4, xmm2
- movdqa xmm3, xmm0
- paddw xmm3, xmm4
-
- ; g = y - hiword(1616 * (u << 4)) - hiword(2378 * (v << 4))
- movdqa xmm5, [rel c1616]
- pmulhw xmm5, xmm1
- movdqa xmm6, [rel c2378]
- pmulhw xmm6, xmm2
- movdqa xmm4, xmm0
- psubw xmm4, xmm5
- psubw xmm4, xmm6
-
- ; b = y + hiword(9324 * (u << 4))
- movdqa xmm6, [rel c9324]
- pmulhw xmm6, xmm1
- movdqa xmm5, xmm0
- paddw xmm5, xmm6
-
- packuswb xmm3, xmm3 ; b
- packuswb xmm4, xmm4 ; g
- punpcklbw xmm3, xmm4 ; gb
-
- pxor xmm4, xmm4 ; a
- packuswb xmm5, xmm5 ; r
- punpcklbw xmm5, xmm4 ; ar
-
- movdqa xmm4, xmm3
- punpcklwd xmm3, xmm5 ; argb
- movdqa [rdi], xmm3
- lea rdi, [rdi + 16]
- punpckhwd xmm4, xmm5 ; argb
- movdqa [rdi], xmm4
- lea rdi, [rdi + 16]
-
- ret;
-
-;The first six integer or pointer arguments are passed in registers
-; RDI, RSI, RDX, RCX, R8, and R9
-
-;int
-;yv12_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs)
-
-PROC yv12_to_rgb32_amd64_sse2
- push rbx
- push rsi
- push rdi
- push rbp
-
- push rdi
- push rdx
- mov rdi, rcx ; rgbs
-
- mov rcx, rsi ; width
- mov rdx, rcx
- pop rbp ; height
- mov rax, rbp
- shr rbp, 1
- imul rax, rcx ; rax = width * height
-
- pop rsi ; y
-
- mov rbx, rsi ; u = y + width * height
- add rbx, rax
-
- ; local vars
- ; char* yptr1
- ; char* yptr2
- ; char* uptr
- ; char* vptr
- ; int* rgbs1
- ; int* rgbs2
- ; int width
- sub rsp, 56 ; local vars, 56 bytes
- mov [rsp + 0], rsi ; save y1
- add rsi, rdx
- mov [rsp + 8], rsi ; save y2
- mov [rsp + 16], rbx ; save u
- shr rax, 2
- add rbx, rax ; v = u + (width * height / 4)
- mov [rsp + 24], rbx ; save v
-
- mov [rsp + 32], rdi ; save rgbs1
- mov rax, rdx
- shl rax, 2
- add rdi, rax
- mov [rsp + 40], rdi ; save rgbs2
-
-loop_y:
-
- mov rcx, rdx ; width
- shr rcx, 3
-
- ; save rdx
- mov [rsp + 48], rdx
-
- ;prefetchnta 4096[rsp + 0] ; y
- ;prefetchnta 1024[rsp + 16] ; u
- ;prefetchnta 1024[rsp + 24] ; v
-
-loop_x:
-
- mov rsi, [rsp + 0] ; y1
- mov rbx, [rsp + 16] ; u
- mov rdx, [rsp + 24] ; v
- mov rdi, [rsp + 32] ; rgbs1
-
- ; y1
- call do8_uv
-
- mov [rsp + 0], rsi ; y1
- mov [rsp + 32], rdi ; rgbs1
-
- mov rsi, [rsp + 8] ; y2
- mov rdi, [rsp + 40] ; rgbs2
-
- ; y2
- call do8
-
- mov [rsp + 8], rsi ; y2
- mov [rsp + 16], rbx ; u
- mov [rsp + 24], rdx ; v
- mov [rsp + 40], rdi ; rgbs2
-
- dec rcx ; width
- jnz loop_x
-
- ; restore rdx
- mov rdx, [rsp + 48]
-
- ; update y1 and 2
- mov rax, [rsp + 0]
- mov rbx, rdx
- add rax, rbx
- mov [rsp + 0], rax
-
- mov rax, [rsp + 8]
- add rax, rbx
- mov [rsp + 8], rax
-
- ; update rgb1 and 2
- mov rax, [rsp + 32]
- mov rbx, rdx
- shl rbx, 2
- add rax, rbx
- mov [rsp + 32], rax
-
- mov rax, [rsp + 40]
- add rax, rbx
- mov [rsp + 40], rax
-
- mov rcx, rbp
- dec rcx ; height
- mov rbp, rcx
- jnz loop_y
-
- add rsp, 56
-
- mov rax, 0
- pop rbp
- pop rdi
- pop rsi
- pop rbx
- ret
- align 16
-
-
diff --git a/xorg/server/module/rdp.h b/xorg/server/module/rdp.h
deleted file mode 100644
index 711750a2..00000000
--- a/xorg/server/module/rdp.h
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef _RDP_H
-#define _RDP_H
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include "rdpPri.h"
-
-#define XRDP_MODULE_NAME "XRDPMOD"
-#define XRDP_DRIVER_NAME "XRDPDEV"
-#define XRDP_MOUSE_NAME "XRDPMOUSE"
-#define XRDP_KEYB_NAME "XRDPKEYB"
-#define XRDP_VERSION 1000
-
-#define PACKAGE_VERSION_MAJOR 1
-#define PACKAGE_VERSION_MINOR 0
-#define PACKAGE_VERSION_PATCHLEVEL 0
-
-#define COLOR8(r, g, b) \
- ((((r) >> 5) << 0) | (((g) >> 5) << 3) | (((b) >> 6) << 6))
-#define COLOR15(r, g, b) \
- ((((r) >> 3) << 10) | (((g) >> 3) << 5) | (((b) >> 3) << 0))
-#define COLOR16(r, g, b) \
- ((((r) >> 3) << 11) | (((g) >> 2) << 5) | (((b) >> 3) << 0))
-#define COLOR24(r, g, b) \
- ((((r) >> 0) << 0) | (((g) >> 0) << 8) | (((b) >> 0) << 16))
-#define SPLITCOLOR32(r, g, b, c) \
- do { \
- r = ((c) >> 16) & 0xff; \
- g = ((c) >> 8) & 0xff; \
- b = (c) & 0xff; \
- } while (0)
-
-/* PIXMAN_a8b8g8r8 */
-#define XRDP_a8b8g8r8 \
-((32 << 24) | (3 << 16) | (8 << 12) | (8 << 8) | (8 << 4) | 8)
-/* PIXMAN_a8r8g8b8 */
-#define XRDP_a8r8g8b8 \
-((32 << 24) | (2 << 16) | (8 << 12) | (8 << 8) | (8 << 4) | 8)
-/* PIXMAN_r5g6b5 */
-#define XRDP_r5g6b5 \
-((16 << 24) | (2 << 16) | (0 << 12) | (5 << 8) | (6 << 4) | 5)
-/* PIXMAN_a1r5g5b5 */
-#define XRDP_a1r5g5b5 \
-((16 << 24) | (2 << 16) | (1 << 12) | (5 << 8) | (5 << 4) | 5)
-/* PIXMAN_r3g3b2 */
-#define XRDP_r3g3b2 \
-((8 << 24) | (2 << 16) | (0 << 12) | (3 << 8) | (3 << 4) | 2)
-
-#define PixelDPI 100
-#define PixelToMM(_size) (((_size) * 254 + (PixelDPI) * 5) / ((PixelDPI) * 10))
-
-#define RDPMIN(_val1, _val2) ((_val1) < (_val2) ? (_val1) : (_val2))
-#define RDPMAX(_val1, _val2) ((_val1) < (_val2) ? (_val2) : (_val1))
-#define RDPCLAMP(_val, _lo, _hi) \
- (_val) < (_lo) ? (_lo) : (_val) > (_hi) ? (_hi) : (_val)
-#define RDPALIGN(_val, _al) ((((long)(_val)) + ((_al) - 1)) & ~((_al) - 1))
-
-#define XRDP_CD_NODRAW 0
-#define XRDP_CD_NOCLIP 1
-#define XRDP_CD_CLIP 2
-
-#if 0
-#define RegionCopy DONOTUSE
-#define RegionTranslate DONOTUSE
-#define RegionNotEmpty DONOTUSE
-#define RegionIntersect DONOTUSE
-#define RegionContainsRect DONOTUSE
-#define RegionInit DONOTUSE
-#define RegionUninit DONOTUSE
-#define RegionFromRects DONOTUSE
-#define RegionDestroy DONOTUSE
-#define RegionCreate DONOTUSE
-#define RegionUnion DONOTUSE
-#define RegionSubtract DONOTUSE
-#define RegionInverse DONOTUSE
-#define RegionExtents DONOTUSE
-#define RegionReset DONOTUSE
-#define RegionBreak DONOTUSE
-#define RegionUnionRect DONOTUSE
-#endif
-
-struct image_data
-{
- int width;
- int height;
- int bpp;
- int Bpp;
- int lineBytes;
- char *pixels;
- char *shmem_pixels;
- int shmem_id;
- int shmem_offset;
- int shmem_lineBytes;
-};
-
-/* defined in rdpClientCon.h */
-typedef struct _rdpClientCon rdpClientCon;
-
-struct _rdpPointer
-{
- int cursor_x;
- int cursor_y;
- int old_button_mask;
- int button_mask;
- DeviceIntPtr device;
-};
-typedef struct _rdpPointer rdpPointer;
-
-struct _rdpKeyboard
-{
- int pause_spe;
- int ctrl_down;
- int alt_down;
- int shift_down;
- int tab_down;
- /* this is toggled every time num lock key is released, not like the
- above *_down vars */
- int scroll_lock_down;
- DeviceIntPtr device;
-};
-typedef struct _rdpKeyboard rdpKeyboard;
-
-
-struct _rdpPixmapRec
-{
- int status;
- int rdpindex;
- int con_number;
- int is_dirty;
- int is_scratch;
- int is_alpha_dirty_not;
- /* number of times used in a remote operation
- if this gets above XRDP_USE_COUNT_THRESHOLD
- then we force remote the pixmap */
- int use_count;
- int kind_width;
- struct rdp_draw_item *draw_item_head;
- struct rdp_draw_item *draw_item_tail;
-};
-typedef struct _rdpPixmapRec rdpPixmapRec;
-typedef struct _rdpPixmapRec * rdpPixmapPtr;
-#define GETPIXPRIV(_dev, _pPixmap) (rdpPixmapPtr) \
-rdpGetPixmapPrivate(&((_pPixmap)->devPrivates), (_dev)->privateKeyRecPixmap)
-
-struct _rdpCounts
-{
- CARD32 rdpFillSpansCallCount; /* 1 */
- CARD32 rdpSetSpansCallCount;
- CARD32 rdpPutImageCallCount;
- CARD32 rdpCopyAreaCallCount;
- CARD32 rdpCopyPlaneCallCount;
- CARD32 rdpPolyPointCallCount;
- CARD32 rdpPolylinesCallCount;
- CARD32 rdpPolySegmentCallCount;
- CARD32 rdpPolyRectangleCallCount;
- CARD32 rdpPolyArcCallCount; /* 10 */
- CARD32 rdpFillPolygonCallCount;
- CARD32 rdpPolyFillRectCallCount;
- CARD32 rdpPolyFillArcCallCount;
- CARD32 rdpPolyText8CallCount;
- CARD32 rdpPolyText16CallCount;
- CARD32 rdpImageText8CallCount;
- CARD32 rdpImageText16CallCount;
- CARD32 rdpImageGlyphBltCallCount;
- CARD32 rdpPolyGlyphBltCallCount;
- CARD32 rdpPushPixelsCallCount; /* 20 */
- CARD32 rdpCompositeCallCount;
- CARD32 rdpCopyWindowCallCount; /* 22 */
- CARD32 rdpTrapezoidsCallCount;
- CARD32 callCount[64 - 23];
-};
-
-typedef int (*yuv_to_rgb32_proc)(unsigned char *yuvs, int width, int height, int *rgbs);
-
-typedef int (*copy_box_proc)(char *s8, int src_stride,
- char *d8, int dst_stride,
- int width, int height);
-
-/* move this to common header */
-struct _rdpRec
-{
- int width;
- int height;
- int depth;
- int paddedWidthInBytes;
- int sizeInBytes;
- int num_modes;
- int bitsPerPixel;
- int Bpp;
- int Bpp_mask;
- char *pfbMemory_alloc;
- char *pfbMemory;
- ScreenPtr pScreen;
- rdpDevPrivateKey privateKeyRecGC;
- rdpDevPrivateKey privateKeyRecPixmap;
-
- CopyWindowProcPtr CopyWindow;
- CreateGCProcPtr CreateGC;
- CreatePixmapProcPtr CreatePixmap;
- DestroyPixmapProcPtr DestroyPixmap;
- ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
- CloseScreenProcPtr CloseScreen;
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
- TrapezoidsProcPtr Trapezoids;
-
- /* keyboard and mouse */
- miPointerScreenFuncPtr pCursorFuncs;
- /* mouse */
- rdpPointer pointer;
- /* keyboard */
- rdpKeyboard keyboard;
-
- /* RandR */
- RRSetConfigProcPtr rrSetConfig;
- RRGetInfoProcPtr rrGetInfo;
- RRScreenSetSizeProcPtr rrScreenSetSize;
- RRCrtcSetProcPtr rrCrtcSet;
- RRCrtcSetGammaProcPtr rrCrtcSetGamma;
- RRCrtcGetGammaProcPtr rrCrtcGetGamma;
- RROutputSetPropertyProcPtr rrOutputSetProperty;
- RROutputValidateModeProcPtr rrOutputValidateMode;
- RRModeDestroyProcPtr rrModeDestroy;
- RROutputGetPropertyProcPtr rrOutputGetProperty;
- RRGetPanningProcPtr rrGetPanning;
- RRSetPanningProcPtr rrSetPanning;
-
- int listen_sck;
- char uds_data[256];
- rdpClientCon *clientConHead;
- rdpClientCon *clientConTail;
-
- rdpPixmapRec screenPriv;
- int sendUpdateScheduled; /* boolean */
- OsTimerPtr sendUpdateTimer;
-
- int do_dirty_os; /* boolean */
- int do_dirty_ons; /* boolean */
- int disconnect_scheduled; /* boolean */
- int do_kill_disconnected; /* boolean */
-
- OsTimerPtr disconnectTimer;
- int disconnectScheduled; /* boolean */
- int disconnect_timeout_s;
- int disconnect_time_ms;
-
- int conNumber;
-
- struct _rdpCounts counts;
-
- yuv_to_rgb32_proc i420_to_rgb32;
- yuv_to_rgb32_proc yv12_to_rgb32;
- yuv_to_rgb32_proc yuy2_to_rgb32;
- yuv_to_rgb32_proc uyvy_to_rgb32;
- char *xv_data;
- int xv_data_bytes;
- int xv_timer_schedualed;
- OsTimerPtr xv_timer;
-
- copy_box_proc a8r8g8b8_to_a8b8g8r8_box;
-
-};
-typedef struct _rdpRec rdpRec;
-typedef struct _rdpRec * rdpPtr;
-#define XRDPPTR(_p) ((rdpPtr)((_p)->driverPrivate))
-
-struct _rdpGCRec
-{
- GCFuncs *funcs;
- GCOps *ops;
-};
-typedef struct _rdpGCRec rdpGCRec;
-typedef struct _rdpGCRec * rdpGCPtr;
-
-#define RDI_FILL 1
-#define RDI_IMGLL 2 /* lossless */
-#define RDI_IMGLY 3 /* lossy */
-#define RDI_LINE 4
-#define RDI_SCRBLT 5
-#define RDI_TEXT 6
-
-struct urdp_draw_item_fill
-{
- int opcode;
- int fg_color;
- int bg_color;
- int pad0;
-};
-
-struct urdp_draw_item_img
-{
- int opcode;
- int pad0;
-};
-
-struct urdp_draw_item_line
-{
- int opcode;
- int fg_color;
- int bg_color;
- int width;
- xSegment* segs;
- int nseg;
- int flags;
-};
-
-struct urdp_draw_item_scrblt
-{
- int srcx;
- int srcy;
- int dstx;
- int dsty;
- int cx;
- int cy;
-};
-
-struct urdp_draw_item_text
-{
- int opcode;
- int fg_color;
- struct rdp_text* rtext; /* in rdpglyph.h */
-};
-
-union urdp_draw_item
-{
- struct urdp_draw_item_fill fill;
- struct urdp_draw_item_img img;
- struct urdp_draw_item_line line;
- struct urdp_draw_item_scrblt scrblt;
- struct urdp_draw_item_text text;
-};
-
-struct rdp_draw_item
-{
- int type; /* RDI_FILL, RDI_IMGLL, ... */
- int flags;
- struct rdp_draw_item* prev;
- struct rdp_draw_item* next;
- RegionPtr reg;
- union urdp_draw_item u;
-};
-
-#define XRDP_USE_COUNT_THRESHOLD 1
-#endif
diff --git a/xorg/server/module/rdpCapture.c b/xorg/server/module/rdpCapture.c
deleted file mode 100644
index 72b95535..00000000
--- a/xorg/server/module/rdpCapture.c
+++ /dev/null
@@ -1,788 +0,0 @@
-/**
- * xrdp: A Remote Desktop Protocol server.
- *
- * Copyright (C) Laxmikant Rashinkar 2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Routines to copy regions from framebuffer to shared memory
- */
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpMisc.h"
-#include "rdpCapture.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-#define RDP_MAX_TILES 1024
-
-/******************************************************************************/
-static int
-rdpLimitRects(RegionPtr reg, int max_rects, BoxPtr *rects)
-{
- int nrects;
-
- nrects = REGION_NUM_RECTS(reg);
- if (nrects > max_rects)
- {
- nrects = 1;
- *rects = rdpRegionExtents(reg);
- }
- else
- {
- *rects = REGION_RECTS(reg);
- }
- return nrects;
-}
-
-/******************************************************************************/
-/* copy rects with no error checking */
-static int
-rdpCopyBox_a8r8g8b8_to_a8r8g8b8(rdpClientCon *clientCon,
- void *src, int src_stride, int srcx, int srcy,
- void *dst, int dst_stride, int dstx, int dsty,
- BoxPtr rects, int num_rects)
-{
- char *s8;
- char *d8;
- int index;
- int jndex;
- int bytes;
- int height;
- BoxPtr box;
-
- for (index = 0; index < num_rects; index++)
- {
- box = rects + index;
- s8 = ((char *) src) + (box->y1 - srcy) * src_stride;
- s8 += (box->x1 - srcx) * 4;
- d8 = ((char *) dst) + (box->y1 - dsty) * dst_stride;
- d8 += (box->x1 - dstx) * 4;
- bytes = box->x2 - box->x1;
- bytes *= 4;
- height = box->y2 - box->y1;
- for (jndex = 0; jndex < height; jndex++)
- {
- g_memcpy(d8, s8, bytes);
- d8 += dst_stride;
- s8 += src_stride;
- }
- }
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpFillBox_yuvalp(int ax, int ay,
- void *dst, int dst_stride)
-{
- dst = ((char *) dst) + (ay << 8) * (dst_stride >> 8) + (ax << 8);
- g_memset(dst, 0, 64 * 64 * 4);
- return 0;
-}
-
-/******************************************************************************/
-/* copy rects with no error checking
- * convert ARGB32 to 64x64 linear planar YUVA */
-/* http://msdn.microsoft.com/en-us/library/ff635643.aspx
- * 0.299 -0.168935 0.499813
- * 0.587 -0.331665 -0.418531
- * 0.114 0.50059 -0.081282
- y = r * 0.299000 + g * 0.587000 + b * 0.114000;
- u = r * -0.168935 + g * -0.331665 + b * 0.500590;
- v = r * 0.499813 + g * -0.418531 + b * -0.081282; */
-/* 19595 38470 7471
- -11071 -21736 32807
- 32756 -27429 -5327 */
-static int
-rdpCopyBox_a8r8g8b8_to_yuvalp(int ax, int ay,
- void *src, int src_stride,
- void *dst, int dst_stride,
- BoxPtr rects, int num_rects)
-{
- char *s8;
- char *d8;
- char *yptr;
- char *uptr;
- char *vptr;
- char *aptr;
- int *s32;
- int index;
- int jndex;
- int kndex;
- int width;
- int height;
- int pixel;
- int a;
- int r;
- int g;
- int b;
- int y;
- int u;
- int v;
- BoxPtr box;
-
- dst = ((char *) dst) + (ay << 8) * (dst_stride >> 8) + (ax << 8);
- for (index = 0; index < num_rects; index++)
- {
- box = rects + index;
- s8 = ((char *) src) + box->y1 * src_stride;
- s8 += box->x1 * 4;
- d8 = ((char *) dst) + (box->y1 - ay) * 64;
- d8 += box->x1 - ax;
- width = box->x2 - box->x1;
- height = box->y2 - box->y1;
- for (jndex = 0; jndex < height; jndex++)
- {
- s32 = (int *) s8;
- yptr = d8;
- uptr = yptr + 64 * 64;
- vptr = uptr + 64 * 64;
- aptr = vptr + 64 * 64;
- kndex = 0;
- while (kndex < width)
- {
- pixel = *(s32++);
- a = (pixel >> 24) & 0xff;
- r = (pixel >> 16) & 0xff;
- g = (pixel >> 8) & 0xff;
- b = (pixel >> 0) & 0xff;
- y = (r * 19595 + g * 38470 + b * 7471) >> 16;
- u = (r * -11071 + g * -21736 + b * 32807) >> 16;
- v = (r * 32756 + g * -27429 + b * -5327) >> 16;
- u = u + 128;
- v = v + 128;
- y = max(y, 0);
- u = max(u, 0);
- v = max(v, 0);
- y = min(y, 255);
- u = min(u, 255);
- v = min(v, 255);
- *(yptr++) = y;
- *(uptr++) = u;
- *(vptr++) = v;
- *(aptr++) = a;
- kndex++;
- }
- d8 += 64;
- s8 += src_stride;
- }
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-a8r8g8b8_to_a8b8g8r8_box(char *s8, int src_stride,
- char *d8, int dst_stride,
- int width, int height)
-{
- int index;
- int jndex;
- int red;
- int green;
- int blue;
- unsigned int *s32;
- unsigned int *d32;
-
- for (index = 0; index < height; index++)
- {
- s32 = (unsigned int *) s8;
- d32 = (unsigned int *) d8;
- for (jndex = 0; jndex < width; jndex++)
- {
- SPLITCOLOR32(red, green, blue, *s32);
- *d32 = COLOR24(red, green, blue);
- s32++;
- d32++;
- }
- d8 += dst_stride;
- s8 += src_stride;
- }
- return 0;
-}
-
-/******************************************************************************/
-/* copy rects with no error checking */
-static int
-rdpCopyBox_a8r8g8b8_to_a8b8g8r8(rdpClientCon *clientCon,
- void *src, int src_stride, int srcx, int srcy,
- void *dst, int dst_stride, int dstx, int dsty,
- BoxPtr rects, int num_rects)
-{
- char *s8;
- char *d8;
- int index;
- int bytes;
- int width;
- int height;
- BoxPtr box;
- copy_box_proc copy_box;
-
- copy_box = clientCon->dev->a8r8g8b8_to_a8b8g8r8_box;
- for (index = 0; index < num_rects; index++)
- {
- box = rects + index;
- s8 = ((char *) src) + (box->y1 - srcy) * src_stride;
- s8 += (box->x1 - srcx) * 4;
- d8 = ((char *) dst) + (box->y1 - dsty) * dst_stride;
- d8 += (box->x1 - dstx) * 4;
- bytes = box->x2 - box->x1;
- bytes *= 4;
- width = box->x2 - box->x1;
- height = box->y2 - box->y1;
- copy_box(s8, src_stride, d8, dst_stride, width, height);
- }
- return 0;
-}
-
-/******************************************************************************/
-static Bool
-rdpCapture0(rdpClientCon *clientCon,
- RegionPtr in_reg, BoxPtr *out_rects, int *num_out_rects,
- void *src, int src_width, int src_height,
- int src_stride, int src_format,
- void *dst, int dst_width, int dst_height,
- int dst_stride, int dst_format, int max_rects)
-{
- BoxPtr psrc_rects;
- BoxRec rect;
- RegionRec reg;
- char *src_rect;
- char *dst_rect;
- int num_rects;
- int src_bytespp;
- int dst_bytespp;
- int width;
- int height;
- int src_offset;
- int dst_offset;
- int i;
- int j;
- int k;
- int red;
- int green;
- int blue;
- Bool rv;
- unsigned int *s32;
- unsigned short *d16;
- unsigned char *d8;
-
- LLOGLN(10, ("rdpCapture0:"));
-
- rv = TRUE;
-
- rect.x1 = 0;
- rect.y1 = 0;
- rect.x2 = RDPMIN(dst_width, src_width);
- rect.y2 = RDPMIN(dst_height, src_height);
- rdpRegionInit(®, &rect, 0);
- rdpRegionIntersect(®, in_reg, ®);
-
- psrc_rects = 0;
- num_rects = rdpLimitRects(®, max_rects, &psrc_rects);
- if (num_rects < 1)
- {
- rdpRegionUninit(®);
- return FALSE;
- }
-
- *num_out_rects = num_rects;
-
- *out_rects = (BoxPtr) g_malloc(sizeof(BoxRec) * num_rects, 0);
- for (i = 0; i < num_rects; i++)
- {
- rect = psrc_rects[i];
- (*out_rects)[i] = rect;
- }
-
- if ((src_format == XRDP_a8r8g8b8) && (dst_format == XRDP_a8r8g8b8))
- {
- rdpCopyBox_a8r8g8b8_to_a8r8g8b8(clientCon,
- src, src_stride, 0, 0,
- dst, dst_stride, 0, 0,
- psrc_rects, num_rects);
- }
- else if ((src_format == XRDP_a8r8g8b8) && (dst_format == XRDP_a8b8g8r8))
- {
- rdpCopyBox_a8r8g8b8_to_a8b8g8r8(clientCon,
- src, src_stride, 0, 0,
- dst, dst_stride, 0, 0,
- psrc_rects, num_rects);
- }
- else if ((src_format == XRDP_a8r8g8b8) && (dst_format == XRDP_r5g6b5))
- {
- src_bytespp = 4;
- dst_bytespp = 2;
-
- for (i = 0; i < num_rects; i++)
- {
- /* get rect to copy */
- rect = (*out_rects)[i];
-
- /* get rect dimensions */
- width = rect.x2 - rect.x1;
- height = rect.y2 - rect.y1;
-
- /* point to start of each rect in respective memory */
- src_offset = rect.y1 * src_stride + rect.x1 * src_bytespp;
- dst_offset = rect.y1 * dst_stride + rect.x1 * dst_bytespp;
- src_rect = src + src_offset;
- dst_rect = dst + dst_offset;
-
- /* copy one line at a time */
- for (j = 0; j < height; j++)
- {
- s32 = (unsigned int *) src_rect;
- d16 = (unsigned short *) dst_rect;
- for (k = 0; k < width; k++)
- {
- SPLITCOLOR32(red, green, blue, *s32);
- *d16 = COLOR16(red, green, blue);
- s32++;
- d16++;
- }
- src_rect += src_stride;
- dst_rect += dst_stride;
- }
- }
- }
- else if ((src_format == XRDP_a8r8g8b8) && (dst_format == XRDP_a1r5g5b5))
- {
- src_bytespp = 4;
- dst_bytespp = 2;
-
- for (i = 0; i < num_rects; i++)
- {
- /* get rect to copy */
- rect = (*out_rects)[i];
-
- /* get rect dimensions */
- width = rect.x2 - rect.x1;
- height = rect.y2 - rect.y1;
-
- /* point to start of each rect in respective memory */
- src_offset = rect.y1 * src_stride + rect.x1 * src_bytespp;
- dst_offset = rect.y1 * dst_stride + rect.x1 * dst_bytespp;
- src_rect = src + src_offset;
- dst_rect = dst + dst_offset;
-
- /* copy one line at a time */
- for (j = 0; j < height; j++)
- {
- s32 = (unsigned int *) src_rect;
- d16 = (unsigned short *) dst_rect;
- for (k = 0; k < width; k++)
- {
- SPLITCOLOR32(red, green, blue, *s32);
- *d16 = COLOR15(red, green, blue);
- s32++;
- d16++;
- }
- src_rect += src_stride;
- dst_rect += dst_stride;
- }
- }
- }
- else if ((src_format == XRDP_a8r8g8b8) && (dst_format == XRDP_r3g3b2))
- {
- src_bytespp = 4;
- dst_bytespp = 1;
-
- for (i = 0; i < num_rects; i++)
- {
- /* get rect to copy */
- rect = (*out_rects)[i];
-
- /* get rect dimensions */
- width = rect.x2 - rect.x1;
- height = rect.y2 - rect.y1;
-
- /* point to start of each rect in respective memory */
- src_offset = rect.y1 * src_stride + rect.x1 * src_bytespp;
- dst_offset = rect.y1 * dst_stride + rect.x1 * dst_bytespp;
- src_rect = src + src_offset;
- dst_rect = dst + dst_offset;
-
- /* copy one line at a time */
- for (j = 0; j < height; j++)
- {
- s32 = (unsigned int *) src_rect;
- d8 = (unsigned char *) dst_rect;
- for (k = 0; k < width; k++)
- {
- SPLITCOLOR32(red, green, blue, *s32);
- *d8 = COLOR8(red, green, blue);
- s32++;
- d8++;
- }
- src_rect += src_stride;
- dst_rect += dst_stride;
- }
- }
- }
- else
- {
- LLOGLN(0, ("rdpCapture0: unimp color conversion"));
- }
- rdpRegionUninit(®);
- return rv;
-}
-
-/******************************************************************************/
-/* make out_rects always multiple of 16 width and height */
-static Bool
-rdpCapture1(rdpClientCon *clientCon,
- RegionPtr in_reg, BoxPtr *out_rects, int *num_out_rects,
- void *src, int src_width, int src_height,
- int src_stride, int src_format,
- void *dst, int dst_width, int dst_height,
- int dst_stride, int dst_format, int max_rects)
-{
- BoxPtr psrc_rects;
- BoxRec rect;
- RegionRec reg;
- char *src_rect;
- char *dst_rect;
- int num_regions;
- int src_bytespp;
- int dst_bytespp;
- int width;
- int height;
- int min_width;
- int min_height;
- int src_offset;
- int dst_offset;
- int index;
- int jndex;
- int kndex;
- int red;
- int green;
- int blue;
- int ex;
- int ey;
- Bool rv;
- unsigned int *s32;
- unsigned int *d32;
-
- LLOGLN(10, ("rdpCapture1:"));
-
- rv = TRUE;
-
- min_width = RDPMIN(dst_width, src_width);
- min_height = RDPMIN(dst_height, src_height);
-
- rect.x1 = 0;
- rect.y1 = 0;
- rect.x2 = min_width;
- rect.y2 = min_height;
- rdpRegionInit(®, &rect, 0);
- rdpRegionIntersect(®, in_reg, ®);
-
- num_regions = REGION_NUM_RECTS(®);
-
- if (num_regions > max_rects)
- {
- num_regions = 1;
- psrc_rects = rdpRegionExtents(®);
- }
- else
- {
- psrc_rects = REGION_RECTS(®);
- }
-
- if (num_regions < 1)
- {
- return FALSE;
- }
-
- *num_out_rects = num_regions;
-
- *out_rects = (BoxPtr) g_malloc(sizeof(BoxRec) * num_regions * 4, 0);
- index = 0;
- while (index < num_regions)
- {
- rect = psrc_rects[index];
- width = rect.x2 - rect.x1;
- height = rect.y2 - rect.y1;
- ex = ((width + 15) & ~15) - width;
- if (ex != 0)
- {
- rect.x2 += ex;
- if (rect.x2 > min_width)
- {
- rect.x1 -= rect.x2 - min_width;
- rect.x2 = min_width;
- }
- if (rect.x1 < 0)
- {
- rect.x1 += 16;
- }
- }
- ey = ((height + 15) & ~15) - height;
- if (ey != 0)
- {
- rect.y2 += ey;
- if (rect.y2 > min_height)
- {
- rect.y1 -= rect.y2 - min_height;
- rect.y2 = min_height;
- }
- if (rect.y1 < 0)
- {
- rect.y1 += 16;
- }
- }
-#if 0
- if (rect.x1 < 0)
- {
- LLOGLN(0, ("rdpCapture1: error"));
- }
- if (rect.y1 < 0)
- {
- LLOGLN(0, ("rdpCapture1: error"));
- }
- if (rect.x2 > min_width)
- {
- LLOGLN(0, ("rdpCapture1: error"));
- }
- if (rect.y2 > min_height)
- {
- LLOGLN(0, ("rdpCapture1: error"));
- }
- if ((rect.x2 - rect.x1) % 16 != 0)
- {
- LLOGLN(0, ("rdpCapture1: error"));
- }
- if ((rect.y2 - rect.y1) % 16 != 0)
- {
- LLOGLN(0, ("rdpCapture1: error"));
- }
-#endif
- (*out_rects)[index] = rect;
- index++;
- }
-
- if ((src_format == XRDP_a8r8g8b8) && (dst_format == XRDP_a8b8g8r8))
- {
- src_bytespp = 4;
- dst_bytespp = 4;
-
- for (index = 0; index < num_regions; index++)
- {
- /* get rect to copy */
- rect = (*out_rects)[index];
-
- /* get rect dimensions */
- width = rect.x2 - rect.x1;
- height = rect.y2 - rect.y1;
-
- /* point to start of each rect in respective memory */
- src_offset = rect.y1 * src_stride + rect.x1 * src_bytespp;
- dst_offset = rect.y1 * dst_stride + rect.x1 * dst_bytespp;
- src_rect = src + src_offset;
- dst_rect = dst + dst_offset;
-
- /* copy one line at a time */
- for (jndex = 0; jndex < height; jndex++)
- {
- s32 = (unsigned int *) src_rect;
- d32 = (unsigned int *) dst_rect;
- for (kndex = 0; kndex < width; kndex++)
- {
- SPLITCOLOR32(red, green, blue, *s32);
- *d32 = COLOR24(red, green, blue);
- s32++;
- d32++;
- }
- src_rect += src_stride;
- dst_rect += dst_stride;
- }
- }
- }
- else
- {
- LLOGLN(0, ("rdpCapture1: unimp color conversion"));
- }
- rdpRegionUninit(®);
- return rv;
-}
-
-/******************************************************************************/
-static Bool
-rdpCapture2(rdpClientCon *clientCon,
- RegionPtr in_reg, BoxPtr *out_rects, int *num_out_rects,
- void *src, int src_width, int src_height,
- int src_stride, int src_format,
- void *dst, int dst_width, int dst_height,
- int dst_stride, int dst_format, int max_rects)
-{
- int x;
- int y;
- int out_rect_index;
- int num_rects;
- int rcode;
- BoxRec rect;
- BoxRec extents_rect;
- BoxPtr rects;
- RegionRec tile_reg;
- RegionRec lin_reg;
- RegionRec temp_reg;
- RegionPtr pin_reg;
-
- LLOGLN(10, ("rdpCapture2:"));
-
- *out_rects = (BoxPtr) g_malloc(sizeof(BoxRec) * RDP_MAX_TILES, 0);
- if (*out_rects == NULL)
- {
- return FALSE;
- }
- out_rect_index = 0;
-
- /* clip for smaller of 2 */
- rect.x1 = 0;
- rect.y1 = 0;
- rect.x2 = min(dst_width, src_width);
- rect.y2 = min(dst_height, src_height);
- rdpRegionInit(&temp_reg, &rect, 0);
- rdpRegionIntersect(&temp_reg, in_reg, &temp_reg);
-
- /* limit the numer of rects */
- num_rects = REGION_NUM_RECTS(&temp_reg);
- if (num_rects > max_rects)
- {
- LLOGLN(10, ("rdpCapture2: too many rects"));
- rdpRegionInit(&lin_reg, rdpRegionExtents(&temp_reg), 0);
- pin_reg = &lin_reg;
- }
- else
- {
- LLOGLN(10, ("rdpCapture2: not too many rects"));
- rdpRegionInit(&lin_reg, NullBox, 0);
- pin_reg = &temp_reg;
- }
- extents_rect = *rdpRegionExtents(pin_reg);
- y = extents_rect.y1 & ~63;
- while (y < extents_rect.y2)
- {
- x = extents_rect.x1 & ~63;
- while (x < extents_rect.x2)
- {
- rect.x1 = x;
- rect.y1 = y;
- rect.x2 = rect.x1 + 64;
- rect.y2 = rect.y1 + 64;
- rcode = rdpRegionContainsRect(pin_reg, &rect);
- LLOGLN(10, ("rdpCapture2: rcode %d", rcode));
-
- if (rcode != rgnOUT)
- {
- if (rcode == rgnPART)
- {
- LLOGLN(10, ("rdpCapture2: rgnPART"));
- rdpFillBox_yuvalp(x, y, dst, dst_stride);
- rdpRegionInit(&tile_reg, &rect, 0);
- rdpRegionIntersect(&tile_reg, pin_reg, &tile_reg);
- rects = REGION_RECTS(&tile_reg);
- num_rects = REGION_NUM_RECTS(&tile_reg);
- rdpCopyBox_a8r8g8b8_to_yuvalp(x, y,
- src, src_stride,
- dst, dst_stride,
- rects, num_rects);
- rdpRegionUninit(&tile_reg);
- }
- else /* rgnIN */
- {
- LLOGLN(10, ("rdpCapture2: rgnIN"));
- rdpCopyBox_a8r8g8b8_to_yuvalp(x, y,
- src, src_stride,
- dst, dst_stride,
- &rect, 1);
- }
- (*out_rects)[out_rect_index] = rect;
- out_rect_index++;
- if (out_rect_index >= RDP_MAX_TILES)
- {
- g_free(*out_rects);
- *out_rects = NULL;
- rdpRegionUninit(&temp_reg);
- rdpRegionUninit(&lin_reg);
- return FALSE;
- }
- }
- x += 64;
- }
- y += 64;
- }
- *num_out_rects = out_rect_index;
- rdpRegionUninit(&temp_reg);
- rdpRegionUninit(&lin_reg);
- return TRUE;
-}
-
-/**
- * Copy an array of rectangles from one memory area to another
- *****************************************************************************/
-Bool
-rdpCapture(rdpClientCon *clientCon,
- RegionPtr in_reg, BoxPtr *out_rects, int *num_out_rects,
- void *src, int src_width, int src_height,
- int src_stride, int src_format,
- void *dst, int dst_width, int dst_height,
- int dst_stride, int dst_format, int mode)
-{
- LLOGLN(10, ("rdpCapture:"));
- LLOGLN(10, ("rdpCapture: src %p dst %p", src, dst));
- switch (mode)
- {
- case 0:
- return rdpCapture0(clientCon, in_reg, out_rects, num_out_rects,
- src, src_width, src_height,
- src_stride, src_format,
- dst, dst_width, dst_height,
- dst_stride, dst_format, 15);
- case 1:
- return rdpCapture1(clientCon, in_reg, out_rects, num_out_rects,
- src, src_width, src_height,
- src_stride, src_format,
- dst, dst_width, dst_height,
- dst_stride, dst_format, 15);
- case 2:
- return rdpCapture2(clientCon, in_reg, out_rects, num_out_rects,
- src, src_width, src_height,
- src_stride, src_format,
- dst, dst_width, dst_height,
- dst_stride, dst_format, 15);
- default:
- LLOGLN(0, ("rdpCapture: unimp mode"));
- break;
- }
- return FALSE;
-}
diff --git a/xorg/server/module/rdpCapture.h b/xorg/server/module/rdpCapture.h
deleted file mode 100644
index c138947a..00000000
--- a/xorg/server/module/rdpCapture.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * xrdp: A Remote Desktop Protocol server.
- *
- * Copyright (C) Laxmikant Rashinkar 2014
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Routines to copy regions from framebuffer to shared memory
- */
-
-#ifndef __RDPCAPTURE_H
-#define __RDPCAPTURE_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT Bool
-rdpCapture(rdpClientCon *clientCon,
- RegionPtr in_reg, BoxPtr *out_rects, int *num_out_rects,
- void *src, int src_width, int src_height,
- int src_stride, int src_format,
- void *dst, int dst_width, int dst_height,
- int dst_stride, int dst_format, int mode);
-
-extern _X_EXPORT int
-a8r8g8b8_to_a8b8g8r8_box(char *s8, int src_stride,
- char *d8, int dst_stride,
- int width, int height);
-
-#endif
diff --git a/xorg/server/module/rdpClientCon.c b/xorg/server/module/rdpClientCon.c
deleted file mode 100644
index 21df291f..00000000
--- a/xorg/server/module/rdpClientCon.c
+++ /dev/null
@@ -1,2283 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Client connection to xrdp
-
-*/
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpMisc.h"
-#include "rdpInput.h"
-#include "rdpReg.h"
-#include "rdpCapture.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-#define LTOUI32(_in) ((unsigned int)(_in))
-
-#define USE_MAX_OS_BYTES 1
-#define MAX_OS_BYTES (16 * 1024 * 1024)
-
-/*
-0 GXclear, 0
-1 GXnor, DPon
-2 GXandInverted, DPna
-3 GXcopyInverted, Pn
-4 GXandReverse, PDna
-5 GXinvert, Dn
-6 GXxor, DPx
-7 GXnand, DPan
-8 GXand, DPa
-9 GXequiv, DPxn
-a GXnoop, D
-b GXorInverted, DPno
-c GXcopy, P
-d GXorReverse, PDno
-e GXor, DPo
-f GXset 1
-*/
-
-static int g_rdp_opcodes[16] =
-{
- 0x00, /* GXclear 0x0 0 */
- 0x88, /* GXand 0x1 src AND dst */
- 0x44, /* GXandReverse 0x2 src AND NOT dst */
- 0xcc, /* GXcopy 0x3 src */
- 0x22, /* GXandInverted 0x4 NOT src AND dst */
- 0xaa, /* GXnoop 0x5 dst */
- 0x66, /* GXxor 0x6 src XOR dst */
- 0xee, /* GXor 0x7 src OR dst */
- 0x11, /* GXnor 0x8 NOT src AND NOT dst */
- 0x99, /* GXequiv 0x9 NOT src XOR dst */
- 0x55, /* GXinvert 0xa NOT dst */
- 0xdd, /* GXorReverse 0xb src OR NOT dst */
- 0x33, /* GXcopyInverted 0xc NOT src */
- 0xbb, /* GXorInverted 0xd NOT src OR dst */
- 0x77, /* GXnand 0xe NOT src OR NOT dst */
- 0xff /* GXset 0xf 1 */
-};
-
-static int
-rdpClientConDisconnect(rdpPtr dev, rdpClientCon *clientCon);
-
-/******************************************************************************/
-static int
-rdpClientConGotConnection(ScreenPtr pScreen, rdpPtr dev)
-{
- rdpClientCon *clientCon;
- int new_sck;
-
- LLOGLN(0, ("rdpClientConGotConnection:"));
- clientCon = (rdpClientCon *) g_malloc(sizeof(rdpClientCon), 1);
- clientCon->dev = dev;
- dev->do_dirty_ons = 1;
-
- make_stream(clientCon->in_s);
- init_stream(clientCon->in_s, 8192);
- make_stream(clientCon->out_s);
- init_stream(clientCon->out_s, 8192 * 4 + 100);
-
- new_sck = g_sck_accept(dev->listen_sck);
- if (new_sck == -1)
- {
- LLOGLN(0, ("rdpClientConGotConnection: g_sck_accept failed"));
- }
- else
- {
- LLOGLN(0, ("rdpClientConGotConnection: g_sck_accept ok new_sck %d",
- new_sck));
- clientCon->sck = new_sck;
- g_sck_set_non_blocking(clientCon->sck);
- g_sck_tcp_set_no_delay(clientCon->sck); /* only works if TCP */
- clientCon->connected = TRUE;
- clientCon->sckClosed = FALSE;
- clientCon->begin = FALSE;
- dev->conNumber++;
- clientCon->conNumber = dev->conNumber;
- AddEnabledDevice(clientCon->sck);
- }
-
-#if 0
- if (dev->clientConTail != NULL)
- {
- rdpClientConDisconnect(dev, dev->clientConTail);
- dev->clientConHead = NULL;
- dev->clientConTail = NULL;
- }
-#endif
-
- if (dev->clientConTail == NULL)
- {
- LLOGLN(0, ("rdpClientConGotConnection: adding only clientCon"));
- dev->clientConHead = clientCon;
- dev->clientConTail = clientCon;
- }
- else
- {
- LLOGLN(0, ("rdpClientConGotConnection: adding clientCon"));
- dev->clientConTail->next = clientCon;
- dev->clientConTail = clientCon;
- }
-
- clientCon->dirtyRegion = rdpRegionCreate(NullBox, 0);
- clientCon->shmRegion = rdpRegionCreate(NullBox, 0);
-
- return 0;
-}
-
-/******************************************************************************/
-static CARD32
-rdpDeferredDisconnectCallback(OsTimerPtr timer, CARD32 now, pointer arg)
-{
- CARD32 lnow_ms;
- rdpPtr dev;
-
- dev = (rdpPtr) arg;
- LLOGLN(10, ("rdpDeferredDisconnectCallback"));
- if (dev->clientConHead != NULL)
- {
- /* this should not happen */
- LLOGLN(0, ("rdpDeferredDisconnectCallback: connected"));
- if (dev->disconnectTimer != NULL)
- {
- LLOGLN(0, ("rdpDeferredDisconnectCallback: canceling g_dis_timer"));
- TimerCancel(dev->disconnectTimer);
- TimerFree(dev->disconnectTimer);
- dev->disconnectTimer = NULL;
- }
- dev->disconnect_scheduled = FALSE;
- return 0;
- }
- else
- {
- LLOGLN(10, ("rdpDeferredDisconnectCallback: not connected"));
- }
- lnow_ms = GetTimeInMillis();
- if (lnow_ms - dev->disconnect_time_ms > dev->disconnect_timeout_s * 1000)
- {
- LLOGLN(0, ("rdpDeferredDisconnectCallback: exit X11rdp"));
- kill(getpid(), SIGTERM);
- return 0;
- }
- dev->disconnectTimer = TimerSet(dev->disconnectTimer, 0, 1000 * 10,
- rdpDeferredDisconnectCallback, dev);
- return 0;
-}
-
-/*****************************************************************************/
-static int
-rdpClientConDisconnect(rdpPtr dev, rdpClientCon *clientCon)
-{
- int index;
- rdpClientCon *pcli;
- rdpClientCon *plcli;
-
- LLOGLN(0, ("rdpClientConDisconnect:"));
- if (dev->do_kill_disconnected)
- {
- if (dev->disconnect_scheduled == FALSE)
- {
- LLOGLN(0, ("rdpClientConDisconnect: starting g_dis_timer"));
- dev->disconnectTimer = TimerSet(dev->disconnectTimer, 0, 1000 * 10,
- rdpDeferredDisconnectCallback, dev);
- dev->disconnect_scheduled = TRUE;
- }
- dev->disconnect_time_ms = GetTimeInMillis();
- }
-
- RemoveEnabledDevice(clientCon->sck);
- g_sck_close(clientCon->sck);
- if (clientCon->maxOsBitmaps > 0)
- {
- for (index = 0; index < clientCon->maxOsBitmaps; index++)
- {
- if (clientCon->osBitmaps[index].used)
- {
- if (clientCon->osBitmaps[index].priv != NULL)
- {
- clientCon->osBitmaps[index].priv->status = 0;
- }
- }
- }
- }
- g_free(clientCon->osBitmaps);
-
- plcli = NULL;
- pcli = dev->clientConHead;
- while (pcli != NULL)
- {
- if (pcli == clientCon)
- {
- if (plcli == NULL)
- {
- /* removing first item */
- dev->clientConHead = pcli->next;
- if (dev->clientConHead == NULL)
- {
- /* removed only */
- dev->clientConTail = NULL;
- }
- }
- else
- {
- plcli->next = pcli->next;
- if (pcli == dev->clientConTail)
- {
- /* removed last */
- dev->clientConTail = plcli;
- }
- }
- LLOGLN(0, ("rdpClientConDisconnect: clientCon removed from "
- "dev list"));
- break;
- }
- plcli = pcli;
- pcli = pcli->next;
- }
- rdpRegionDestroy(clientCon->dirtyRegion);
- rdpRegionDestroy(clientCon->shmRegion);
- if (clientCon->updateTimer != NULL)
- {
- TimerCancel(clientCon->updateTimer);
- TimerFree(clientCon->updateTimer);
- }
- g_free(clientCon);
- return 0;
-}
-
-/*****************************************************************************/
-/* returns error */
-static int
-rdpClientConSend(rdpPtr dev, rdpClientCon *clientCon, char *data, int len)
-{
- int sent;
-
- LLOGLN(10, ("rdpClientConSend - sending %d bytes", len));
-
- if (clientCon->sckClosed)
- {
- return 1;
- }
-
- while (len > 0)
- {
- sent = g_sck_send(clientCon->sck, data, len, 0);
-
- if (sent == -1)
- {
- if (g_sck_last_error_would_block(clientCon->sck))
- {
- g_sleep(1);
- }
- else
- {
- LLOGLN(0, ("rdpClientConSend: g_tcp_send failed(returned -1)"));
- rdpClientConDisconnect(dev, clientCon);
- return 1;
- }
- }
- else if (sent == 0)
- {
- LLOGLN(0, ("rdpClientConSend: g_tcp_send failed(returned zero)"));
- rdpClientConDisconnect(dev, clientCon);
- return 1;
- }
- else
- {
- data += sent;
- len -= sent;
- }
- }
-
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConSendMsg(rdpPtr dev, rdpClientCon *clientCon)
-{
- int len;
- int rv;
- struct stream *s;
-
- rv = 1;
- s = clientCon->out_s;
- if (s != NULL)
- {
- len = (int) (s->end - s->data);
-
- if (len > s->size)
- {
- LLOGLN(0, ("rdpClientConSendMsg: overrun error len %d count %d",
- len, clientCon->count));
- }
-
- s_pop_layer(s, iso_hdr);
- out_uint16_le(s, 3);
- out_uint16_le(s, clientCon->count);
- out_uint32_le(s, len - 8);
- rv = rdpClientConSend(dev, clientCon, s->data, len);
- }
-
- if (rv != 0)
- {
- LLOGLN(0, ("rdpClientConSendMsg: error in rdpup_send_msg"));
- }
-
- return rv;
-}
-
-/******************************************************************************/
-static int
-rdpClientConSendPending(rdpPtr dev, rdpClientCon *clientCon)
-{
- int rv;
-
- rv = 0;
- if (clientCon->connected && clientCon->begin)
- {
- out_uint16_le(clientCon->out_s, 2); /* XR_SERVER_END_UPDATE */
- out_uint16_le(clientCon->out_s, 4); /* size */
- clientCon->count++;
- s_mark_end(clientCon->out_s);
- if (rdpClientConSendMsg(dev, clientCon) != 0)
- {
- LLOGLN(0, ("rdpClientConSendPending: rdpClientConSendMsg failed"));
- rv = 1;
- }
- }
- clientCon->count = 0;
- clientCon->begin = FALSE;
- return rv;
-}
-
-/******************************************************************************/
-/* returns error */
-static int
-rdpClientConRecv(rdpPtr dev, rdpClientCon *clientCon, char *data, int len)
-{
- int rcvd;
-
- if (clientCon->sckClosed)
- {
- return 1;
- }
-
- while (len > 0)
- {
- rcvd = g_sck_recv(clientCon->sck, data, len, 0);
-
- if (rcvd == -1)
- {
- if (g_sck_last_error_would_block(clientCon->sck))
- {
- g_sleep(1);
- }
- else
- {
- LLOGLN(0, ("rdpClientConRecv: g_sck_recv failed(returned -1)"));
- rdpClientConDisconnect(dev, clientCon);
- return 1;
- }
- }
- else if (rcvd == 0)
- {
- LLOGLN(0, ("rdpClientConRecv: g_sck_recv failed(returned 0)"));
- rdpClientConDisconnect(dev, clientCon);
- return 1;
- }
- else
- {
- data += rcvd;
- len -= rcvd;
- }
- }
-
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConRecvMsg(rdpPtr dev, rdpClientCon *clientCon)
-{
- int len;
- int rv;
- struct stream *s;
-
- rv = 1;
-
- s = clientCon->in_s;
- if (s != 0)
- {
- init_stream(s, 4);
- rv = rdpClientConRecv(dev, clientCon, s->data, 4);
-
- if (rv == 0)
- {
- s->end = s->data + 4;
- in_uint32_le(s, len);
-
- if (len > 3)
- {
- init_stream(s, len);
- rv = rdpClientConRecv(dev, clientCon, s->data, len - 4);
- if (rv == 0)
- {
- s->end = s->data + len;
- }
- }
- }
- }
-
- if (rv != 0)
- {
- LLOGLN(0, ("rdpClientConRecvMsg: error"));
- }
-
- return rv;
-}
-
-/******************************************************************************/
-static int
-rdpClientConSendCaps(rdpPtr dev, rdpClientCon *clientCon)
-{
- struct stream *ls;
- int len;
- int rv;
- int cap_count;
- int cap_bytes;
-
- make_stream(ls);
- init_stream(ls, 8192);
- s_push_layer(ls, iso_hdr, 8);
-
- cap_count = 0;
- cap_bytes = 0;
-
-#if 0
- out_uint16_le(ls, 0);
- out_uint16_le(ls, 4);
- cap_count++;
- cap_bytes += 4;
-
- out_uint16_le(ls, 1);
- out_uint16_le(ls, 4);
- cap_count++;
- cap_bytes += 4;
-#endif
-
- s_mark_end(ls);
- len = (int)(ls->end - ls->data);
- s_pop_layer(ls, iso_hdr);
- out_uint16_le(ls, 2); /* caps */
- out_uint16_le(ls, cap_count); /* num caps */
- out_uint32_le(ls, cap_bytes); /* caps len after header */
-
- rv = rdpClientConSend(dev, clientCon, ls->data, len);
-
- if (rv != 0)
- {
- LLOGLN(0, ("rdpClientConSendCaps: rdpup_send failed"));
- }
-
- free_stream(ls);
- return rv;
-}
-
-/******************************************************************************/
-static int
-rdpClientConProcessMsgVersion(rdpPtr dev, rdpClientCon *clientCon,
- int param1, int param2, int param3, int param4)
-{
- LLOGLN(0, ("rdpClientConProcessMsgVersion: version %d %d %d %d",
- param1, param2, param3, param4));
-
- if ((param1 > 0) || (param2 > 0) || (param3 > 0) || (param4 > 0))
- {
- rdpClientConSendCaps(dev, clientCon);
- }
-
- return 0;
-}
-
-#define LALIGN(_num, _po2) ((_num + ((_po2) - 1)) & ~((_po2) - 1))
-
-/******************************************************************************/
-/*
- this from miScreenInit
- pScreen->mmWidth = (xsize * 254 + dpix * 5) / (dpix * 10);
- pScreen->mmHeight = (ysize * 254 + dpiy * 5) / (dpiy * 10);
-*/
-static int
-rdpClientConProcessScreenSizeMsg(rdpPtr dev, rdpClientCon *clientCon,
- int width, int height, int bpp)
-{
- RRScreenSizePtr pSize;
- int mmwidth;
- int mmheight;
- int bytes;
- Bool ok;
-
- LLOGLN(0, ("rdpClientConProcessScreenSizeMsg: set width %d height %d "
- "bpp %d", width, height, bpp));
- clientCon->rdp_width = width;
- clientCon->rdp_height = height;
- clientCon->rdp_bpp = bpp;
- clientCon->cap_width = width;
- clientCon->cap_height = height;
-
- if (bpp < 15)
- {
- clientCon->rdp_Bpp = 1;
- clientCon->rdp_Bpp_mask = 0xff;
- clientCon->rdp_format = PIXMAN_r3g3b2;
- }
- else if (bpp == 15)
- {
- clientCon->rdp_Bpp = 2;
- clientCon->rdp_Bpp_mask = 0x7fff;
- clientCon->rdp_format = XRDP_a1r5g5b5;
- }
- else if (bpp == 16)
- {
- clientCon->rdp_Bpp = 2;
- clientCon->rdp_Bpp_mask = 0xffff;
- clientCon->rdp_format = XRDP_r5g6b5;
- }
- else if (bpp > 16)
- {
- clientCon->rdp_Bpp = 4;
- clientCon->rdp_Bpp_mask = 0xffffff;
- clientCon->rdp_format = XRDP_a8r8g8b8;
- }
-
- if (clientCon->shmemptr != 0)
- {
- shmdt(clientCon->shmemptr);
- }
- bytes = clientCon->rdp_width * clientCon->rdp_height *
- clientCon->rdp_Bpp;
- clientCon->shmemid = shmget(IPC_PRIVATE, bytes, IPC_CREAT | 0777);
- clientCon->shmemptr = shmat(clientCon->shmemid, 0, 0);
- shmctl(clientCon->shmemid, IPC_RMID, NULL);
- LLOGLN(0, ("rdpClientConProcessScreenSizeMsg: shmemid %d shmemptr %p",
- clientCon->shmemid, clientCon->shmemptr));
- clientCon->shmem_lineBytes = clientCon->rdp_Bpp * clientCon->rdp_width;
-
- if (clientCon->shmRegion != 0)
- {
- rdpRegionDestroy(clientCon->shmRegion);
- }
- clientCon->shmRegion = rdpRegionCreate(NullBox, 0);
-
- mmwidth = PixelToMM(width);
- mmheight = PixelToMM(height);
-
- pSize = RRRegisterSize(dev->pScreen, width, height, mmwidth, mmheight);
- RRSetCurrentConfig(dev->pScreen, RR_Rotate_0, 0, pSize);
-
- if ((dev->width != width) || (dev->height != height))
- {
- ok = RRScreenSizeSet(dev->pScreen, width, height, mmwidth, mmheight);
- LLOGLN(0, ("rdpClientConProcessScreenSizeMsg: RRScreenSizeSet ok=[%d]", ok));
- }
-
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConProcessMsgClientInput(rdpPtr dev, rdpClientCon *clientCon)
-{
- struct stream *s;
- int msg;
- int param1;
- int param2;
- int param3;
- int param4;
- int x;
- int y;
- int cx;
- int cy;
-
- s = clientCon->in_s;
- in_uint32_le(s, msg);
- in_uint32_le(s, param1);
- in_uint32_le(s, param2);
- in_uint32_le(s, param3);
- in_uint32_le(s, param4);
-
- LLOGLN(10, ("rdpClientConProcessMsgClientInput: msg %d param1 %d param2 %d "
- "param3 %d param4 %d", msg, param1, param2, param3, param4));
-
- if (msg < 100)
- {
- rdpInputKeyboardEvent(dev, msg, param1, param2, param3, param4);
- }
- else if (msg < 200)
- {
- rdpInputMouseEvent(dev, msg, param1, param2, param3, param4);
- }
- else if (msg == 200) /* invalidate */
- {
- x = (param1 >> 16) & 0xffff;
- y = param1 & 0xffff;
- cx = (param2 >> 16) & 0xffff;
- cy = param2 & 0xffff;
- LLOGLN(0, ("rdpClientConProcessMsgClientInput: invalidate x %d y %d "
- "cx %d cy %d", x, y, cx, cy));
- rdpClientConAddDirtyScreen(dev, clientCon, x, y, cx, cy);
- }
- else if (msg == 300) /* resize desktop */
- {
- rdpClientConProcessScreenSizeMsg(dev, clientCon, param1,
- param2, param3);
- }
- else if (msg == 301) /* version */
- {
- rdpClientConProcessMsgVersion(dev, clientCon,
- param1, param2, param3, param4);
- }
- else
- {
- LLOGLN(0, ("rdpClientConProcessMsgClientInput: unknown msg %d", msg));
- }
-
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
-{
- struct stream *s;
- int bytes;
- int i1;
-
- LLOGLN(0, ("rdpClientConProcessMsgClientInfo:"));
- s = clientCon->in_s;
- in_uint32_le(s, bytes);
- if (bytes > sizeof(clientCon->client_info))
- {
- bytes = sizeof(clientCon->client_info);
- }
- memcpy(&(clientCon->client_info), s->p - 4, bytes);
- clientCon->client_info.size = bytes;
-
- LLOGLN(0, (" got client info bytes %d", bytes));
- LLOGLN(0, (" jpeg support %d", clientCon->client_info.jpeg));
- i1 = clientCon->client_info.offscreen_support_level;
- LLOGLN(0, (" offscreen support %d", i1));
- i1 = clientCon->client_info.offscreen_cache_size;
- LLOGLN(0, (" offscreen size %d", i1));
- i1 = clientCon->client_info.offscreen_cache_entries;
- LLOGLN(0, (" offscreen entries %d", i1));
-
- if (clientCon->client_info.capture_format != 0)
- {
- clientCon->rdp_format = clientCon->client_info.capture_format;
- }
-
- if (clientCon->client_info.capture_code == 2) /* RFX */
- {
- LLOGLN(0, ("rdpClientConProcessMsgClientInfo: got RFX capture"));
- clientCon->cap_width = LALIGN(clientCon->rdp_width, 64);
- clientCon->cap_height = LALIGN(clientCon->rdp_height, 64);
- LLOGLN(0, (" cap_width %d cap_height %d",
- clientCon->cap_width, clientCon->cap_height));
- if (clientCon->shmemptr != 0)
- {
- shmdt(clientCon->shmemptr);
- }
- bytes = clientCon->cap_width * clientCon->cap_height *
- clientCon->rdp_Bpp;
- clientCon->shmemid = shmget(IPC_PRIVATE, bytes, IPC_CREAT | 0777);
- clientCon->shmemptr = shmat(clientCon->shmemid, 0, 0);
- shmctl(clientCon->shmemid, IPC_RMID, NULL);
- LLOGLN(0, ("rdpClientConProcessMsgClientInfo: shmemid %d shmemptr %p "
- "bytes %d", clientCon->shmemid, clientCon->shmemptr, bytes));
- clientCon->shmem_lineBytes = clientCon->rdp_Bpp * clientCon->cap_width;
- }
-
- if (clientCon->client_info.offscreen_support_level > 0)
- {
- if (clientCon->client_info.offscreen_cache_entries > 0)
- {
- clientCon->maxOsBitmaps = clientCon->client_info.offscreen_cache_entries;
- g_free(clientCon->osBitmaps);
- clientCon->osBitmaps = (struct rdpup_os_bitmap *)
- g_malloc(sizeof(struct rdpup_os_bitmap) * clientCon->maxOsBitmaps, 1);
- }
- }
-
- if (clientCon->client_info.orders[0x1b]) /* 27 NEG_GLYPH_INDEX_INDEX */
- {
- LLOGLN(0, (" client supports glyph cache but server disabled"));
- //clientCon->doGlyphCache = 1;
- }
- if (clientCon->client_info.order_flags_ex & 0x100)
- {
- clientCon->doComposite = 1;
- }
- if (clientCon->doGlyphCache)
- {
- LLOGLN(0, (" using glyph cache"));
- }
- if (clientCon->doComposite)
- {
- LLOGLN(0, (" using client composite"));
- }
- LLOGLN(10, ("order_flags_ex 0x%x", clientCon->client_info.order_flags_ex));
- if (clientCon->client_info.offscreen_cache_entries == 2000)
- {
- LLOGLN(0, (" client can do offscreen to offscreen blits"));
- clientCon->canDoPixToPix = 1;
- }
- else
- {
- LLOGLN(0, (" client can not do offscreen to offscreen blits"));
- clientCon->canDoPixToPix = 0;
- }
- if (clientCon->client_info.pointer_flags & 1)
- {
- LLOGLN(0, (" client can do new(color) cursor"));
- }
- else
- {
- LLOGLN(0, (" client can not do new(color) cursor"));
- }
- if (clientCon->client_info.monitorCount > 0)
- {
- LLOGLN(0, (" client can do multimon"));
- LLOGLN(0, (" client monitor data, monitorCount= %d", clientCon->client_info.monitorCount));
- clientCon->doMultimon = 1;
- }
- else
- {
- LLOGLN(0, (" client can not do multimon"));
- clientCon->doMultimon = 0;
- }
-
- //rdpLoadLayout(g_rdpScreen.client_info.keylayout);
-
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConProcessMsgClientRegion(rdpPtr dev, rdpClientCon *clientCon)
-{
- struct stream *s;
- int flags;
- int x;
- int y;
- int cx;
- int cy;
- RegionRec reg;
- BoxRec box;
-
- LLOGLN(10, ("rdpClientConProcessMsgClientRegion:"));
- s = clientCon->in_s;
-
- in_uint32_le(s, flags);
- in_uint32_le(s, clientCon->rect_id_ack);
- in_uint32_le(s, x);
- in_uint32_le(s, y);
- in_uint32_le(s, cx);
- in_uint32_le(s, cy);
- LLOGLN(10, ("rdpClientConProcessMsgClientRegion: %d %d %d %d flags 0x%8.8x",
- x, y, cx, cy, flags));
- LLOGLN(10, ("rdpClientConProcessMsgClientRegion: rect_id %d rect_id_ack %d",
- clientCon->rect_id, clientCon->rect_id_ack));
-
- box.x1 = x;
- box.y1 = y;
- box.x2 = box.x1 + cx;
- box.y2 = box.y1 + cy;
-
- rdpRegionInit(®, &box, 0);
- LLOGLN(10, ("rdpClientConProcessMsgClientRegion: %d %d %d %d",
- box.x1, box.y1, box.x2, box.y2));
- rdpRegionSubtract(clientCon->shmRegion, clientCon->shmRegion, ®);
- rdpRegionUninit(®);
-
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConProcessMsgClientRegionEx(rdpPtr dev, rdpClientCon *clientCon)
-{
- struct stream *s;
- int flags;
-
- LLOGLN(10, ("rdpClientConProcessMsgClientRegionEx:"));
- s = clientCon->in_s;
-
- in_uint32_le(s, flags);
- in_uint32_le(s, clientCon->rect_id_ack);
- LLOGLN(10, ("rdpClientConProcessMsgClientRegionEx: flags 0x%8.8x", flags));
- LLOGLN(10, ("rdpClientConProcessMsgClientRegionEx: rect_id %d "
- "rect_id_ack %d", clientCon->rect_id, clientCon->rect_id_ack));
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConProcessMsg(rdpPtr dev, rdpClientCon *clientCon)
-{
- int msg_type;
- struct stream *s;
-
- LLOGLN(10, ("rdpClientConProcessMsg:"));
- s = clientCon->in_s;
- in_uint16_le(s, msg_type);
- LLOGLN(10, ("rdpClientConProcessMsg: msg_type %d", msg_type));
- switch (msg_type)
- {
- case 103: /* client input */
- rdpClientConProcessMsgClientInput(dev, clientCon);
- break;
- case 104: /* client info */
- rdpClientConProcessMsgClientInfo(dev, clientCon);
- break;
- case 105: /* client region */
- rdpClientConProcessMsgClientRegion(dev, clientCon);
- break;
- case 106: /* client region ex */
- rdpClientConProcessMsgClientRegionEx(dev, clientCon);
- break;
- default:
- break;
- }
-
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConGotData(ScreenPtr pScreen, rdpPtr dev, rdpClientCon *clientCon)
-{
- int rv;
-
- LLOGLN(10, ("rdpClientConGotData:"));
-
- rv = rdpClientConRecvMsg(dev, clientCon);
- if (rv == 0)
- {
- rv = rdpClientConProcessMsg(dev, clientCon);
- }
-
- return rv;
-}
-
-/******************************************************************************/
-static int
-rdpClientConGotControlConnection(ScreenPtr pScreen, rdpPtr dev,
- rdpClientCon *clientCon)
-{
- LLOGLN(0, ("rdpClientConGotControlConnection:"));
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConGotControlData(ScreenPtr pScreen, rdpPtr dev,
- rdpClientCon *clientCon)
-{
- LLOGLN(0, ("rdpClientConGotControlData:"));
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConCheck(ScreenPtr pScreen)
-{
- rdpPtr dev;
- rdpClientCon *clientCon;
- fd_set rfds;
- struct timeval time;
- int max;
- int sel;
- int count;
-
- LLOGLN(10, ("rdpClientConCheck:"));
- dev = rdpGetDevFromScreen(pScreen);
- time.tv_sec = 0;
- time.tv_usec = 0;
- FD_ZERO(&rfds);
- count = 0;
- max = 0;
- if (dev->listen_sck > 0)
- {
- count++;
- FD_SET(LTOUI32(dev->listen_sck), &rfds);
- max = RDPMAX(dev->listen_sck, max);
- }
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- if (clientCon->sck > 0)
- {
- count++;
- FD_SET(LTOUI32(clientCon->sck), &rfds);
- max = RDPMAX(clientCon->sck, max);
- }
- if (clientCon->sckControl > 0)
- {
- count++;
- FD_SET(LTOUI32(clientCon->sckControl), &rfds);
- max = RDPMAX(clientCon->sckControl, max);
- }
- if (clientCon->sckControlListener > 0)
- {
- count++;
- FD_SET(LTOUI32(clientCon->sckControlListener), &rfds);
- max = RDPMAX(clientCon->sckControlListener, max);
- }
- clientCon = clientCon->next;
- }
- if (count < 1)
- {
- sel = 0;
- }
- else
- {
- sel = select(max + 1, &rfds, 0, 0, &time);
- }
- if (sel < 1)
- {
- LLOGLN(10, ("rdpClientConCheck: no select"));
- return 0;
- }
- if (dev->listen_sck > 0)
- {
- if (FD_ISSET(LTOUI32(dev->listen_sck), &rfds))
- {
- rdpClientConGotConnection(pScreen, dev);
- }
- }
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- if (clientCon->sck > 0)
- {
- if (FD_ISSET(LTOUI32(clientCon->sck), &rfds))
- {
- if (rdpClientConGotData(pScreen, dev, clientCon) != 0)
- {
- LLOGLN(0, ("rdpClientConCheck: rdpClientConGotData failed"));
- clientCon = dev->clientConHead;
- continue;
- }
- }
- }
- if (clientCon->sckControlListener > 0)
- {
- if (FD_ISSET(LTOUI32(clientCon->sckControlListener), &rfds))
- {
- if (rdpClientConGotControlConnection(pScreen, dev, clientCon) != 0)
- {
- LLOGLN(0, ("rdpClientConCheck: rdpClientConGotControlConnection failed"));
- clientCon = dev->clientConHead;
- continue;
- }
- }
- }
- if (clientCon->sckControl > 0)
- {
- if (FD_ISSET(LTOUI32(clientCon->sckControl), &rfds))
- {
- if (rdpClientConGotControlData(pScreen, dev, clientCon) != 0)
- {
- LLOGLN(0, ("rdpClientConCheck: rdpClientConGotControlData failed"));
- clientCon = dev->clientConHead;
- continue;
- }
- }
- }
- clientCon = clientCon->next;
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConInit(rdpPtr dev)
-{
- int i;
-
- if (!g_directory_exist("/tmp/.xrdp"))
- {
- if (!g_create_dir("/tmp/.xrdp"))
- {
- if (!g_directory_exist("/tmp/.xrdp"))
- {
- LLOGLN(0, ("rdpup_init: g_create_dir failed"));
- return 0;
- }
- }
- g_chmod_hex("/tmp/.xrdp", 0x1777);
- }
- i = atoi(display);
- if (i < 1)
- {
- LLOGLN(0, ("rdpClientConInit: can not run at display < 1"));
- return 0;
- }
- g_sprintf(dev->uds_data, "/tmp/.xrdp/xrdp_display_%s", display);
- if (dev->listen_sck == 0)
- {
- unlink(dev->uds_data);
- dev->listen_sck = g_sck_local_socket_stream();
- if (g_sck_local_bind(dev->listen_sck, dev->uds_data) != 0)
- {
- LLOGLN(0, ("rdpClientConInit: g_tcp_local_bind failed"));
- return 1;
- }
- g_sck_listen(dev->listen_sck);
- AddEnabledDevice(dev->listen_sck);
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConDeinit(rdpPtr dev)
-{
- LLOGLN(0, ("rdpClientConDeinit:"));
- if (dev->listen_sck != 0)
- {
- close(dev->listen_sck);
- unlink(dev->uds_data);
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConBeginUpdate(rdpPtr dev, rdpClientCon *clientCon)
-{
- LLOGLN(10, ("rdpClientConBeginUpdate:"));
-
- if (clientCon->connected)
- {
- if (clientCon->begin)
- {
- return 0;
- }
- init_stream(clientCon->out_s, 0);
- s_push_layer(clientCon->out_s, iso_hdr, 8);
- out_uint16_le(clientCon->out_s, 1); /* begin update */
- out_uint16_le(clientCon->out_s, 4); /* size */
- clientCon->begin = TRUE;
- clientCon->count = 1;
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConEndUpdate(rdpPtr dev, rdpClientCon *clientCon)
-{
- LLOGLN(10, ("rdpClientConEndUpdate"));
-
- if (clientCon->connected && clientCon->begin)
- {
- if (dev->do_dirty_ons)
- {
- /* in this mode, end update is only called in check dirty */
- rdpClientConSendPending(dev, clientCon);
- }
- else
- {
- rdpClientConScheduleDeferredUpdate(dev);
- }
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConPreCheck(rdpPtr dev, rdpClientCon *clientCon, int in_size)
-{
- int rv;
-
- rv = 0;
- if (clientCon->begin == FALSE)
- {
- rdpClientConBeginUpdate(dev, clientCon);
- }
-
- if ((clientCon->out_s->p - clientCon->out_s->data) >
- (clientCon->out_s->size - (in_size + 20)))
- {
- s_mark_end(clientCon->out_s);
- if (rdpClientConSendMsg(dev, clientCon) != 0)
- {
- LLOGLN(0, ("rdpClientConPreCheck: rdpup_send_msg failed"));
- rv = 1;
- }
- clientCon->count = 0;
- init_stream(clientCon->out_s, 0);
- s_push_layer(clientCon->out_s, iso_hdr, 8);
- }
-
- return rv;
-}
-
-/******************************************************************************/
-int
-rdpClientConFillRect(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, int cx, int cy)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConFillRect:"));
- rdpClientConPreCheck(dev, clientCon, 12);
- out_uint16_le(clientCon->out_s, 3); /* fill rect */
- out_uint16_le(clientCon->out_s, 12); /* size */
- clientCon->count++;
- out_uint16_le(clientCon->out_s, x);
- out_uint16_le(clientCon->out_s, y);
- out_uint16_le(clientCon->out_s, cx);
- out_uint16_le(clientCon->out_s, cy);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConScreenBlt(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, int cx, int cy, short srcx, short srcy)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConScreenBlt: x %d y %d cx %d cy %d "
- "srcx %d srcy %d",
- x, y, cx, cy, srcx, srcy));
- rdpClientConPreCheck(dev, clientCon, 16);
- out_uint16_le(clientCon->out_s, 4); /* screen blt */
- out_uint16_le(clientCon->out_s, 16); /* size */
- clientCon->count++;
- out_uint16_le(clientCon->out_s, x);
- out_uint16_le(clientCon->out_s, y);
- out_uint16_le(clientCon->out_s, cx);
- out_uint16_le(clientCon->out_s, cy);
- out_uint16_le(clientCon->out_s, srcx);
- out_uint16_le(clientCon->out_s, srcy);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSetClip(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, int cx, int cy)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConSetClip:"));
- rdpClientConPreCheck(dev, clientCon, 12);
- out_uint16_le(clientCon->out_s, 10); /* set clip */
- out_uint16_le(clientCon->out_s, 12); /* size */
- clientCon->count++;
- out_uint16_le(clientCon->out_s, x);
- out_uint16_le(clientCon->out_s, y);
- out_uint16_le(clientCon->out_s, cx);
- out_uint16_le(clientCon->out_s, cy);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConResetClip(rdpPtr dev, rdpClientCon *clientCon)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConResetClip:"));
- rdpClientConPreCheck(dev, clientCon, 4);
- out_uint16_le(clientCon->out_s, 11); /* reset clip */
- out_uint16_le(clientCon->out_s, 4); /* size */
- clientCon->count++;
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConConvertPixel(rdpPtr dev, rdpClientCon *clientCon, int in_pixel)
-{
- int red;
- int green;
- int blue;
- int rv;
-
- rv = 0;
-
- if (dev->depth == 24)
- {
- if (clientCon->rdp_bpp == 24)
- {
- rv = in_pixel;
- SPLITCOLOR32(red, green, blue, rv);
- rv = COLOR24(red, green, blue);
- }
- else if (clientCon->rdp_bpp == 16)
- {
- rv = in_pixel;
- SPLITCOLOR32(red, green, blue, rv);
- rv = COLOR16(red, green, blue);
- }
- else if (clientCon->rdp_bpp == 15)
- {
- rv = in_pixel;
- SPLITCOLOR32(red, green, blue, rv);
- rv = COLOR15(red, green, blue);
- }
- else if (clientCon->rdp_bpp == 8)
- {
- rv = in_pixel;
- SPLITCOLOR32(red, green, blue, rv);
- rv = COLOR8(red, green, blue);
- }
- }
- else if (dev->depth == clientCon->rdp_bpp)
- {
- return in_pixel;
- }
-
- return rv;
-}
-
-/******************************************************************************/
-int
-rdpClientConConvertPixels(rdpPtr dev, rdpClientCon *clientCon,
- void *src, void *dst, int num_pixels)
-{
- unsigned int pixel;
- unsigned int red;
- unsigned int green;
- unsigned int blue;
- unsigned int *src32;
- unsigned int *dst32;
- unsigned short *dst16;
- unsigned char *dst8;
- int index;
-
- if (dev->depth == clientCon->rdp_bpp)
- {
- memcpy(dst, src, num_pixels * dev->Bpp);
- return 0;
- }
-
- if (dev->depth == 24)
- {
- src32 = (unsigned int *)src;
-
- if (clientCon->rdp_bpp == 24)
- {
- dst32 = (unsigned int *)dst;
-
- for (index = 0; index < num_pixels; index++)
- {
- pixel = *src32;
- *dst32 = pixel;
- dst32++;
- src32++;
- }
- }
- else if (clientCon->rdp_bpp == 16)
- {
- dst16 = (unsigned short *)dst;
-
- for (index = 0; index < num_pixels; index++)
- {
- pixel = *src32;
- SPLITCOLOR32(red, green, blue, pixel);
- pixel = COLOR16(red, green, blue);
- *dst16 = pixel;
- dst16++;
- src32++;
- }
- }
- else if (clientCon->rdp_bpp == 15)
- {
- dst16 = (unsigned short *)dst;
-
- for (index = 0; index < num_pixels; index++)
- {
- pixel = *src32;
- SPLITCOLOR32(red, green, blue, pixel);
- pixel = COLOR15(red, green, blue);
- *dst16 = pixel;
- dst16++;
- src32++;
- }
- }
- else if (clientCon->rdp_bpp == 8)
- {
- dst8 = (unsigned char *)dst;
-
- for (index = 0; index < num_pixels; index++)
- {
- pixel = *src32;
- SPLITCOLOR32(red, green, blue, pixel);
- pixel = COLOR8(red, green, blue);
- *dst8 = pixel;
- dst8++;
- src32++;
- }
- }
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConAlphaPixels(void* src, void* dst, int num_pixels)
-{
- unsigned int* src32;
- unsigned char* dst8;
- int index;
-
- src32 = (unsigned int*)src;
- dst8 = (unsigned char*)dst;
- for (index = 0; index < num_pixels; index++)
- {
- *dst8 = (*src32) >> 24;
- dst8++;
- src32++;
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSetFgcolor(rdpPtr dev, rdpClientCon *clientCon, int fgcolor)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConSetFgcolor:"));
- rdpClientConPreCheck(dev, clientCon, 8);
- out_uint16_le(clientCon->out_s, 12); /* set fgcolor */
- out_uint16_le(clientCon->out_s, 8); /* size */
- clientCon->count++;
- fgcolor = fgcolor & dev->Bpp_mask;
- fgcolor = rdpClientConConvertPixel(dev, clientCon, fgcolor) &
- clientCon->rdp_Bpp_mask;
- out_uint32_le(clientCon->out_s, fgcolor);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSetBgcolor(rdpPtr dev, rdpClientCon *clientCon, int bgcolor)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConSetBgcolor:"));
- rdpClientConPreCheck(dev, clientCon, 8);
- out_uint16_le(clientCon->out_s, 13); /* set bg color */
- out_uint16_le(clientCon->out_s, 8); /* size */
- clientCon->count++;
- bgcolor = bgcolor & dev->Bpp_mask;
- bgcolor = rdpClientConConvertPixel(dev, clientCon, bgcolor) &
- clientCon->rdp_Bpp_mask;
- out_uint32_le(clientCon->out_s, bgcolor);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSetOpcode(rdpPtr dev, rdpClientCon *clientCon, int opcode)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConSetOpcode:"));
- rdpClientConPreCheck(dev, clientCon, 6);
- out_uint16_le(clientCon->out_s, 14); /* set opcode */
- out_uint16_le(clientCon->out_s, 6); /* size */
- clientCon->count++;
- out_uint16_le(clientCon->out_s, g_rdp_opcodes[opcode & 0xf]);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSetPen(rdpPtr dev, rdpClientCon *clientCon, int style, int width)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConSetPen:"));
- rdpClientConPreCheck(dev, clientCon, 8);
- out_uint16_le(clientCon->out_s, 17); /* set pen */
- out_uint16_le(clientCon->out_s, 8); /* size */
- clientCon->count++;
- out_uint16_le(clientCon->out_s, style);
- out_uint16_le(clientCon->out_s, width);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConDrawLine(rdpPtr dev, rdpClientCon *clientCon,
- short x1, short y1, short x2, short y2)
-{
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConDrawLine:"));
- rdpClientConPreCheck(dev, clientCon, 12);
- out_uint16_le(clientCon->out_s, 18); /* draw line */
- out_uint16_le(clientCon->out_s, 12); /* size */
- clientCon->count++;
- out_uint16_le(clientCon->out_s, x1);
- out_uint16_le(clientCon->out_s, y1);
- out_uint16_le(clientCon->out_s, x2);
- out_uint16_le(clientCon->out_s, y2);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSetCursor(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, char *cur_data, char *cur_mask)
-{
- int size;
-
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConSetCursor:"));
- size = 8 + 32 * (32 * 3) + 32 * (32 / 8);
- rdpClientConPreCheck(dev, clientCon, size);
- out_uint16_le(clientCon->out_s, 19); /* set cursor */
- out_uint16_le(clientCon->out_s, size); /* size */
- clientCon->count++;
- x = RDPMAX(0, x);
- x = RDPMIN(31, x);
- y = RDPMAX(0, y);
- y = RDPMIN(31, y);
- out_uint16_le(clientCon->out_s, x);
- out_uint16_le(clientCon->out_s, y);
- out_uint8a(clientCon->out_s, cur_data, 32 * (32 * 3));
- out_uint8a(clientCon->out_s, cur_mask, 32 * (32 / 8));
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSetCursorEx(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, char *cur_data,
- char *cur_mask, int bpp)
-{
- int size;
- int Bpp;
-
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConSetCursorEx:"));
- Bpp = (bpp == 0) ? 3 : (bpp + 7) / 8;
- size = 10 + 32 * (32 * Bpp) + 32 * (32 / 8);
- rdpClientConPreCheck(dev, clientCon, size);
- out_uint16_le(clientCon->out_s, 51); /* set cursor ex */
- out_uint16_le(clientCon->out_s, size); /* size */
- clientCon->count++;
- x = RDPMAX(0, x);
- x = RDPMIN(31, x);
- y = RDPMAX(0, y);
- y = RDPMIN(31, y);
- out_uint16_le(clientCon->out_s, x);
- out_uint16_le(clientCon->out_s, y);
- out_uint16_le(clientCon->out_s, bpp);
- out_uint8a(clientCon->out_s, cur_data, 32 * (32 * Bpp));
- out_uint8a(clientCon->out_s, cur_mask, 32 * (32 / 8));
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConCreateOsSurface(rdpPtr dev, rdpClientCon *clientCon,
- int rdpindex, int width, int height)
-{
- LLOGLN(10, ("rdpClientConCreateOsSurface:"));
-
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConCreateOsSurface: width %d height %d", width, height));
- rdpClientConPreCheck(dev, clientCon, 12);
- out_uint16_le(clientCon->out_s, 20);
- out_uint16_le(clientCon->out_s, 12);
- clientCon->count++;
- out_uint32_le(clientCon->out_s, rdpindex);
- out_uint16_le(clientCon->out_s, width);
- out_uint16_le(clientCon->out_s, height);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConCreateOsSurfaceBpp(rdpPtr dev, rdpClientCon *clientCon,
- int rdpindex, int width, int height, int bpp)
-{
- LLOGLN(10, ("rdpClientConCreateOsSurfaceBpp:"));
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConCreateOsSurfaceBpp: width %d height %d "
- "bpp %d", width, height, bpp));
- rdpClientConPreCheck(dev, clientCon, 13);
- out_uint16_le(clientCon->out_s, 31);
- out_uint16_le(clientCon->out_s, 13);
- clientCon->count++;
- out_uint32_le(clientCon->out_s, rdpindex);
- out_uint16_le(clientCon->out_s, width);
- out_uint16_le(clientCon->out_s, height);
- out_uint8(clientCon->out_s, bpp);
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConSwitchOsSurface(rdpPtr dev, rdpClientCon *clientCon, int rdpindex)
-{
- LLOGLN(10, ("rdpClientConSwitchOsSurface:"));
-
- if (clientCon->connected)
- {
- if (clientCon->rdpIndex == rdpindex)
- {
- return 0;
- }
-
- clientCon->rdpIndex = rdpindex;
- LLOGLN(10, ("rdpClientConSwitchOsSurface: rdpindex %d", rdpindex));
- /* switch surface */
- rdpClientConPreCheck(dev, clientCon, 8);
- out_uint16_le(clientCon->out_s, 21);
- out_uint16_le(clientCon->out_s, 8);
- out_uint32_le(clientCon->out_s, rdpindex);
- clientCon->count++;
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConDeleteOsSurface(rdpPtr dev, rdpClientCon *clientCon, int rdpindex)
-{
- LLOGLN(10, ("rdpClientConDeleteOsSurface: rdpindex %d", rdpindex));
-
- if (clientCon->connected)
- {
- LLOGLN(10, ("rdpClientConDeleteOsSurface: rdpindex %d", rdpindex));
- rdpClientConPreCheck(dev, clientCon, 8);
- out_uint16_le(clientCon->out_s, 22);
- out_uint16_le(clientCon->out_s, 8);
- clientCon->count++;
- out_uint32_le(clientCon->out_s, rdpindex);
- }
-
- return 0;
-}
-
-/*****************************************************************************/
-/* returns -1 on error */
-int
-rdpClientConAddOsBitmap(rdpPtr dev, rdpClientCon *clientCon,
- PixmapPtr pixmap, rdpPixmapPtr priv)
-{
- int index;
- int rv;
- int oldest;
- int oldest_index;
- int this_bytes;
-
- LLOGLN(10, ("rdpClientConAddOsBitmap:"));
- if (clientCon->connected == FALSE)
- {
- LLOGLN(10, ("rdpClientConAddOsBitmap: test error 1"));
- return -1;
- }
-
- if (clientCon->osBitmaps == NULL)
- {
- LLOGLN(10, ("rdpClientConAddOsBitmap: test error 2"));
- return -1;
- }
-
- this_bytes = pixmap->devKind * pixmap->drawable.height;
- if (this_bytes > MAX_OS_BYTES)
- {
- LLOGLN(10, ("rdpClientConAddOsBitmap: error, too big this_bytes %d "
- "width %d height %d", this_bytes,
- pixmap->drawable.height, pixmap->drawable.height));
- return -1;
- }
-
- oldest = 0x7fffffff;
- oldest_index = -1;
- rv = -1;
- index = 0;
-
- while (index < clientCon->maxOsBitmaps)
- {
- if (clientCon->osBitmaps[index].used == FALSE)
- {
- clientCon->osBitmaps[index].used = TRUE;
- clientCon->osBitmaps[index].pixmap = pixmap;
- clientCon->osBitmaps[index].priv = priv;
- clientCon->osBitmaps[index].stamp = clientCon->osBitmapStamp;
- clientCon->osBitmapStamp++;
- clientCon->osBitmapNumUsed++;
- rv = index;
- break;
- }
- else
- {
- if (clientCon->osBitmaps[index].stamp < oldest)
- {
- oldest = clientCon->osBitmaps[index].stamp;
- oldest_index = index;
- }
- }
- index++;
- }
-
- if (rv == -1)
- {
- if (oldest_index == -1)
- {
- LLOGLN(0, ("rdpClientConAddOsBitmap: error"));
- }
- else
- {
- LLOGLN(10, ("rdpClientConAddOsBitmap: too many pixmaps removing "
- "oldest_index %d", oldest_index));
- rdpClientConRemoveOsBitmap(dev, clientCon, oldest_index);
- rdpClientConDeleteOsSurface(dev, clientCon, oldest_index);
- clientCon->osBitmaps[oldest_index].used = TRUE;
- clientCon->osBitmaps[oldest_index].pixmap = pixmap;
- clientCon->osBitmaps[oldest_index].priv = priv;
- clientCon->osBitmaps[oldest_index].stamp = clientCon->osBitmapStamp;
- clientCon->osBitmapStamp++;
- clientCon->osBitmapNumUsed++;
- rv = oldest_index;
- }
- }
-
- if (rv < 0)
- {
- LLOGLN(10, ("rdpClientConAddOsBitmap: test error 3"));
- return rv;
- }
-
- clientCon->osBitmapAllocSize += this_bytes;
- LLOGLN(10, ("rdpClientConAddOsBitmap: this_bytes %d "
- "clientCon->osBitmapAllocSize %d",
- this_bytes, clientCon->osBitmapAllocSize));
-#if USE_MAX_OS_BYTES
- while (clientCon->osBitmapAllocSize > MAX_OS_BYTES)
- {
- LLOGLN(10, ("rdpClientConAddOsBitmap: must delete "
- "clientCon->osBitmapNumUsed %d",
- clientCon->osBitmapNumUsed));
- /* find oldest */
- oldest = 0x7fffffff;
- oldest_index = -1;
- index = 0;
- while (index < clientCon->maxOsBitmaps)
- {
- if (clientCon->osBitmaps[index].used &&
- (clientCon->osBitmaps[index].stamp < oldest))
- {
- oldest = clientCon->osBitmaps[index].stamp;
- oldest_index = index;
- }
- index++;
- }
- if (oldest_index == -1)
- {
- LLOGLN(0, ("rdpClientConAddOsBitmap: error 1"));
- break;
- }
- if (oldest_index == rv)
- {
- LLOGLN(0, ("rdpClientConAddOsBitmap: error 2"));
- break;
- }
- rdpClientConRemoveOsBitmap(dev, clientCon, oldest_index);
- rdpClientConDeleteOsSurface(dev, clientCon, oldest_index);
- }
-#endif
- LLOGLN(10, ("rdpClientConAddOsBitmap: new bitmap index %d", rv));
- LLOGLN(10, ("rdpClientConAddOsBitmap: clientCon->osBitmapNumUsed %d "
- "clientCon->osBitmapStamp 0x%8.8x",
- clientCon->osBitmapNumUsed, clientCon->osBitmapStamp));
- return rv;
-}
-
-/*****************************************************************************/
-int
-rdpClientConRemoveOsBitmap(rdpPtr dev, rdpClientCon *clientCon, int rdpindex)
-{
- PixmapPtr pixmap;
- rdpPixmapPtr priv;
- int this_bytes;
-
- if (clientCon->osBitmaps == NULL)
- {
- LLOGLN(10, ("rdpClientConRemoveOsBitmap: test error 1"));
- return 1;
- }
-
- LLOGLN(10, ("rdpClientConRemoveOsBitmap: index %d stamp %d",
- rdpindex, clientCon->osBitmaps[rdpindex].stamp));
-
- if ((rdpindex < 0) && (rdpindex >= clientCon->maxOsBitmaps))
- {
- LLOGLN(10, ("rdpClientConRemoveOsBitmap: test error 2"));
- return 1;
- }
-
- if (clientCon->osBitmaps[rdpindex].used)
- {
- pixmap = clientCon->osBitmaps[rdpindex].pixmap;
- priv = clientCon->osBitmaps[rdpindex].priv;
- rdpDrawItemRemoveAll(dev, priv);
- this_bytes = pixmap->devKind * pixmap->drawable.height;
- clientCon->osBitmapAllocSize -= this_bytes;
- LLOGLN(10, ("rdpClientConRemoveOsBitmap: this_bytes %d "
- "clientCon->osBitmapAllocSize %d", this_bytes,
- clientCon->osBitmapAllocSize));
- clientCon->osBitmaps[rdpindex].used = 0;
- clientCon->osBitmaps[rdpindex].pixmap = 0;
- clientCon->osBitmaps[rdpindex].priv = 0;
- clientCon->osBitmapNumUsed--;
- priv->status = 0;
- priv->con_number = 0;
- priv->use_count = 0;
- }
- else
- {
- LLOGLN(0, ("rdpup_remove_os_bitmap: error"));
- }
-
- LLOGLN(10, ("rdpup_remove_os_bitmap: clientCon->osBitmapNumUsed %d",
- clientCon->osBitmapNumUsed));
- return 0;
-}
-
-/*****************************************************************************/
-int
-rdpClientConUpdateOsUse(rdpPtr dev, rdpClientCon *clientCon, int rdpindex)
-{
- if (clientCon->osBitmaps == NULL)
- {
- return 1;
- }
-
- LLOGLN(10, ("rdpClientConUpdateOsUse: index %d stamp %d",
- rdpindex, clientCon->osBitmaps[rdpindex].stamp));
-
- if ((rdpindex < 0) && (rdpindex >= clientCon->maxOsBitmaps))
- {
- return 1;
- }
-
- if (clientCon->osBitmaps[rdpindex].used)
- {
- clientCon->osBitmaps[rdpindex].stamp = clientCon->osBitmapStamp;
- clientCon->osBitmapStamp++;
- }
- else
- {
- LLOGLN(0, ("rdpClientConUpdateOsUse: error rdpindex %d", rdpindex));
- }
-
- return 0;
-}
-
-/******************************************************************************/
-static CARD32
-rdpClientConDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
-{
- rdpPtr dev;
- rdpClientCon *clientCon;
-
- LLOGLN(10, ("rdpClientConDeferredUpdateCallback"));
-
- dev = (rdpPtr) arg;
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- if (dev->do_dirty_ons)
- {
- if (clientCon->rectId == clientCon->rectIdAck)
- {
- rdpClientConCheckDirtyScreen(dev, clientCon);
- }
- else
- {
- LLOGLN(0, ("rdpClientConDeferredUpdateCallback: skipping"));
- }
- }
- else
- {
- rdpClientConSendPending(dev, clientCon);
- }
- clientCon = clientCon->next;
- }
- dev->sendUpdateScheduled = FALSE;
- return 0;
-}
-
-/******************************************************************************/
-void
-rdpClientConScheduleDeferredUpdate(rdpPtr dev)
-{
- if (dev->sendUpdateScheduled == FALSE)
- {
- dev->sendUpdateScheduled = TRUE;
- dev->sendUpdateTimer =
- TimerSet(dev->sendUpdateTimer, 0, 40,
- rdpClientConDeferredUpdateCallback, dev);
- }
-}
-
-/******************************************************************************/
-int
-rdpClientConCheckDirtyScreen(rdpPtr dev, rdpClientCon *clientCon)
-{
- return 0;
-}
-
-/******************************************************************************/
-static int
-rdpClientConSendPaintRectShmEx(rdpPtr dev, rdpClientCon *clientCon,
- struct image_data *id,
- RegionPtr dirtyReg,
- BoxPtr copyRects, int numCopyRects)
-{
- int index;
- int size;
- int num_rects_d;
- int num_rects_c;
- short x;
- short y;
- short cx;
- short cy;
- struct stream *s;
- BoxRec box;
-
- rdpClientConBeginUpdate(dev, clientCon);
-
- num_rects_d = REGION_NUM_RECTS(dirtyReg);
- num_rects_c = numCopyRects;
- if ((num_rects_c < 1) || (num_rects_d < 1))
- {
- LLOGLN(0, ("rdpClientConSendPaintRectShmEx: nothing to send"));
- return 0;
- }
- size = 2 + 2 + 2 + num_rects_d * 8 + 2 + num_rects_c * 8;
- size += 4 + 4 + 4 + 4 + 2 + 2;
- rdpClientConPreCheck(dev, clientCon, size);
-
- s = clientCon->out_s;
- out_uint16_le(s, 61);
- out_uint16_le(s, size);
- clientCon->count++;
-
- out_uint16_le(s, num_rects_d);
- for (index = 0; index < num_rects_d; index++)
- {
- box = REGION_RECTS(dirtyReg)[index];
- x = box.x1;
- y = box.y1;
- cx = box.x2 - box.x1;
- cy = box.y2 - box.y1;
- out_uint16_le(s, x);
- out_uint16_le(s, y);
- out_uint16_le(s, cx);
- out_uint16_le(s, cy);
- }
-
- out_uint16_le(s, num_rects_c);
- for (index = 0; index < num_rects_c; index++)
- {
- box = copyRects[index];
- x = box.x1;
- y = box.y1;
- cx = box.x2 - box.x1;
- cy = box.y2 - box.y1;
- out_uint16_le(s, x);
- out_uint16_le(s, y);
- out_uint16_le(s, cx);
- out_uint16_le(s, cy);
- }
-
- out_uint32_le(s, 0);
- clientCon->rect_id++;
- out_uint32_le(s, clientCon->rect_id);
- out_uint32_le(s, id->shmem_id);
- out_uint32_le(s, id->shmem_offset);
- out_uint16_le(s, clientCon->cap_width);
- out_uint16_le(s, clientCon->cap_height);
-
- rdpClientConEndUpdate(dev, clientCon);
-
- return 0;
-}
-
-/******************************************************************************/
-static CARD32
-rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
-{
- rdpClientCon *clientCon;
- BoxPtr rects;
- int num_rects;
- struct image_data id;
-
- LLOGLN(10, ("rdpDeferredUpdateCallback:"));
- clientCon = (rdpClientCon *) arg;
-
- if ((clientCon->rect_id > clientCon->rect_id_ack) ||
- /* do not allow captures until we have the client_info */
- clientCon->client_info.size == 0)
- {
- LLOGLN(0, ("rdpDeferredUpdateCallback: reschedual rect_id %d "
- "rect_id_ack %d",
- clientCon->rect_id, clientCon->rect_id_ack));
- clientCon->updateTimer = TimerSet(clientCon->updateTimer, 0, 40,
- rdpDeferredUpdateCallback,
- clientCon);
- return 0;
- }
- else
- {
- LLOGLN(10, ("rdpDeferredUpdateCallback: sending"));
- }
- rdpClientConGetScreenImageRect(clientCon->dev, clientCon, &id);
- LLOGLN(10, ("rdpDeferredUpdateCallback: rdp_width %d rdp_height %d "
- "rdp_Bpp %d screen width %d screen height %d",
- clientCon->rdp_width, clientCon->rdp_height, clientCon->rdp_Bpp,
- id.width, id.height));
- clientCon->updateSchedualed = FALSE;
- rects = 0;
- num_rects = 0;
- LLOGLN(10, ("rdpDeferredUpdateCallback: capture_code %d",
- clientCon->client_info.capture_code));
- if (rdpCapture(clientCon, clientCon->dirtyRegion, &rects, &num_rects,
- id.pixels, id.width, id.height,
- id.lineBytes, XRDP_a8r8g8b8, id.shmem_pixels,
- clientCon->cap_width, clientCon->cap_height,
- clientCon->cap_width * clientCon->rdp_Bpp,
- clientCon->rdp_format, clientCon->client_info.capture_code))
- {
- LLOGLN(10, ("rdpDeferredUpdateCallback: num_rects %d", num_rects));
- rdpClientConSendPaintRectShmEx(clientCon->dev, clientCon, &id,
- clientCon->dirtyRegion,
- rects, num_rects);
- g_free(rects);
- }
- else
- {
- LLOGLN(0, ("rdpDeferredUpdateCallback: rdpCapture failed"));
- }
- rdpRegionDestroy(clientCon->dirtyRegion);
- clientCon->dirtyRegion = rdpRegionCreate(NullBox, 0);
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConAddDirtyScreenReg(rdpPtr dev, rdpClientCon *clientCon,
- RegionPtr reg)
-{
- LLOGLN(10, ("rdpClientConAddDirtyScreenReg:"));
-
- rdpRegionUnion(clientCon->dirtyRegion, clientCon->dirtyRegion, reg);
- if (clientCon->updateSchedualed == FALSE)
- {
- clientCon->updateTimer = TimerSet(clientCon->updateTimer, 0, 40,
- rdpDeferredUpdateCallback, clientCon);
- clientCon->updateSchedualed = TRUE;
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConAddDirtyScreenBox(rdpPtr dev, rdpClientCon *clientCon,
- BoxPtr box)
-{
- RegionPtr reg;
-
- reg = rdpRegionCreate(box, 0);
- rdpClientConAddDirtyScreenReg(dev, clientCon, reg);
- rdpRegionDestroy(reg);
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConAddDirtyScreen(rdpPtr dev, rdpClientCon *clientCon,
- int x, int y, int cx, int cy)
-{
- BoxRec box;
-
- box.x1 = x;
- box.y1 = y;
- box.x2 = box.x1 + cx;
- box.y2 = box.y1 + cy;
- rdpClientConAddDirtyScreenBox(dev, clientCon, &box);
- return 0;
-}
-
-/******************************************************************************/
-void
-rdpClientConGetScreenImageRect(rdpPtr dev, rdpClientCon *clientCon,
- struct image_data *id)
-{
- id->width = dev->width;
- id->height = dev->height;
- id->bpp = clientCon->rdp_bpp;
- id->Bpp = clientCon->rdp_Bpp;
- id->lineBytes = dev->paddedWidthInBytes;
- id->pixels = dev->pfbMemory;
- id->shmem_pixels = clientCon->shmemptr;
- id->shmem_id = clientCon->shmemid;
- id->shmem_offset = 0;
- id->shmem_lineBytes = clientCon->shmem_lineBytes;
-}
-
-/******************************************************************************/
-void
-rdpClientConGetPixmapImageRect(rdpPtr dev, rdpClientCon *clientCon,
- PixmapPtr pPixmap, struct image_data *id)
-{
- id->width = pPixmap->drawable.width;
- id->height = pPixmap->drawable.height;
- id->bpp = clientCon->rdp_bpp;
- id->Bpp = clientCon->rdp_Bpp;
- id->lineBytes = pPixmap->devKind;
- id->pixels = (char *)(pPixmap->devPrivate.ptr);
- id->shmem_pixels = 0;
- id->shmem_id = 0;
- id->shmem_offset = 0;
- id->shmem_lineBytes = 0;
-}
-
-/******************************************************************************/
-void
-rdpClientConSendArea(rdpPtr dev, rdpClientCon *clientCon,
- struct image_data *id, int x, int y, int w, int h)
-{
- struct image_data lid;
- BoxRec box;
- int ly;
- int size;
- char *src;
- char *dst;
- struct stream *s;
-
- LLOGLN(10, ("rdpClientConSendArea: id %p x %d y %d w %d h %d", id, x, y, w, h));
-
- if (id == NULL)
- {
- rdpClientConGetScreenImageRect(dev, clientCon, &lid);
- id = &lid;
- }
-
- if (x >= id->width)
- {
- return;
- }
-
- if (y >= id->height)
- {
- return;
- }
-
- if (x < 0)
- {
- w += x;
- x = 0;
- }
-
- if (y < 0)
- {
- h += y;
- y = 0;
- }
-
- if (w <= 0)
- {
- return;
- }
-
- if (h <= 0)
- {
- return;
- }
-
- if (x + w > id->width)
- {
- w = id->width - x;
- }
-
- if (y + h > id->height)
- {
- h = id->height - y;
- }
-
- if (clientCon->connected && clientCon->begin)
- {
- if (id->shmem_pixels != 0)
- {
- LLOGLN(10, ("rdpClientConSendArea: using shmem"));
- box.x1 = x;
- box.y1 = y;
- box.x2 = box.x1 + w;
- box.y2 = box.y1 + h;
- src = id->pixels;
- src += y * id->lineBytes;
- src += x * dev->Bpp;
- dst = id->shmem_pixels + id->shmem_offset;
- dst += y * id->shmem_lineBytes;
- dst += x * clientCon->rdp_Bpp;
- ly = y;
- while (ly < y + h)
- {
- rdpClientConConvertPixels(dev, clientCon, src, dst, w);
- src += id->lineBytes;
- dst += id->shmem_lineBytes;
- ly += 1;
- }
- size = 36;
- rdpClientConPreCheck(dev, clientCon, size);
- s = clientCon->out_s;
- out_uint16_le(s, 60);
- out_uint16_le(s, size);
- clientCon->count++;
- LLOGLN(10, ("rdpClientConSendArea: 2 x %d y %d w %d h %d", x, y, w, h));
- out_uint16_le(s, x);
- out_uint16_le(s, y);
- out_uint16_le(s, w);
- out_uint16_le(s, h);
- out_uint32_le(s, 0);
- clientCon->rect_id++;
- out_uint32_le(s, clientCon->rect_id);
- out_uint32_le(s, id->shmem_id);
- out_uint32_le(s, id->shmem_offset);
- out_uint16_le(s, id->width);
- out_uint16_le(s, id->height);
- out_uint16_le(s, x);
- out_uint16_le(s, y);
- rdpRegionUnionRect(clientCon->shmRegion, &box);
- return;
- }
- }
-}
-
-/******************************************************************************/
-int
-rdpClientConAddAllReg(rdpPtr dev, RegionPtr reg, DrawablePtr pDrawable)
-{
- rdpClientCon *clientCon;
- Bool drw_is_vis;
-
- drw_is_vis = XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable);
- if (!drw_is_vis)
- {
- return 0;
- }
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- rdpClientConAddDirtyScreenReg(dev, clientCon, reg);
- clientCon = clientCon->next;
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpClientConAddAllBox(rdpPtr dev, BoxPtr box, DrawablePtr pDrawable)
-{
- rdpClientCon *clientCon;
- Bool drw_is_vis;
-
- drw_is_vis = XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable);
- if (!drw_is_vis)
- {
- return 0;
- }
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- rdpClientConAddDirtyScreenBox(dev, clientCon, box);
- clientCon = clientCon->next;
- }
- return 0;
-}
diff --git a/xorg/server/module/rdpClientCon.h b/xorg/server/module/rdpClientCon.h
deleted file mode 100644
index 954e3ab0..00000000
--- a/xorg/server/module/rdpClientCon.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Client connection to xrdp
-
-*/
-
-#include
-#include
-#include
-
-/* in xrdp/common */
-#include "xrdp_client_info.h"
-#include "xrdp_constants.h"
-
-#ifndef _RDPCLIENTCON_H
-#define _RDPCLIENTCON_H
-
-/* used in rdpGlyphs.c */
-struct font_cache
-{
- int offset;
- int baseline;
- int width;
- int height;
- int crc;
- int stamp;
-};
-
-struct rdpup_os_bitmap
-{
- int used;
- PixmapPtr pixmap;
- rdpPixmapPtr priv;
- int stamp;
-};
-
-/* one of these for each client */
-struct _rdpClientCon
-{
- rdpPtr dev;
-
- int sck;
- int sckControlListener;
- int sckControl;
- struct stream *out_s;
- struct stream *in_s;
-
- int rectIdAck;
- int rectId;
- int connected; /* boolean */
- int begin; /* boolean */
- int count;
- int sckClosed; /* boolean */
- struct rdpup_os_bitmap *osBitmaps;
- int maxOsBitmaps;
- int osBitmapStamp;
- int osBitmapAllocSize;
- int osBitmapNumUsed;
- int doComposite;
- int doGlyphCache;
- int canDoPixToPix;
- int doMultimon;
-
- int rdp_bpp; /* client depth */
- int rdp_Bpp;
- int rdp_Bpp_mask;
- int rdp_width;
- int rdp_height;
- int rdp_format; /* XRDP_a8r8g8b8, XRDP_r5g6b5, ... */
- int cap_width;
- int cap_height;
-
- int rdpIndex; /* current os target */
-
- int conNumber;
-
- /* rdpGlyphs.c */
- struct font_cache font_cache[12][256];
- int font_stamp;
-
- struct xrdp_client_info client_info;
-
- char *shmemptr;
- int shmemid;
- int shmem_lineBytes;
- RegionPtr shmRegion;
- int rect_id;
- int rect_id_ack;
-
- OsTimerPtr updateTimer;
- int updateSchedualed; /* boolean */
-
- RegionPtr dirtyRegion;
-
- struct _rdpClientCon *next;
-};
-
-extern _X_EXPORT int
-rdpClientConBeginUpdate(rdpPtr dev, rdpClientCon *clientCon);
-extern _X_EXPORT int
-rdpClientConEndUpdate(rdpPtr dev, rdpClientCon *clientCon);
-extern _X_EXPORT int
-rdpClientConSetFgcolor(rdpPtr dev, rdpClientCon *clientCon, int fgcolor);
-extern _X_EXPORT void
-rdpClientConSendArea(rdpPtr dev, rdpClientCon *clientCon,
- struct image_data *id, int x, int y, int w, int h);
-extern _X_EXPORT int
-rdpClientConFillRect(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, int cx, int cy);
-extern _X_EXPORT int
-rdpClientConCheck(ScreenPtr pScreen);
-extern _X_EXPORT int
-rdpClientConInit(rdpPtr dev);
-extern _X_EXPORT int
-rdpClientConDeinit(rdpPtr dev);
-
-extern _X_EXPORT int
-rdpClientConDeleteOsSurface(rdpPtr dev, rdpClientCon *clientCon, int rdpindex);
-
-extern _X_EXPORT int
-rdpClientConRemoveOsBitmap(rdpPtr dev, rdpClientCon *clientCon, int rdpindex);
-
-extern _X_EXPORT void
-rdpClientConScheduleDeferredUpdate(rdpPtr dev);
-extern _X_EXPORT int
-rdpClientConCheckDirtyScreen(rdpPtr dev, rdpClientCon *clientCon);
-extern _X_EXPORT int
-rdpClientConAddDirtyScreenReg(rdpPtr dev, rdpClientCon *clientCon,
- RegionPtr reg);
-extern _X_EXPORT int
-rdpClientConAddDirtyScreenBox(rdpPtr dev, rdpClientCon *clientCon,
- BoxPtr box);
-extern _X_EXPORT int
-rdpClientConAddDirtyScreen(rdpPtr dev, rdpClientCon *clientCon,
- int x, int y, int cx, int cy);
-extern _X_EXPORT void
-rdpClientConGetScreenImageRect(rdpPtr dev, rdpClientCon *clientCon,
- struct image_data *id);
-extern _X_EXPORT int
-rdpClientConAddAllReg(rdpPtr dev, RegionPtr reg, DrawablePtr pDrawable);
-extern _X_EXPORT int
-rdpClientConAddAllBox(rdpPtr dev, BoxPtr box, DrawablePtr pDrawable);
-extern _X_EXPORT int
-rdpClientConSetCursor(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, char *cur_data, char *cur_mask);
-extern _X_EXPORT int
-rdpClientConSetCursorEx(rdpPtr dev, rdpClientCon *clientCon,
- short x, short y, char *cur_data,
- char *cur_mask, int bpp);
-
-#endif
diff --git a/xorg/server/module/rdpComposite.c b/xorg/server/module/rdpComposite.c
deleted file mode 100644
index 8c65ff1b..00000000
--- a/xorg/server/module/rdpComposite.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-composite(alpha blending) calls
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "mipict.h"
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpComposite.h"
-
-/******************************************************************************/
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpCompositeOrg(PictureScreenPtr ps, rdpPtr dev,
- CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
- INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
- INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
-{
- ps->Composite = dev->Composite;
- ps->Composite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
- xDst, yDst, width, height);
- ps->Composite = rdpComposite;
-}
-
-/******************************************************************************/
-void
-rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
- INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst,
- INT16 yDst, CARD16 width, CARD16 height)
-{
- ScreenPtr pScreen;
- rdpPtr dev;
- PictureScreenPtr ps;
- BoxRec box;
- RegionRec reg;
-
- LLOGLN(10, ("rdpComposite:"));
- pScreen = pDst->pDrawable->pScreen;
- dev = rdpGetDevFromScreen(pScreen);
- dev->counts.rdpCompositeCallCount++;
- box.x1 = xDst + pDst->pDrawable->x;
- box.y1 = yDst + pDst->pDrawable->y;
- box.x2 = box.x1 + width;
- box.y2 = box.y1 + height;
- rdpRegionInit(®, &box, 0);
- if (pDst->pCompositeClip != NULL)
- {
- rdpRegionIntersect(®, pDst->pCompositeClip, ®);
- }
- ps = GetPictureScreen(pScreen);
- /* do original call */
- rdpCompositeOrg(ps, dev, op, pSrc, pMask, pDst, xSrc, ySrc,
- xMask, yMask, xDst, yDst, width, height);
- rdpClientConAddAllReg(dev, ®, pDst->pDrawable);
- rdpRegionUninit(®);
-}
diff --git a/xorg/server/module/rdpComposite.h b/xorg/server/module/rdpComposite.h
deleted file mode 100644
index 1c052ed8..00000000
--- a/xorg/server/module/rdpComposite.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-composite(alpha blending) calls
-
-*/
-
-#ifndef _RDPCOMPOSITE_H
-#define _RDPCOMPOSITE_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
- INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst,
- INT16 yDst, CARD16 width, CARD16 height);
-
-#endif
diff --git a/xorg/server/module/rdpCopyArea.c b/xorg/server/module/rdpCopyArea.c
deleted file mode 100644
index f135af6e..00000000
--- a/xorg/server/module/rdpCopyArea.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpCopyArea.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static RegionPtr
-rdpCopyAreaOrg(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- int srcx, int srcy, int w, int h, int dstx, int dsty)
-{
- GC_OP_VARS;
- RegionPtr rv;
-
- GC_OP_PROLOGUE(pGC);
- rv = pGC->ops->CopyArea(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
- GC_OP_EPILOGUE(pGC);
- return rv;
-}
-
-/******************************************************************************/
-RegionPtr
-rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- int srcx, int srcy, int w, int h, int dstx, int dsty)
-{
- rdpPtr dev;
- RegionPtr rv;
- RegionRec clip_reg;
- RegionRec reg;
- int cd;
- BoxRec box;
-
- LLOGLN(10, ("rdpCopyArea:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpCopyAreaCallCount++;
- box.x1 = dstx + pDst->x;
- box.y1 = dsty + pDst->y;
- box.x2 = box.x1 + w;
- box.y2 = box.y1 + h;
- rdpRegionInit(®, &box, 0);
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDst, pGC);
- LLOGLN(10, ("rdpCopyArea: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rv = rdpCopyAreaOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDst);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
- return rv;
-}
diff --git a/xorg/server/module/rdpCopyArea.h b/xorg/server/module/rdpCopyArea.h
deleted file mode 100644
index 881a8714..00000000
--- a/xorg/server/module/rdpCopyArea.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2005-2013 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPCOPYAREA_H
-#define __RDPCOPYAREA_H
-
-#include
-#include
-#include
-
-RegionPtr
-rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- int srcx, int srcy, int w, int h, int dstx, int dsty);
-
-#endif
diff --git a/xorg/server/module/rdpCopyPlane.c b/xorg/server/module/rdpCopyPlane.c
deleted file mode 100644
index 3ce3d558..00000000
--- a/xorg/server/module/rdpCopyPlane.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpCopyPlane.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static RegionPtr
-rdpCopyPlaneOrg(DrawablePtr pSrc, DrawablePtr pDst,
- GCPtr pGC, int srcx, int srcy, int w, int h,
- int dstx, int dsty, unsigned long bitPlane)
-{
- GC_OP_VARS;
- RegionPtr rv;
-
- GC_OP_PROLOGUE(pGC);
- rv = pGC->ops->CopyPlane(pSrc, pDst, pGC, srcx, srcy,
- w, h, dstx, dsty, bitPlane);
- GC_OP_EPILOGUE(pGC);
- return rv;
-}
-
-/******************************************************************************/
-RegionPtr
-rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
- GCPtr pGC, int srcx, int srcy, int w, int h,
- int dstx, int dsty, unsigned long bitPlane)
-{
- RegionPtr rv;
- rdpPtr dev;
- RegionRec clip_reg;
- RegionRec reg;
- int cd;
- BoxRec box;
-
- LLOGLN(10, ("rdpCopyPlane:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpCopyPlaneCallCount++;
- box.x1 = pDst->x + dstx;
- box.y1 = pDst->y + dsty;
- box.x2 = box.x1 + w;
- box.y2 = box.x1 + h;
- rdpRegionInit(®, &box, 0);
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDst, pGC);
- LLOGLN(10, ("rdpCopyPlane: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rv = rdpCopyPlaneOrg(pSrc, pDst, pGC, srcx, srcy, w, h,
- dstx, dsty, bitPlane);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDst);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
- return rv;
-}
diff --git a/xorg/server/module/rdpCopyPlane.h b/xorg/server/module/rdpCopyPlane.h
deleted file mode 100644
index 66b372c9..00000000
--- a/xorg/server/module/rdpCopyPlane.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPCOPYPLANE_H
-#define __RDPCOPYPLANE_H
-
-#include
-#include
-#include
-
-RegionPtr
-rdpCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
- GCPtr pGC, int srcx, int srcy, int width, int height,
- int dstx, int dsty, unsigned long bitPlane);
-
-#endif
diff --git a/xorg/server/module/rdpCursor.c b/xorg/server/module/rdpCursor.c
deleted file mode 100644
index f85999de..00000000
--- a/xorg/server/module/rdpCursor.c
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-cursor
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-#include "rdp.h"
-#include "rdpMain.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpCursor.h"
-
-#ifndef X_BYTE_ORDER
-#warning X_BYTE_ORDER not defined
-#endif
-
-#if (X_BYTE_ORDER == X_LITTLE_ENDIAN)
-/* Copied from Xvnc/lib/font/util/utilbitmap.c */
-static unsigned char g_reverse_byte[0x100] =
-{
- 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
- 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
- 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
- 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
- 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
- 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
- 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
- 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
- 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
- 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
- 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
- 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
- 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
- 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
- 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
- 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
- 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
- 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
- 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
- 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
- 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
- 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
- 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
- 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
- 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
- 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
- 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
- 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
- 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
- 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
- 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
- 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
-};
-#endif
-
-/******************************************************************************/
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-Bool
-rdpSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs)
-{
- LLOGLN(10, ("rdpSpriteRealizeCursor:"));
- return TRUE;
-}
-
-/******************************************************************************/
-Bool
-rdpSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs)
-{
- LLOGLN(10, ("rdpSpriteUnrealizeCursor:"));
- return TRUE;
-}
-
-/******************************************************************************/
-static int
-get_pixel_safe(char *data, int x, int y, int width, int height, int bpp)
-{
- int start;
- int shift;
- int c;
- unsigned int *src32;
-
- if (x < 0)
- {
- return 0;
- }
-
- if (y < 0)
- {
- return 0;
- }
-
- if (x >= width)
- {
- return 0;
- }
-
- if (y >= height)
- {
- return 0;
- }
-
- if (bpp == 1)
- {
- width = (width + 7) / 8;
- start = (y * width) + x / 8;
- shift = x % 8;
- c = (unsigned char)(data[start]);
-#if (X_BYTE_ORDER == X_LITTLE_ENDIAN)
- return (g_reverse_byte[c] & (0x80 >> shift)) != 0;
-#else
- return (c & (0x80 >> shift)) != 0;
-#endif
- }
- else if (bpp == 32)
- {
- src32 = (unsigned int*)data;
- return src32[y * width + x];
- }
-
- return 0;
-}
-
-/******************************************************************************/
-static void
-set_pixel_safe(char *data, int x, int y, int width, int height, int bpp,
- int pixel)
-{
- int start;
- int shift;
- unsigned int *dst32;
-
- if (x < 0)
- {
- return;
- }
-
- if (y < 0)
- {
- return;
- }
-
- if (x >= width)
- {
- return;
- }
-
- if (y >= height)
- {
- return;
- }
-
- if (bpp == 1)
- {
- width = (width + 7) / 8;
- start = (y * width) + x / 8;
- shift = x % 8;
-
- if (pixel & 1)
- {
- data[start] = data[start] | (0x80 >> shift);
- }
- else
- {
- data[start] = data[start] & ~(0x80 >> shift);
- }
- }
- else if (bpp == 24)
- {
- *(data + (3 * (y * width + x)) + 0) = pixel >> 0;
- *(data + (3 * (y * width + x)) + 1) = pixel >> 8;
- *(data + (3 * (y * width + x)) + 2) = pixel >> 16;
- }
- else if (bpp == 32)
- {
- dst32 = (unsigned int*)data;
- dst32[y * width + x] = pixel;
- }
-}
-
-/******************************************************************************/
-void
-rdpSpriteSetCursorCon(rdpClientCon *clientCon,
- DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs,
- int x, int y)
-{
- char cur_data[32 * (32 * 4)];
- char cur_mask[32 * (32 / 8)];
- char *mask;
- char *data;
- int i;
- int j;
- int w;
- int h;
- int p;
- int xhot;
- int yhot;
- int paddedRowBytes;
- int fgcolor;
- int bgcolor;
- int bpp;
-
- LLOGLN(10, ("rdpSpriteSetCursorCon:"));
-
- w = pCurs->bits->width;
- h = pCurs->bits->height;
- if ((pCurs->bits->argb != 0) &&
- (clientCon->client_info.pointer_flags & 1))
- {
- bpp = 32;
- paddedRowBytes = PixmapBytePad(w, 32);
- xhot = pCurs->bits->xhot;
- yhot = pCurs->bits->yhot;
- data = (char *)(pCurs->bits->argb);
- memset(cur_data, 0, sizeof(cur_data));
- memset(cur_mask, 0, sizeof(cur_mask));
-
- for (j = 0; j < 32; j++)
- {
- for (i = 0; i < 32; i++)
- {
- p = get_pixel_safe(data, i, j, paddedRowBytes / 4, h, 32);
- set_pixel_safe(cur_data, i, 31 - j, 32, 32, 32, p);
- }
- }
- }
- else
- {
- bpp = 0;
- paddedRowBytes = PixmapBytePad(w, 1);
- xhot = pCurs->bits->xhot;
- yhot = pCurs->bits->yhot;
- data = (char *)(pCurs->bits->source);
- mask = (char *)(pCurs->bits->mask);
- fgcolor = (((pCurs->foreRed >> 8) & 0xff) << 16) |
- (((pCurs->foreGreen >> 8) & 0xff) << 8) |
- ((pCurs->foreBlue >> 8) & 0xff);
- bgcolor = (((pCurs->backRed >> 8) & 0xff) << 16) |
- (((pCurs->backGreen >> 8) & 0xff) << 8) |
- ((pCurs->backBlue >> 8) & 0xff);
- memset(cur_data, 0, sizeof(cur_data));
- memset(cur_mask, 0, sizeof(cur_mask));
-
- for (j = 0; j < 32; j++)
- {
- for (i = 0; i < 32; i++)
- {
- p = get_pixel_safe(mask, i, j, paddedRowBytes * 8, h, 1);
- set_pixel_safe(cur_mask, i, 31 - j, 32, 32, 1, !p);
-
- if (p != 0)
- {
- p = get_pixel_safe(data, i, j, paddedRowBytes * 8, h, 1);
- p = p ? fgcolor : bgcolor;
- set_pixel_safe(cur_data, i, 31 - j, 32, 32, 24, p);
- }
- }
- }
- }
-
- rdpClientConBeginUpdate(clientCon->dev, clientCon);
- rdpClientConSetCursorEx(clientCon->dev, clientCon, xhot, yhot,
- cur_data, cur_mask, bpp);
- rdpClientConEndUpdate(clientCon->dev, clientCon);
-
-}
-
-/******************************************************************************/
-void
-rdpSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs,
- int x, int y)
-{
- rdpPtr dev;
- rdpClientCon *clientCon;
-
- LLOGLN(10, ("rdpSpriteSetCursor:"));
- if (pCurs == 0)
- {
- return;
- }
-
- if (pCurs->bits == 0)
- {
- return;
- }
-
- dev = rdpGetDevFromScreen(pScr);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- rdpSpriteSetCursorCon(clientCon, pDev, pScr, pCurs, x, y);
- clientCon = clientCon->next;
- }
-}
-
-/******************************************************************************/
-void
-rdpSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScr, int x, int y)
-{
- LLOGLN(10, ("rdpSpriteMoveCursor:"));
-}
-
-/******************************************************************************/
-Bool
-rdpSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScr)
-{
- LLOGLN(10, ("rdpSpriteDeviceCursorInitialize:"));
- return TRUE;
-}
-
-/******************************************************************************/
-void
-rdpSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr)
-{
- LLOGLN(10, ("rdpSpriteDeviceCursorCleanup:"));
- xorgxrdpDownDown(pScr);
-}
diff --git a/xorg/server/module/rdpCursor.h b/xorg/server/module/rdpCursor.h
deleted file mode 100644
index 1be09f61..00000000
--- a/xorg/server/module/rdpCursor.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-misc draw calls
-
-*/
-
-#ifndef __RDPCURSOR_H
-#define __RDPCURSOR_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT Bool
-rdpSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs);
-extern _X_EXPORT Bool
-rdpSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs);
-extern _X_EXPORT void
-rdpSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs,
- int x, int y);
-extern _X_EXPORT void
-rdpSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScr, int x, int y);
-extern _X_EXPORT Bool
-rdpSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScr);
-extern _X_EXPORT void
-rdpSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr);
-
-#endif
diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c
deleted file mode 100644
index b4e689af..00000000
--- a/xorg/server/module/rdpDraw.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-misc draw calls
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpMisc.h"
-#include "rdpGlyphs.h"
-#include "rdpReg.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-/* return 0, draw nothing */
-/* return 1, draw with no clip */
-/* return 2, draw using clip */
-int
-rdpDrawGetClip(rdpPtr dev, RegionPtr pRegion, DrawablePtr pDrawable, GCPtr pGC)
-{
- WindowPtr pWindow;
- RegionPtr temp;
- BoxRec box;
- int rv;
-
- rv = 0;
-
- if (pDrawable->type == DRAWABLE_PIXMAP)
- {
- switch (pGC->clientClipType)
- {
- case CT_NONE:
- rv = 1;
- break;
- case CT_REGION:
- rv = 2;
- rdpRegionCopy(pRegion, pGC->clientClip);
- break;
- default:
- LLOGLN(0, ("rdpDrawGetClip: unimp clip type %d",
- pGC->clientClipType));
- break;
- }
-
- if (rv == 2) /* check if the clip is the entire pixmap */
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pDrawable->width;
- box.y2 = pDrawable->height;
-
- if (rdpRegionContainsRect(pRegion, &box) == rgnIN)
- {
- rv = 1;
- }
- }
- }
- else if (pDrawable->type == DRAWABLE_WINDOW)
- {
- pWindow = (WindowPtr)pDrawable;
-
- if (pWindow->viewable)
- {
- if (pGC->subWindowMode == IncludeInferiors)
- {
- temp = &pWindow->borderClip;
- }
- else
- {
- temp = &pWindow->clipList;
- }
-
- if (rdpRegionNotEmpty(temp))
- {
- switch (pGC->clientClipType)
- {
- case CT_NONE:
- rv = 2;
- rdpRegionCopy(pRegion, temp);
- break;
- case CT_REGION:
- rv = 2;
- rdpRegionCopy(pRegion, pGC->clientClip);
- rdpRegionTranslate(pRegion,
- pDrawable->x + pGC->clipOrg.x,
- pDrawable->y + pGC->clipOrg.y);
- rdpRegionIntersect(pRegion, pRegion, temp);
- break;
- default:
- LLOGLN(0, ("rdpDrawGetClip: unimp clip type %d",
- pGC->clientClipType));
- break;
- }
-
- if (rv == 2) /* check if the clip is the entire screen */
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = dev->width;
- box.y2 = dev->height;
-
- if (rdpRegionContainsRect(pRegion, &box) == rgnIN)
- {
- rv = 1;
- }
- }
- }
- }
- }
-
- return rv;
-}
-
-/******************************************************************************/
-void
-GetTextBoundingBox(DrawablePtr pDrawable, FontPtr font, int x, int y,
- int n, BoxPtr pbox)
-{
- int maxAscent;
- int maxDescent;
- int maxCharWidth;
-
- if (FONTASCENT(font) > FONTMAXBOUNDS(font, ascent))
- {
- maxAscent = FONTASCENT(font);
- }
- else
- {
- maxAscent = FONTMAXBOUNDS(font, ascent);
- }
-
- if (FONTDESCENT(font) > FONTMAXBOUNDS(font, descent))
- {
- maxDescent = FONTDESCENT(font);
- }
- else
- {
- maxDescent = FONTMAXBOUNDS(font, descent);
- }
-
- if (FONTMAXBOUNDS(font, rightSideBearing) >
- FONTMAXBOUNDS(font, characterWidth))
- {
- maxCharWidth = FONTMAXBOUNDS(font, rightSideBearing);
- }
- else
- {
- maxCharWidth = FONTMAXBOUNDS(font, characterWidth);
- }
-
- pbox->x1 = pDrawable->x + x;
- pbox->y1 = pDrawable->y + y - maxAscent;
- pbox->x2 = pbox->x1 + maxCharWidth * n;
- pbox->y2 = pbox->y1 + maxAscent + maxDescent;
-
- if (FONTMINBOUNDS(font, leftSideBearing) < 0)
- {
- pbox->x1 += FONTMINBOUNDS(font, leftSideBearing);
- }
-}
-
-/******************************************************************************/
-int
-rdpDrawItemAdd(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di)
-{
- priv->is_alpha_dirty_not = FALSE;
-
- if (priv->draw_item_tail == NULL)
- {
- priv->draw_item_tail = di;
- priv->draw_item_head = di;
- }
- else
- {
- di->prev = priv->draw_item_tail;
- priv->draw_item_tail->next = di;
- priv->draw_item_tail = di;
- }
-
- if (priv == &(dev->screenPriv))
- {
- rdpClientConScheduleDeferredUpdate(dev);
- }
-
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpDrawItemRemove(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di)
-{
- if (di->prev != NULL)
- {
- di->prev->next = di->next;
- }
-
- if (di->next != NULL)
- {
- di->next->prev = di->prev;
- }
-
- if (priv->draw_item_head == di)
- {
- priv->draw_item_head = di->next;
- }
-
- if (priv->draw_item_tail == di)
- {
- priv->draw_item_tail = di->prev;
- }
-
- if (di->type == RDI_LINE)
- {
- if (di->u.line.segs != NULL)
- {
- g_free(di->u.line.segs);
- }
- }
-
- if (di->type == RDI_TEXT)
- {
- rdpGlyphDeleteRdpText(di->u.text.rtext);
- }
-
- rdpRegionDestroy(di->reg);
- g_free(di);
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpDrawItemRemoveAll(rdpPtr dev, rdpPixmapRec *priv)
-{
- struct rdp_draw_item *di;
-
- di = priv->draw_item_head;
-
- while (di != NULL)
- {
- rdpDrawItemRemove(dev, priv, di);
- di = priv->draw_item_head;
- }
-
- return 0;
-}
-
-/*****************************************************************************/
-void
-rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
-{
- ScreenPtr pScreen;
- rdpPtr dev;
- RegionRec reg;
- RegionRec clip;
- int dx;
- int dy;
- int num_clip_rects;
- int num_reg_rects;
- BoxPtr box;
- BoxRec box1;
-
- LLOGLN(10, ("rdpCopyWindow:"));
- pScreen = pWin->drawable.pScreen;
- dev = rdpGetDevFromScreen(pScreen);
- dev->counts.rdpCopyWindowCallCount++;
-
- rdpRegionInit(®, NullBox, 0);
- rdpRegionCopy(®, pOldRegion);
- rdpRegionInit(&clip, NullBox, 0);
- rdpRegionCopy(&clip, &pWin->borderClip);
- dx = pWin->drawable.x - ptOldOrg.x;
- dy = pWin->drawable.y - ptOldOrg.y;
-
- dev->pScreen->CopyWindow = dev->CopyWindow;
- dev->pScreen->CopyWindow(pWin, ptOldOrg, pOldRegion);
- dev->pScreen->CopyWindow = rdpCopyWindow;
-
- num_clip_rects = REGION_NUM_RECTS(&clip);
- num_reg_rects = REGION_NUM_RECTS(®);
-
- if ((num_clip_rects == 0) || (num_reg_rects == 0))
- {
- }
- else
- {
- if ((num_clip_rects > 16) || (num_reg_rects > 16))
- {
- LLOGLN(10, ("rdpCopyWindow: big list"));
- box = rdpRegionExtents(®);
- box1 = *box;
- box1.x1 += dx;
- box1.y1 += dy;
- box1.x2 += dx;
- box1.y2 += dy;
- rdpClientConAddAllBox(dev, &box1, &(pWin->drawable));
- }
- else
- {
- rdpRegionTranslate(®, dx, dy);
- rdpRegionIntersect(®, ®, &clip);
- rdpClientConAddAllReg(dev, ®, &(pWin->drawable));
- }
- }
- rdpRegionUninit(®);
- rdpRegionUninit(&clip);
-}
-
-#if XRDP_CLOSESCR == 1 /* before v1.13 */
-
-/*****************************************************************************/
-Bool
-rdpCloseScreen(int index, ScreenPtr pScreen)
-{
- rdpPtr dev;
- Bool rv;
-
- LLOGLN(0, ("rdpCloseScreen:"));
- dev = rdpGetDevFromScreen(pScreen);
- dev->pScreen->CloseScreen = dev->CloseScreen;
- rv = dev->pScreen->CloseScreen(index, pScreen);
- dev->pScreen->CloseScreen = rdpCloseScreen;
- return rv;
-}
-
-#else
-
-/*****************************************************************************/
-Bool
-rdpCloseScreen(ScreenPtr pScreen)
-{
- rdpPtr dev;
- Bool rv;
-
- LLOGLN(0, ("rdpCloseScreen:"));
- dev = rdpGetDevFromScreen(pScreen);
- dev->pScreen->CloseScreen = dev->CloseScreen;
- rv = dev->pScreen->CloseScreen(pScreen);
- dev->pScreen->CloseScreen = rdpCloseScreen;
- return rv;
-}
-
-#endif
-
-/******************************************************************************/
-WindowPtr
-rdpGetRootWindowPtr(ScreenPtr pScreen)
-{
-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 0, 0, 0)
- return WindowTable[pScreen->myNum]; /* in globals.c */
-#else
- return pScreen->root;
-#endif
-}
-
-/******************************************************************************/
-rdpPtr
-rdpGetDevFromScreen(ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn;
- rdpPtr dev;
-
- if (pScreen == NULL)
- {
- pScrn = xf86Screens[0];
- }
- else
- {
- pScrn = xf86Screens[pScreen->myNum];
- }
- dev = XRDPPTR(pScrn);
- return dev;
-}
diff --git a/xorg/server/module/rdpDraw.h b/xorg/server/module/rdpDraw.h
deleted file mode 100644
index 583ac7d1..00000000
--- a/xorg/server/module/rdpDraw.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-misc draw calls
-
-*/
-
-#ifndef __RDPDRAW_H
-#define __RDPDRAW_H
-
-#include
-#include
-#include
-
-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 13, 0, 0, 0)
-/* 1.1, 1.2, 1.3, 1.4 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12 */
-#define XRDP_CLOSESCR 1
-#else
-/* 1.13 */
-#define XRDP_CLOSESCR 2
-#endif
-
-/* true if drawable is window or pixmap is screen */
-#define XRDP_DRAWABLE_IS_VISIBLE(_dev, _drw) \
-(((_drw)->type == DRAWABLE_WINDOW && ((WindowPtr)(_drw))->viewable) || \
- ((_drw)->type == DRAWABLE_PIXMAP && \
- ((PixmapPtr)(_drw))->devPrivate.ptr == (_dev)->pfbMemory))
-
-/******************************************************************************/
-#define GC_OP_VARS rdpPtr dev; rdpGCPtr priv; GCFuncs *oldFuncs
-
-/******************************************************************************/
-#define GC_OP_PROLOGUE(_pGC) \
-do { \
- dev = rdpGetDevFromScreen((_pGC)->pScreen); \
- priv = (rdpGCPtr)rdpGetGCPrivate(_pGC, dev->privateKeyRecGC); \
- oldFuncs = (_pGC)->funcs; \
- (_pGC)->funcs = priv->funcs; \
- (_pGC)->ops = priv->ops; \
-} while (0)
-
-/******************************************************************************/
-#define GC_OP_EPILOGUE(_pGC) \
-do { \
- priv->ops = (_pGC)->ops; \
- (_pGC)->funcs = oldFuncs; \
- (_pGC)->ops = &g_rdpGCOps; \
-} while (0)
-
-extern GCOps g_rdpGCOps; /* in rdpGC.c */
-
-extern _X_EXPORT int
-rdpDrawGetClip(rdpPtr dev, RegionPtr pRegion, DrawablePtr pDrawable, GCPtr pGC);
-extern _X_EXPORT void
-GetTextBoundingBox(DrawablePtr pDrawable, FontPtr font, int x, int y,
- int n, BoxPtr pbox);
-extern _X_EXPORT int
-rdpDrawItemAdd(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di);
-extern _X_EXPORT int
-rdpDrawItemRemove(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di);
-extern _X_EXPORT int
-rdpDrawItemRemoveAll(rdpPtr dev, rdpPixmapRec *priv);
-extern _X_EXPORT void
-rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion);
-#if XRDP_CLOSESCR == 1
-extern _X_EXPORT Bool
-rdpCloseScreen(int index, ScreenPtr pScreen);
-#else
-extern _X_EXPORT Bool
-rdpCloseScreen(ScreenPtr pScreen);
-#endif
-extern _X_EXPORT WindowPtr
-rdpGetRootWindowPtr(ScreenPtr pScreen);
-extern _X_EXPORT rdpPtr
-rdpGetDevFromScreen(ScreenPtr pScreen);
-
-#endif
diff --git a/xorg/server/module/rdpFillPolygon.c b/xorg/server/module/rdpFillPolygon.c
deleted file mode 100644
index fdcc3472..00000000
--- a/xorg/server/module/rdpFillPolygon.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpFillPolygon.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-void
-rdpFillPolygonOrg(DrawablePtr pDrawable, GCPtr pGC,
- int shape, int mode, int count,
- DDXPointPtr pPts)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->FillPolygon(pDrawable, pGC, shape, mode, count, pPts);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
- int shape, int mode, int count,
- DDXPointPtr pPts)
-{
- rdpPtr dev;
- RegionRec clip_reg;
- RegionRec reg;
- int cd;
- int maxx;
- int maxy;
- int minx;
- int miny;
- int index;
- int x;
- int y;
- BoxRec box;
-
- LLOGLN(10, ("rdpFillPolygon:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpFillPolygonCallCount++;
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = 0;
- box.y2 = 0;
- if (count > 0)
- {
- maxx = pPts[0].x;
- maxy = pPts[0].y;
- minx = maxx;
- miny = maxy;
- for (index = 1; index < count; index++)
- {
- x = pPts[index].x;
- y = pPts[index].y;
- maxx = RDPMAX(x, maxx);
- minx = RDPMIN(x, minx);
- maxy = RDPMAX(y, maxy);
- miny = RDPMIN(y, miny);
- }
- box.x1 = pDrawable->x + minx;
- box.y1 = pDrawable->y + miny;
- box.x2 = pDrawable->x + maxx + 1;
- box.y2 = pDrawable->y + maxy + 1;
- }
- rdpRegionInit(®, &box, 0);
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
- LLOGLN(10, ("rdpFillPolygon: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rdpFillPolygonOrg(pDrawable, pGC, shape, mode, count, pPts);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDrawable);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
-}
diff --git a/xorg/server/module/rdpFillPolygon.h b/xorg/server/module/rdpFillPolygon.h
deleted file mode 100644
index 6c929dd9..00000000
--- a/xorg/server/module/rdpFillPolygon.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPFILLPOLYGON_H
-#define __RDPFILLPOLYGON_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
- int shape, int mode, int count,
- DDXPointPtr pPts);
-
-#endif
diff --git a/xorg/server/module/rdpFillSpans.c b/xorg/server/module/rdpFillSpans.c
deleted file mode 100644
index 0afb664d..00000000
--- a/xorg/server/module/rdpFillSpans.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpFillSpans.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpFillSpansOrg(DrawablePtr pDrawable, GCPtr pGC, int nInit,
- DDXPointPtr pptInit, int *pwidthInit, int fSorted)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->FillSpans(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
- DDXPointPtr pptInit, int *pwidthInit, int fSorted)
-{
- LLOGLN(0, ("rdpFillSpans:"));
- /* do original call */
- rdpFillSpansOrg(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted);
-}
diff --git a/xorg/server/module/rdpFillSpans.h b/xorg/server/module/rdpFillSpans.h
deleted file mode 100644
index ed1f6331..00000000
--- a/xorg/server/module/rdpFillSpans.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPFILLSPANS_H
-#define __RDPFILLSPANS_H
-
-#include
-#include
-#include
-
-void
-rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
- DDXPointPtr pptInit, int* pwidthInit, int fSorted);
-
-#endif
diff --git a/xorg/server/module/rdpGC.c b/xorg/server/module/rdpGC.c
deleted file mode 100644
index db5983e2..00000000
--- a/xorg/server/module/rdpGC.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-GC related calls
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include "rdp.h"
-#include "rdpFillSpans.h"
-#include "rdpSetSpans.h"
-#include "rdpPutImage.h"
-#include "rdpCopyArea.h"
-#include "rdpCopyPlane.h"
-#include "rdpPolyPoint.h"
-#include "rdpPolylines.h"
-#include "rdpPolySegment.h"
-#include "rdpPolyRectangle.h"
-#include "rdpPolyArc.h"
-#include "rdpFillPolygon.h"
-#include "rdpPolyFillRect.h"
-#include "rdpPolyFillArc.h"
-#include "rdpPolyText8.h"
-#include "rdpPolyText16.h"
-#include "rdpImageText8.h"
-#include "rdpImageText16.h"
-#include "rdpImageGlyphBlt.h"
-#include "rdpPolyGlyphBlt.h"
-#include "rdpPushPixels.h"
-#include "rdpDraw.h"
-#include "rdpGC.h"
-
-/******************************************************************************/
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-#define GC_FUNC_VARS rdpPtr dev; rdpGCPtr priv;
-
-/******************************************************************************/
-#define GC_FUNC_PROLOGUE(_pGC) \
- do { \
- dev = rdpGetDevFromScreen((_pGC)->pScreen); \
- priv = (rdpGCPtr)rdpGetGCPrivate(_pGC, dev->privateKeyRecGC); \
- (_pGC)->funcs = priv->funcs; \
- if (priv->ops != 0) \
- { \
- (_pGC)->ops = priv->ops; \
- } \
- } while (0)
-
-/******************************************************************************/
-#define GC_FUNC_EPILOGUE(_pGC) \
- do { \
- priv->funcs = (_pGC)->funcs; \
- (_pGC)->funcs = &g_rdpGCFuncs; \
- if (priv->ops != 0) \
- { \
- priv->ops = (_pGC)->ops; \
- (_pGC)->ops = &g_rdpGCOps; \
- } \
- } while (0)
-
-static void
-rdpValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr d);
-static void
-rdpChangeGC(GCPtr pGC, unsigned long mask);
-static void
-rdpCopyGC(GCPtr src, unsigned long mask, GCPtr dst);
-static void
-rdpDestroyGC(GCPtr pGC);
-static void
-rdpChangeClip(GCPtr pGC, int type, pointer pValue, int nrects);
-static void
-rdpDestroyClip(GCPtr pGC);
-static void
-rdpCopyClip(GCPtr dst, GCPtr src);
-
-GCFuncs g_rdpGCFuncs =
-{
- rdpValidateGC, rdpChangeGC, rdpCopyGC, rdpDestroyGC, rdpChangeClip,
- rdpDestroyClip, rdpCopyClip
-};
-
-GCOps g_rdpGCOps =
-{
- rdpFillSpans, rdpSetSpans, rdpPutImage, rdpCopyArea, rdpCopyPlane,
- rdpPolyPoint, rdpPolylines, rdpPolySegment, rdpPolyRectangle,
- rdpPolyArc, rdpFillPolygon, rdpPolyFillRect, rdpPolyFillArc,
- rdpPolyText8, rdpPolyText16, rdpImageText8, rdpImageText16,
- rdpImageGlyphBlt, rdpPolyGlyphBlt, rdpPushPixels
-};
-
-/******************************************************************************/
-static void
-rdpValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr d)
-{
- GC_FUNC_VARS;
-
- LLOGLN(10, ("rdpValidateGC:"));
- GC_FUNC_PROLOGUE(pGC);
- pGC->funcs->ValidateGC(pGC, changes, d);
- priv->ops = pGC->ops;
- GC_FUNC_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-static void
-rdpChangeGC(GCPtr pGC, unsigned long mask)
-{
- GC_FUNC_VARS;
-
- LLOGLN(10, ("rdpChangeGC:"));
- GC_FUNC_PROLOGUE(pGC);
- pGC->funcs->ChangeGC(pGC, mask);
- GC_FUNC_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-static void
-rdpCopyGC(GCPtr src, unsigned long mask, GCPtr dst)
-{
- GC_FUNC_VARS;
-
- LLOGLN(10, ("rdpCopyGC:"));
- GC_FUNC_PROLOGUE(dst);
- dst->funcs->CopyGC(src, mask, dst);
- GC_FUNC_EPILOGUE(dst);
-}
-
-/******************************************************************************/
-static void
-rdpDestroyGC(GCPtr pGC)
-{
- GC_FUNC_VARS;
-
- LLOGLN(10, ("rdpDestroyGC:"));
- GC_FUNC_PROLOGUE(pGC);
- pGC->funcs->DestroyGC(pGC);
- GC_FUNC_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-static void
-rdpChangeClip(GCPtr pGC, int type, pointer pValue, int nrects)
-{
- GC_FUNC_VARS;
-
- LLOGLN(10, ("rdpChangeClip:"));
- GC_FUNC_PROLOGUE(pGC);
- pGC->funcs->ChangeClip(pGC, type, pValue, nrects);
- GC_FUNC_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-static void
-rdpDestroyClip(GCPtr pGC)
-{
- GC_FUNC_VARS;
-
- LLOGLN(10, ("rdpDestroyClip:"));
- GC_FUNC_PROLOGUE(pGC);
- pGC->funcs->DestroyClip(pGC);
- GC_FUNC_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-static void
-rdpCopyClip(GCPtr dst, GCPtr src)
-{
- GC_FUNC_VARS;
-
- LLOGLN(10, ("rdpCopyClip:"));
- GC_FUNC_PROLOGUE(dst);
- dst->funcs->CopyClip(dst, src);
- GC_FUNC_EPILOGUE(dst);
-}
-
-/*****************************************************************************/
-Bool
-rdpCreateGC(GCPtr pGC)
-{
- Bool rv;
- rdpPtr dev;
- ScreenPtr pScreen;
- rdpGCPtr priv;
-
- LLOGLN(10, ("rdpCreateGC:"));
- pScreen = pGC->pScreen;
- dev = rdpGetDevFromScreen(pScreen);
- priv = (rdpGCPtr)rdpGetGCPrivate(pGC, dev->privateKeyRecGC);
- pScreen->CreateGC = dev->CreateGC;
- rv = pScreen->CreateGC(pGC);
- if (rv)
- {
- priv->funcs = pGC->funcs;
- priv->ops = 0;
- pGC->funcs = &g_rdpGCFuncs;
- }
- pScreen->CreateGC = rdpCreateGC;
- return rv;
-}
diff --git a/xorg/server/module/rdpGC.h b/xorg/server/module/rdpGC.h
deleted file mode 100644
index 11b0ef8b..00000000
--- a/xorg/server/module/rdpGC.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-GC related calls
-
-*/
-
-#ifndef _RDPGC_H
-#define _RDPGC_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT Bool
-rdpCreateGC(GCPtr pGC);
-
-#endif
diff --git a/xorg/server/module/rdpGlyphs.c b/xorg/server/module/rdpGlyphs.c
deleted file mode 100644
index 1f97c3f1..00000000
--- a/xorg/server/module/rdpGlyphs.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-Copyright 2012-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-gylph(font) calls
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include
-#include
-
-#include "rdp.h"
-#include "rdpGlyphs.h"
-#include "rdpDraw.h"
-#include "rdpMisc.h"
-#include "rdpReg.h"
-
-/******************************************************************************/
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-int
-rdpGlyphDeleteRdpText(struct rdp_text *rtext)
-{
- int index;
-
- if (rtext == NULL)
- {
- return 0;
- }
- for (index = 0; index < rtext->num_chars; index++)
- {
- if (rtext->chars[index] != NULL)
- {
- g_free(rtext->chars[index]->data);
- g_free(rtext->chars[index]);
- }
- }
- rdpRegionDestroy(rtext->reg);
- rdpGlyphDeleteRdpText(rtext->next);
- g_free(rtext);
- return 0;
-}
-
-/******************************************************************************/
-static void
-rdpGlyphsOrg(PictureScreenPtr ps, rdpPtr dev,
- CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc, INT16 ySrc, int nlists, GlyphListPtr lists,
- GlyphPtr *glyphs)
-{
- ps->Glyphs = dev->Glyphs;
- ps->Glyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc,
- nlists, lists, glyphs);
- ps->Glyphs = rdpGlyphs;
-}
-
-/******************************************************************************/
-void
-rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc, INT16 ySrc, int nlists, GlyphListPtr lists,
- GlyphPtr *glyphs)
-{
- ScreenPtr pScreen;
- rdpPtr dev;
- PictureScreenPtr ps;
-
- LLOGLN(10, ("rdpGlyphs:"));
- pScreen = pDst->pDrawable->pScreen;
- dev = rdpGetDevFromScreen(pScreen);
- ps = GetPictureScreen(pScreen);
- rdpGlyphsOrg(ps, dev, op, pSrc, pDst, maskFormat, xSrc, ySrc,
- nlists, lists, glyphs);
-}
diff --git a/xorg/server/module/rdpGlyphs.h b/xorg/server/module/rdpGlyphs.h
deleted file mode 100644
index cbb2ca8b..00000000
--- a/xorg/server/module/rdpGlyphs.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2012-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-gylph(font) calls
-
-*/
-
-#ifndef _RDPGLYPHS_H
-#define _RDPGLYPHS_H
-
-#include
-#include
-#include
-
-struct rdp_font_char
-{
- int offset; /* x */
- int baseline; /* y */
- int width; /* cx */
- int height; /* cy */
- int incby;
- int bpp;
- char *data;
- int data_bytes;
-};
-
-struct rdp_text
-{
- RegionPtr reg;
- int font;
- int x;
- int y;
- int flags;
- int mixmode;
- char data[256];
- int data_bytes;
- struct rdp_font_char* chars[256];
- int num_chars;
- struct rdp_text* next;
-};
-
-extern _X_EXPORT int
-rdpGlyphDeleteRdpText(struct rdp_text* rtext);
-extern _X_EXPORT void
-rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat,
- INT16 xSrc, INT16 ySrc, int nlists, GlyphListPtr lists,
- GlyphPtr *glyphs);
-
-#endif
diff --git a/xorg/server/module/rdpImageGlyphBlt.c b/xorg/server/module/rdpImageGlyphBlt.c
deleted file mode 100644
index 0d1a7d6e..00000000
--- a/xorg/server/module/rdpImageGlyphBlt.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpImageGlyphBlt.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpImageGlyphBltOrg(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->ImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase)
-{
- rdpPtr dev;
- RegionRec clip_reg;
- RegionRec reg;
- int cd;
- BoxRec box;
-
- LLOGLN(0, ("rdpImageGlyphBlt:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpImageGlyphBltCallCount++;
- GetTextBoundingBox(pDrawable, pGC->font, x, y, nglyph, &box);
- rdpRegionInit(®, &box, 0);
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
- LLOGLN(10, ("rdpImageGlyphBlt: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rdpImageGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDrawable);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
-}
diff --git a/xorg/server/module/rdpImageGlyphBlt.h b/xorg/server/module/rdpImageGlyphBlt.h
deleted file mode 100644
index 6857ee1b..00000000
--- a/xorg/server/module/rdpImageGlyphBlt.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPIMAGEGLYPHBLT_H
-#define __RDPIMAGEGLYPHBLT_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr* ppci, pointer pglyphBase);
-
-#endif
diff --git a/xorg/server/module/rdpImageText16.c b/xorg/server/module/rdpImageText16.c
deleted file mode 100644
index d1038912..00000000
--- a/xorg/server/module/rdpImageText16.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpImageText16.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpImageText16Org(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->ImageText16(pDrawable, pGC, x, y, count, chars);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars)
-{
- rdpPtr dev;
- RegionRec clip_reg;
- RegionRec reg;
- int cd;
- BoxRec box;
-
- LLOGLN(10, ("rdpImageText16:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpImageText16CallCount++;
- GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
- rdpRegionInit(®, &box, 0);
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
- LLOGLN(10, ("rdpImageText16: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rdpImageText16Org(pDrawable, pGC, x, y, count, chars);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDrawable);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
-}
diff --git a/xorg/server/module/rdpImageText16.h b/xorg/server/module/rdpImageText16.h
deleted file mode 100644
index e2f2b03e..00000000
--- a/xorg/server/module/rdpImageText16.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPIMAGETEXT16_H
-#define __RDPIMAGETEXT16_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short* chars);
-
-#endif
diff --git a/xorg/server/module/rdpImageText8.c b/xorg/server/module/rdpImageText8.c
deleted file mode 100644
index 068f6d6d..00000000
--- a/xorg/server/module/rdpImageText8.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpImageText8.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->ImageText8(pDrawable, pGC, x, y, count, chars);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars)
-{
- rdpPtr dev;
- RegionRec clip_reg;
- RegionRec reg;
- int cd;
- BoxRec box;
-
- LLOGLN(10, ("rdpImageText8:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpImageText8CallCount++;
- GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
- rdpRegionInit(®, &box, 0);
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
- LLOGLN(10, ("rdpImageText8: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rdpImageText8Org(pDrawable, pGC, x, y, count, chars);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDrawable);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
-}
diff --git a/xorg/server/module/rdpImageText8.h b/xorg/server/module/rdpImageText8.h
deleted file mode 100644
index fbc67a10..00000000
--- a/xorg/server/module/rdpImageText8.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPIMAGETEXT8_H
-#define __RDPIMAGETEXT8_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char* chars);
-
-#endif
diff --git a/xorg/server/module/rdpInput.c b/xorg/server/module/rdpInput.c
deleted file mode 100644
index baf1ff3c..00000000
--- a/xorg/server/module/rdpInput.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-Copyright 2013-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpInput.h"
-#include "rdpMisc.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-#define MAX_INPUT_PROC 4
-
-struct input_proc_list
-{
- int type;
- rdpInputEventProcPtr proc;
-};
-
-static struct input_proc_list g_input_proc[MAX_INPUT_PROC];
-
-/******************************************************************************/
-int
-rdpRegisterInputCallback(int type, rdpInputEventProcPtr proc)
-{
- LLOGLN(0, ("rdpRegisterInputCallback: type %d proc %p", type, proc));
- if (type == 0)
- {
- g_input_proc[0].proc = proc;
- }
- else if (type == 1)
- {
- g_input_proc[1].proc = proc;
- }
- else
- {
- return 1;
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpUnregisterInputCallback(rdpInputEventProcPtr proc)
-{
- int index;
- char text[256];
-
- LLOGLN(0, ("rdpUnregisterInputCallback: proc %p", proc));
- for (index = 0; index < MAX_INPUT_PROC; index++)
- {
- if (g_input_proc[index].proc == proc)
- {
- if (index == 0)
- {
- /* hack to cleanup
- remove when xrdpdevTearDown is working */
- g_sprintf(text, "/tmp/.xrdp/xrdp_display_%s", display);
- LLOGLN(0, ("rdpUnregisterInputCallback: deleting file %s", text));
- unlink(text);
- }
- g_input_proc[index].proc = 0;
- return 0;
- }
- }
- return 1;
-}
-
-/******************************************************************************/
-int
-rdpInputKeyboardEvent(rdpPtr dev, int msg,
- long param1, long param2,
- long param3, long param4)
-{
- if (g_input_proc[0].proc != 0)
- {
- return g_input_proc[0].proc(dev, msg, param1, param2, param3, param4);
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpInputMouseEvent(rdpPtr dev, int msg,
- long param1, long param2,
- long param3, long param4)
-{
- if (g_input_proc[1].proc != 0)
- {
- return g_input_proc[1].proc(dev, msg, param1, param2, param3, param4);
- }
- return 0;
-}
-
-/******************************************************************************/
-/* called when module loads */
-int
-rdpInputInit(void)
-{
- g_memset(g_input_proc, 0, sizeof(g_input_proc));
- return 0;
-}
diff --git a/xorg/server/module/rdpInput.h b/xorg/server/module/rdpInput.h
deleted file mode 100644
index 98a0c239..00000000
--- a/xorg/server/module/rdpInput.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-Copyright 2013-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-input
-
-*/
-
-#ifndef _RDPINPUT_H
-#define _RDPINPUT_H
-
-#include
-#include
-#include
-
-typedef int (*rdpInputEventProcPtr)(rdpPtr dev, int msg,
- long param1, long param2,
- long param3, long param4);
-
-extern _X_EXPORT int
-rdpRegisterInputCallback(int type, rdpInputEventProcPtr proc);
-extern _X_EXPORT int
-rdpUnregisterInputCallback(rdpInputEventProcPtr proc);
-extern _X_EXPORT int
-rdpInputKeyboardEvent(rdpPtr dev, int msg,
- long param1, long param2,
- long param3, long param4);
-extern _X_EXPORT int
-rdpInputMouseEvent(rdpPtr dev, int msg,
- long param1, long param2,
- long param3, long param4);
-extern _X_EXPORT int
-rdpInputInit(void);
-
-#endif
diff --git a/xorg/server/module/rdpMain.c b/xorg/server/module/rdpMain.c
deleted file mode 100644
index 835be9db..00000000
--- a/xorg/server/module/rdpMain.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-Copyright 2013-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-rdp module main
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include "rdp.h"
-#include "rdpInput.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpMain.h"
-
-/******************************************************************************/
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-static Bool g_initialised = FALSE;
-
-/*****************************************************************************/
-static pointer
-xorgxrdpSetup(pointer Module, pointer Options,
- int *ErrorMajor, int *ErrorMinor)
-{
- LLOGLN(0, ("xorgxrdpSetup:"));
- if (!g_initialised)
- {
- g_initialised = TRUE;
- }
- rdpInputInit();
- rdpPrivateInit();
- return (pointer) 1;
-}
-
-/*****************************************************************************/
-static void
-xorgxrdpTearDown(pointer Module)
-{
- LLOGLN(0, ("xorgxrdpTearDown:"));
-}
-
-/*****************************************************************************/
-void
-xorgxrdpDownDown(ScreenPtr pScreen)
-{
- LLOGLN(0, ("xorgxrdpDownDown:"));
- if (g_initialised)
- {
- g_initialised = FALSE;
- LLOGLN(0, ("xorgxrdpDownDown: 1"));
- rdpClientConDeinit(rdpGetDevFromScreen(pScreen));
- }
-}
-
-static MODULESETUPPROTO(xorgxrdpSetup);
-static XF86ModuleVersionInfo RDPVersRec =
-{
- XRDP_MODULE_NAME,
- MODULEVENDORSTRING,
- MODINFOSTRING1,
- MODINFOSTRING2,
- XORG_VERSION_CURRENT,
- PACKAGE_VERSION_MAJOR,
- PACKAGE_VERSION_MINOR,
- PACKAGE_VERSION_PATCHLEVEL,
- ABI_CLASS_VIDEODRV,
- ABI_VIDEODRV_VERSION,
- 0,
- { 0, 0, 0, 0 }
-};
-
-_X_EXPORT XF86ModuleData xorgxrdpModuleData =
-{
- &RDPVersRec,
- xorgxrdpSetup,
- xorgxrdpTearDown
-};
diff --git a/xorg/server/module/rdpMain.h b/xorg/server/module/rdpMain.h
deleted file mode 100644
index 33fc0e04..00000000
--- a/xorg/server/module/rdpMain.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2013-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-rdp module main
-
-*/
-
-#ifndef __RDPMAIN_H
-#define __RDPMAIN_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-xorgxrdpDownDown(ScreenPtr pScreen);
-
-#endif
diff --git a/xorg/server/module/rdpMisc.c b/xorg/server/module/rdpMisc.c
deleted file mode 100644
index c7a61fc8..00000000
--- a/xorg/server/module/rdpMisc.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-the rest
-
-*/
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdpMisc.h"
-
-/******************************************************************************/
-int
-rdpBitsPerPixel(int depth)
-{
- if (depth == 1)
- {
- return 1;
- }
- else if (depth <= 8)
- {
- return 8;
- }
- else if (depth <= 16)
- {
- return 16;
- }
- else
- {
- return 32;
- }
-}
-
-/* the g_ functions from os_calls.c */
-
-/*****************************************************************************/
-/* wait 'millis' milliseconds for the socket to be able to receive */
-/* returns boolean */
-int
-g_sck_can_recv(int sck, int millis)
-{
- fd_set rfds;
- struct timeval time;
- int rv;
-
- time.tv_sec = millis / 1000;
- time.tv_usec = (millis * 1000) % 1000000;
- FD_ZERO(&rfds);
-
- if (sck > 0)
- {
- FD_SET(((unsigned int)sck), &rfds);
- rv = select(sck + 1, &rfds, 0, 0, &time);
-
- if (rv > 0)
- {
- return 1;
- }
- }
-
- return 0;
-}
-
-/*****************************************************************************/
-int
-g_sck_recv(int sck, void *ptr, int len, int flags)
-{
- return recv(sck, ptr, len, flags);
-}
-
-/*****************************************************************************/
-void
-g_sck_close(int sck)
-{
- if (sck == 0)
- {
- return;
- }
-
- shutdown(sck, 2);
- close(sck);
-}
-
-/*****************************************************************************/
-int
-g_sck_last_error_would_block(int sck)
-{
- return (errno == EWOULDBLOCK) || (errno == EINPROGRESS);
-}
-
-/*****************************************************************************/
-void
-g_sleep(int msecs)
-{
- usleep(msecs * 1000);
-}
-
-/*****************************************************************************/
-int
-g_sck_send(int sck, void *ptr, int len, int flags)
-{
- return send(sck, ptr, len, flags);
-}
-
-/*****************************************************************************/
-void *
-g_malloc(int size, int zero)
-{
- char *rv;
-
- rv = (char *)malloc(size);
- if (zero)
- {
- if (rv != 0)
- {
- memset(rv, 0, size);
- }
- }
- return rv;
-}
-
-/*****************************************************************************/
-void
-g_free(void *ptr)
-{
- if (ptr != 0)
- {
- free(ptr);
- }
-}
-
-/*****************************************************************************/
-void
-g_sprintf(char *dest, char *format, ...)
-{
- va_list ap;
-
- va_start(ap, format);
- vsprintf(dest, format, ap);
- va_end(ap);
-}
-
-/*****************************************************************************/
-int
-g_sck_tcp_socket(void)
-{
- int rv;
- int i;
-
- i = 1;
- rv = socket(PF_INET, SOCK_STREAM, 0);
- setsockopt(rv, IPPROTO_TCP, TCP_NODELAY, (void *)&i, sizeof(i));
- setsockopt(rv, SOL_SOCKET, SO_REUSEADDR, (void *)&i, sizeof(i));
- return rv;
-}
-
-/*****************************************************************************/
-int
-g_sck_local_socket_dgram(void)
-{
- return socket(AF_UNIX, SOCK_DGRAM, 0);
-}
-
-/*****************************************************************************/
-int
-g_sck_local_socket_stream(void)
-{
- return socket(AF_UNIX, SOCK_STREAM, 0);
-}
-
-/*****************************************************************************/
-void
-g_memcpy(void *d_ptr, const void *s_ptr, int size)
-{
- memcpy(d_ptr, s_ptr, size);
-}
-
-/*****************************************************************************/
-void
-g_memset(void *d_ptr, const unsigned char chr, int size)
-{
- memset(d_ptr, chr, size);
-}
-
-/*****************************************************************************/
-int
-g_sck_tcp_set_no_delay(int sck)
-{
- int i;
-
- i = 1;
- setsockopt(sck, IPPROTO_TCP, TCP_NODELAY, (void *)&i, sizeof(i));
- return 0;
-}
-
-/*****************************************************************************/
-int
-g_sck_set_non_blocking(int sck)
-{
- unsigned long i;
-
- i = fcntl(sck, F_GETFL);
- i = i | O_NONBLOCK;
- fcntl(sck, F_SETFL, i);
- return 0;
-}
-
-/*****************************************************************************/
-int
-g_sck_accept(int sck)
-{
- struct sockaddr_in s;
- unsigned int i;
-
- i = sizeof(struct sockaddr_in);
- memset(&s, 0, i);
- return accept(sck, (struct sockaddr *)&s, &i);
-}
-
-/*****************************************************************************/
-int
-g_sck_select(int sck1, int sck2, int sck3)
-{
- fd_set rfds;
- struct timeval time;
- int max;
- int rv;
-
- time.tv_sec = 0;
- time.tv_usec = 0;
- FD_ZERO(&rfds);
-
- if (sck1 > 0)
- {
- FD_SET(((unsigned int)sck1), &rfds);
- }
-
- if (sck2 > 0)
- {
- FD_SET(((unsigned int)sck2), &rfds);
- }
-
- if (sck3 > 0)
- {
- FD_SET(((unsigned int)sck3), &rfds);
- }
-
- max = sck1;
-
- if (sck2 > max)
- {
- max = sck2;
- }
-
- if (sck3 > max)
- {
- max = sck3;
- }
-
- rv = select(max + 1, &rfds, 0, 0, &time);
-
- if (rv > 0)
- {
- rv = 0;
-
- if (FD_ISSET(((unsigned int)sck1), &rfds))
- {
- rv = rv | 1;
- }
-
- if (FD_ISSET(((unsigned int)sck2), &rfds))
- {
- rv = rv | 2;
- }
-
- if (FD_ISSET(((unsigned int)sck3), &rfds))
- {
- rv = rv | 4;
- }
- }
- else
- {
- rv = 0;
- }
-
- return rv;
-}
-
-/*****************************************************************************/
-int
-g_sck_tcp_bind(int sck, char *port)
-{
- struct sockaddr_in s;
-
- memset(&s, 0, sizeof(struct sockaddr_in));
- s.sin_family = AF_INET;
- s.sin_port = htons(atoi(port));
- s.sin_addr.s_addr = INADDR_ANY;
- return bind(sck, (struct sockaddr *)&s, sizeof(struct sockaddr_in));
-}
-
-/*****************************************************************************/
-int
-g_sck_local_bind(int sck, char *port)
-{
- struct sockaddr_un s;
-
- memset(&s, 0, sizeof(struct sockaddr_un));
- s.sun_family = AF_UNIX;
- strcpy(s.sun_path, port);
- return bind(sck, (struct sockaddr *)&s, sizeof(struct sockaddr_un));
-}
-
-/*****************************************************************************/
-int
-g_sck_listen(int sck)
-{
- return listen(sck, 2);
-}
-
-/*****************************************************************************/
-/* returns boolean */
-int
-g_create_dir(const char *dirname)
-{
- return mkdir(dirname, (mode_t) - 1) == 0;
-}
-
-/*****************************************************************************/
-/* returns boolean, non zero if the directory exists */
-int
-g_directory_exist(const char *dirname)
-{
- struct stat st;
-
- if (stat(dirname, &st) == 0)
- {
- return S_ISDIR(st.st_mode);
- }
- else
- {
- return 0;
- }
-}
-
-/*****************************************************************************/
-/* returns error */
-int
-g_chmod_hex(const char *filename, int flags)
-{
- int fl;
-
- fl = 0;
- fl |= (flags & 0x4000) ? S_ISUID : 0;
- fl |= (flags & 0x2000) ? S_ISGID : 0;
- fl |= (flags & 0x1000) ? S_ISVTX : 0;
- fl |= (flags & 0x0400) ? S_IRUSR : 0;
- fl |= (flags & 0x0200) ? S_IWUSR : 0;
- fl |= (flags & 0x0100) ? S_IXUSR : 0;
- fl |= (flags & 0x0040) ? S_IRGRP : 0;
- fl |= (flags & 0x0020) ? S_IWGRP : 0;
- fl |= (flags & 0x0010) ? S_IXGRP : 0;
- fl |= (flags & 0x0004) ? S_IROTH : 0;
- fl |= (flags & 0x0002) ? S_IWOTH : 0;
- fl |= (flags & 0x0001) ? S_IXOTH : 0;
- return chmod(filename, fl);
-}
-
-/*****************************************************************************/
-/* produce a hex dump */
-void
-g_hexdump(void *p, long len)
-{
- unsigned char *line;
- int i;
- int thisline;
- int offset;
-
- offset = 0;
- line = (unsigned char *) p;
-
- while (offset < (int) len)
- {
- ErrorF("%04x ", offset);
- thisline = len - offset;
-
- if (thisline > 16)
- {
- thisline = 16;
- }
-
- for (i = 0; i < thisline; i++)
- {
- ErrorF("%02x ", line[i]);
- }
-
- for (; i < 16; i++)
- {
- ErrorF(" ");
- }
-
- for (i = 0; i < thisline; i++)
- {
- ErrorF("%c", (line[i] >= 0x20 && line[i] < 0x7f) ? line[i] : '.');
- }
-
- ErrorF("\n");
- offset += thisline;
- line += thisline;
- }
-}
diff --git a/xorg/server/module/rdpMisc.h b/xorg/server/module/rdpMisc.h
deleted file mode 100644
index 07c6ec0d..00000000
--- a/xorg/server/module/rdpMisc.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-the rest
-
-*/
-
-#ifndef __RDPMISC_H
-#define __RDPMISC_H
-
-#include
-#include
-#include
-
-#include
-
-extern _X_EXPORT int
-rdpBitsPerPixel(int depth);
-extern _X_EXPORT int
-g_sck_can_recv(int sck, int millis);
-extern _X_EXPORT int
-g_sck_recv(int sck, void *ptr, int len, int flags);
-extern _X_EXPORT void
-g_sck_close(int sck);
-extern _X_EXPORT int
-g_sck_last_error_would_block(int sck);
-extern _X_EXPORT void
-g_sleep(int msecs);
-extern _X_EXPORT int
-g_sck_send(int sck, void *ptr, int len, int flags);
-extern _X_EXPORT void *
-g_malloc(int size, int zero);
-extern _X_EXPORT void
-g_free(void *ptr);
-extern _X_EXPORT void
-g_sprintf(char *dest, char *format, ...);
-extern _X_EXPORT int
-g_sck_tcp_socket(void);
-extern _X_EXPORT int
-g_sck_local_socket_dgram(void);
-extern _X_EXPORT int
-g_sck_local_socket_stream(void);
-extern _X_EXPORT void
-g_memcpy(void *d_ptr, const void *s_ptr, int size);
-extern _X_EXPORT void
-g_memset(void *d_ptr, const unsigned char chr, int size);
-extern _X_EXPORT int
-g_sck_tcp_set_no_delay(int sck);
-extern _X_EXPORT int
-g_sck_set_non_blocking(int sck);
-extern _X_EXPORT int
-g_sck_accept(int sck);
-extern _X_EXPORT int
-g_sck_select(int sck1, int sck2, int sck3);
-extern _X_EXPORT int
-g_sck_tcp_bind(int sck, char *port);
-extern _X_EXPORT int
-g_sck_local_bind(int sck, char *port);
-extern _X_EXPORT int
-g_sck_listen(int sck);
-extern _X_EXPORT int
-g_create_dir(const char *dirname);
-extern _X_EXPORT int
-g_directory_exist(const char *dirname);
-extern _X_EXPORT int
-g_chmod_hex(const char *filename, int flags);
-extern _X_EXPORT void
-g_hexdump(void *p, long len);
-
-#if defined(X_BYTE_ORDER)
-# if X_BYTE_ORDER == X_LITTLE_ENDIAN
-# define L_ENDIAN
-# else
-# define B_ENDIAN
-# endif
-#else
-# error Unknown endianness in rdp.h
-#endif
-/* check if we need to align data */
-#if defined(__sparc__) || defined(__alpha__) || defined(__hppa__) || \
- defined(__AIX__) || defined(__PPC__) || defined(__mips__) || \
- defined(__ia64__) || defined(__ppc__) || defined(__arm__)
-#define NEED_ALIGN
-#endif
-
-/* parser state */
-struct stream
-{
- char *p;
- char *end;
- char *data;
- int size;
- /* offsets of various headers */
- char *iso_hdr;
- char *mcs_hdr;
- char *sec_hdr;
- char *rdp_hdr;
- char *channel_hdr;
- char *next_packet;
-};
-
-/******************************************************************************/
-#define s_push_layer(s, h, n) \
-do { \
- (s)->h = (s)->p; \
- (s)->p += (n); \
-} while (0)
-
-/******************************************************************************/
-#define s_pop_layer(s, h) \
-do { \
- (s)->p = (s)->h; \
-} while (0)
-
-/******************************************************************************/
-#if defined(B_ENDIAN) || defined(NEED_ALIGN)
-#define out_uint16_le(s, v) \
-do { \
- *((s)->p) = (unsigned char)((v) >> 0); \
- (s)->p++; \
- *((s)->p) = (unsigned char)((v) >> 8); \
- (s)->p++; \
-} while (0)
-#else
-#define out_uint16_le(s, v) \
-do { \
- *((unsigned short*)((s)->p)) = (unsigned short)(v); \
- (s)->p += 2; \
-} while (0)
-#endif
-
-/******************************************************************************/
-#define init_stream(s, v) \
-do { \
- if ((v) > (s)->size) \
- { \
- g_free((s)->data); \
- (s)->data = (char*)g_malloc((v), 0); \
- (s)->size = (v); \
- } \
- (s)->p = (s)->data; \
- (s)->end = (s)->data; \
- (s)->next_packet = 0; \
-} while (0)
-
-/******************************************************************************/
-#define out_uint8p(s, v, n) \
-do { \
- g_memcpy((s)->p, (v), (n)); \
- (s)->p += (n); \
-} while (0)
-
-/******************************************************************************/
-#define out_uint8a(s, v, n) \
-do { \
- out_uint8p((s), (v), (n)); \
-} while (0)
-
-/******************************************************************************/
-#define out_uint8(s, v) \
-do { \
- *((s)->p) = (unsigned char)((v) >> 0); \
- (s)->p++; \
-} while (0)
-
-/******************************************************************************/
-#if defined(B_ENDIAN) || defined(NEED_ALIGN)
-#define out_uint32_le(s, v) \
-do { \
- *((s)->p) = (unsigned char)((v) >> 0); \
- (s)->p++; \
- *((s)->p) = (unsigned char)((v) >> 8); \
- (s)->p++; \
- *((s)->p) = (unsigned char)((v) >> 16); \
- (s)->p++; \
- *((s)->p) = (unsigned char)((v) >> 24); \
- (s)->p++; \
-} while (0)
-#else
-#define out_uint32_le(s, v) \
-do { \
- *((unsigned int*)((s)->p)) = (v); \
- (s)->p += 4; \
-} while (0)
-#endif
-
-/******************************************************************************/
-#if defined(B_ENDIAN) || defined(NEED_ALIGN)
-#define in_uint32_le(s, v) \
-do { \
- (v) = (unsigned int) \
- ( \
- (*((unsigned char*)((s)->p + 0)) << 0) | \
- (*((unsigned char*)((s)->p + 1)) << 8) | \
- (*((unsigned char*)((s)->p + 2)) << 16) | \
- (*((unsigned char*)((s)->p + 3)) << 24) \
- ); \
- (s)->p += 4; \
-} while (0)
-#else
-#define in_uint32_le(s, v) \
-do { \
- (v) = *((unsigned int*)((s)->p)); \
- (s)->p += 4; \
-} while (0)
-#endif
-
-/******************************************************************************/
-#if defined(B_ENDIAN) || defined(NEED_ALIGN)
-#define in_uint16_le(s, v) \
-do { \
- (v) = (unsigned short) \
- ( \
- (*((unsigned char*)((s)->p + 0)) << 0) | \
- (*((unsigned char*)((s)->p + 1)) << 8) \
- ); \
- (s)->p += 2; \
-} while (0)
-#else
-#define in_uint16_le(s, v) \
-do { \
- (v) = *((unsigned short*)((s)->p)); \
- (s)->p += 2; \
-} while (0)
-#endif
-
-/******************************************************************************/
-#define s_mark_end(s) \
-do { \
- (s)->end = (s)->p; \
-} while (0)
-
-/******************************************************************************/
-#define make_stream(s) \
-do { \
- (s) = (struct stream*)g_malloc(sizeof(struct stream), 1); \
-} while (0)
-
-/******************************************************************************/
-#define free_stream(s) \
-do { \
- if ((s) != 0) \
- { \
- g_free((s)->data); \
- } \
- g_free((s)); \
-} while (0)
-
-#endif
diff --git a/xorg/server/module/rdpPixmap.c b/xorg/server/module/rdpPixmap.c
deleted file mode 100644
index 967438e0..00000000
--- a/xorg/server/module/rdpPixmap.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-pixmap calls
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpPixmap.h"
-
-#ifndef XRDP_PIX
-#warning XRDP_PIX not defined
-#endif
-
-/******************************************************************************/
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-#if XRDP_PIX == 2
-
-/*****************************************************************************/
-PixmapPtr
-rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint)
-{
- rdpPtr dev;
- PixmapPtr rv;
-
- LLOGLN(10, ("rdpCreatePixmap: width %d height %d depth %d",
- width, height, depth));
- dev = rdpGetDevFromScreen(pScreen);
- pScreen->CreatePixmap = dev->CreatePixmap;
- rv = pScreen->CreatePixmap(pScreen, width, height, depth, usage_hint);
- pScreen->CreatePixmap = rdpCreatePixmap;
- return rv;
-}
-
-#else
-
-/*****************************************************************************/
-PixmapPtr
-rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
-{
- rdpPtr dev;
- PixmapPtr rv;
-
- LLOGLN(10, ("rdpCreatePixmap: width %d height %d depth %d",
- width, height, depth));
- dev = rdpGetDevFromScreen(pScreen);
- pScreen->CreatePixmap = dev->CreatePixmap;
- rv = pScreen->CreatePixmap(pScreen, width, height, depth);
- pScreen->CreatePixmap = rdpCreatePixmap;
- return rv;
-}
-
-#endif
-
-/******************************************************************************/
-Bool
-rdpDestroyPixmap(PixmapPtr pPixmap)
-{
- Bool rv;
- ScreenPtr pScreen;
- rdpPtr dev;
-
- LLOGLN(10, ("rdpDestroyPixmap: refcnt %d", pPixmap->refcnt));
- pScreen = pPixmap->drawable.pScreen;
- dev = rdpGetDevFromScreen(pScreen);
- pScreen->DestroyPixmap = dev->DestroyPixmap;
- rv = pScreen->DestroyPixmap(pPixmap);
- pScreen->DestroyPixmap = rdpDestroyPixmap;
- return rv;
-}
-
-/******************************************************************************/
-Bool
-rdpModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData)
-{
- Bool rv;
- ScreenPtr pScreen;
- rdpPtr dev;
-
- LLOGLN(10, ("rdpModifyPixmapHeader:"));
- pScreen = pPixmap->drawable.pScreen;
- dev = rdpGetDevFromScreen(pScreen);
- pScreen->ModifyPixmapHeader = dev->ModifyPixmapHeader;
- rv = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel,
- devKind, pPixData);
- pScreen->ModifyPixmapHeader = rdpModifyPixmapHeader;
- return rv;
-}
diff --git a/xorg/server/module/rdpPixmap.h b/xorg/server/module/rdpPixmap.h
deleted file mode 100644
index e1c7c7ac..00000000
--- a/xorg/server/module/rdpPixmap.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-pixmap calls
-
-*/
-
-#ifndef __RDPPIXMAP_H
-#define __RDPPIXAMP_H
-
-#include
-#include
-#include
-
-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 5, 0, 0, 0)
-/* 1.1, 1.2, 1.3, 1.4 */
-#define XRDP_PIX 1
-#else
-/* 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12 */
-#define XRDP_PIX 2
-#endif
-
-#if XRDP_PIX == 2
-extern _X_EXPORT PixmapPtr
-rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint);
-#else
-extern _X_EXPORT PixmapPtr
-rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth);
-#endif
-extern _X_EXPORT Bool
-rdpDestroyPixmap(PixmapPtr pPixmap);
-extern _X_EXPORT Bool
-rdpModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
- int bitsPerPixel, int devKind, pointer pPixData);
-
-#endif
diff --git a/xorg/server/module/rdpPolyArc.c b/xorg/server/module/rdpPolyArc.c
deleted file mode 100644
index 8db3cffe..00000000
--- a/xorg/server/module/rdpPolyArc.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpPolyArc.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpPolyArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->PolyArc(pDrawable, pGC, narcs, parcs);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
-{
- rdpPtr dev;
- BoxRec box;
- int index;
- int cd;
- int lw;
- int extra;
- RegionRec clip_reg;
- RegionRec reg;
-
- LLOGLN(0, ("rdpPolyArc:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpPolyArcCallCount++;
- rdpRegionInit(®, NullBox, 0);
- if (narcs > 0)
- {
- lw = pGC->lineWidth;
- if (lw == 0)
- {
- lw = 1;
- }
- extra = lw / 2;
- for (index = 0; index < narcs; index++)
- {
- box.x1 = (parcs[index].x - extra) + pDrawable->x;
- box.y1 = (parcs[index].y - extra) + pDrawable->y;
- box.x2 = box.x1 + parcs[index].width + lw;
- box.y2 = box.y1 + parcs[index].height + lw;
- rdpRegionUnionRect(®, &box);
- }
- }
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
- LLOGLN(10, ("rdpPolyArc: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rdpPolyArcOrg(pDrawable, pGC, narcs, parcs);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDrawable);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
-}
diff --git a/xorg/server/module/rdpPolyArc.h b/xorg/server/module/rdpPolyArc.h
deleted file mode 100644
index 9af6566f..00000000
--- a/xorg/server/module/rdpPolyArc.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-Copyright 2005-2013 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPPOLYARC_H
-#define __RDPPOLYARC_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs);
-
-#endif
diff --git a/xorg/server/module/rdpPolyFillArc.c b/xorg/server/module/rdpPolyFillArc.c
deleted file mode 100644
index 2ba49854..00000000
--- a/xorg/server/module/rdpPolyFillArc.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpPolyFillArc.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpPolyFillArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->PolyFillArc(pDrawable, pGC, narcs, parcs);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
-{
- rdpPtr dev;
- BoxRec box;
- int index;
- int cd;
- int lw;
- int extra;
- RegionRec clip_reg;
- RegionRec reg;
-
- LLOGLN(10, ("rdpPolyFillArc:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpPolyFillArcCallCount++;
- rdpRegionInit(®, NullBox, 0);
- if (narcs > 0)
- {
- lw = pGC->lineWidth;
- if (lw == 0)
- {
- lw = 1;
- }
- extra = lw / 2;
- for (index = 0; index < narcs; index++)
- {
- box.x1 = (parcs[index].x - extra) + pDrawable->x;
- box.y1 = (parcs[index].y - extra) + pDrawable->y;
- box.x2 = box.x1 + parcs[index].width + lw;
- box.y2 = box.y1 + parcs[index].height + lw;
- rdpRegionUnionRect(®, &box);
- }
- }
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
- LLOGLN(10, ("rdpPolyFillArc: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(®, &clip_reg, ®);
- }
- /* do original call */
- rdpPolyFillArcOrg(pDrawable, pGC, narcs, parcs);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, ®, pDrawable);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionUninit(®);
-}
diff --git a/xorg/server/module/rdpPolyFillArc.h b/xorg/server/module/rdpPolyFillArc.h
deleted file mode 100644
index 708f8eae..00000000
--- a/xorg/server/module/rdpPolyFillArc.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-Copyright 2005-2013 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPPOLYFILLARC_H
-#define __RDPPOLYFILLARC_H
-
-#include
-#include
-#include
-
-extern _X_EXPORT void
-rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs);
-
-#endif
diff --git a/xorg/server/module/rdpPolyFillRect.c b/xorg/server/module/rdpPolyFillRect.c
deleted file mode 100644
index 1b99b1e8..00000000
--- a/xorg/server/module/rdpPolyFillRect.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-Copyright 2005-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include
-#include
-#include
-
-/* this should be before all X11 .h files */
-#include
-#include
-
-/* all driver need this */
-#include
-#include
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpClientCon.h"
-#include "rdpReg.h"
-#include "rdpPolyFillRect.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-/******************************************************************************/
-static void
-rdpPolyFillRectOrg(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
- xRectangle *prectInit)
-{
- GC_OP_VARS;
-
- GC_OP_PROLOGUE(pGC);
- pGC->ops->PolyFillRect(pDrawable, pGC, nrectFill, prectInit);
- GC_OP_EPILOGUE(pGC);
-}
-
-/******************************************************************************/
-void
-rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
- xRectangle *prectInit)
-{
- rdpPtr dev;
- RegionRec clip_reg;
- RegionPtr reg;
- int cd;
-
- LLOGLN(10, ("rdpPolyFillRect:"));
- dev = rdpGetDevFromScreen(pGC->pScreen);
- dev->counts.rdpPolyFillRectCallCount++;
- /* make a copy of rects */
- reg = rdpRegionFromRects(nrectFill, prectInit, CT_NONE);
- rdpRegionTranslate(reg, pDrawable->x, pDrawable->y);
- rdpRegionInit(&clip_reg, NullBox, 0);
- cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
- LLOGLN(10, ("rdpPolyFillRect: cd %d", cd));
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(reg, &clip_reg, reg);
- }
- /* do original call */
- rdpPolyFillRectOrg(pDrawable, pGC, nrectFill, prectInit);
- if (cd != XRDP_CD_NODRAW)
- {
- rdpClientConAddAllReg(dev, reg, pDrawable);
- }
- rdpRegionUninit(&clip_reg);
- rdpRegionDestroy(reg);
-}
diff --git a/xorg/server/module/rdpPolyFillRect.h b/xorg/server/module/rdpPolyFillRect.h
deleted file mode 100644
index ab2c3c5f..00000000
--- a/xorg/server/module/rdpPolyFillRect.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2005-2013 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#ifndef __RDPPOLYFILLRECT_H
-#define __RDPPOLYFILLRECT_H
-
-#include