Browse Subversion Repository
Diff of /trunk/teraterm/teraterm/vtterm.c
Parent Directory
| Revision Log
| Patch
| 50 |
#define DecLocatorFiltered 16 |
#define DecLocatorFiltered 16 |
| 51 |
|
|
| 52 |
void VisualBell(); |
void VisualBell(); |
| 53 |
|
BOOL DecLocatorReport(int Event, int Button); |
| 54 |
|
|
| 55 |
/* character attribute */ |
/* character attribute */ |
| 56 |
static TCharAttr CharAttr; |
static TCharAttr CharAttr; |
| 132 |
unsigned int DecLocatorFlag; |
unsigned int DecLocatorFlag; |
| 133 |
int LastX, LastY; |
int LastX, LastY; |
| 134 |
int ButtonStat; |
int ButtonStat; |
| 135 |
|
int FilterTop, FilterBottom, FilterLeft, FilterRight; |
| 136 |
|
|
| 137 |
static _locale_t CLocale = NULL; |
static _locale_t CLocale = NULL; |
| 138 |
|
|
| 2437 |
|
|
| 2438 |
void CSQuote(BYTE b) |
void CSQuote(BYTE b) |
| 2439 |
{ |
{ |
| 2440 |
int i; |
int i, x, y; |
| 2441 |
switch (b) { |
switch (b) { |
| 2442 |
case 'w': // Enable Filter Rectangle (DECEFR) |
case 'w': // Enable Filter Rectangle (DECEFR) |
| 2443 |
|
if (DecLocatorFlag & DecLocatorPixel) { |
| 2444 |
|
x = LastX; |
| 2445 |
|
y = LastY; |
| 2446 |
|
} |
| 2447 |
|
else { |
| 2448 |
|
DispConvWinToScreen(LastX, LastY, &x, &y, NULL); |
| 2449 |
|
} |
| 2450 |
|
FilterTop = (Param[1]<0)?y:Param[1]; |
| 2451 |
|
FilterLeft = (Param[2]<0)?x:Param[2]; |
| 2452 |
|
FilterBottom = (Param[3]<0)?y:Param[3]; |
| 2453 |
|
FilterRight = (Param[4]<0)?x:Param[4]; |
| 2454 |
|
DecLocatorFlag |= DecLocatorFiltered; |
| 2455 |
break; |
break; |
| 2456 |
|
|
| 2457 |
case 'z': // Enable DEC Locator reporting (DECELR) |
case 'z': // Enable DEC Locator reporting (DECELR) |
| 3745 |
return ChangeEmu; |
return ChangeEmu; |
| 3746 |
} |
} |
| 3747 |
|
|
| 3748 |
int MakeMouseReportStr(char *buff, size_t buffsize, int mb, int x, int y) { |
int MakeLocatorReportStr(char *buff, size_t buffsize, int event, int x, int y) { |
| 3749 |
return _snprintf_s_l(buff, buffsize, _TRUNCATE, "M%c%c%c", CLocale, mb+32, x+32, y+32); |
if (x < 0) { |
| 3750 |
|
return _snprintf_s_l(buff, buffsize, _TRUNCATE, "%d;%d&w", CLocale, event, ButtonStat); |
| 3751 |
|
} |
| 3752 |
|
else { |
| 3753 |
|
return _snprintf_s_l(buff, buffsize, _TRUNCATE, "%d;%d;%d;%d;0&w", CLocale, event, ButtonStat, y, x); |
| 3754 |
|
} |
| 3755 |
} |
} |
| 3756 |
|
|
| 3757 |
BOOL DecLocatorReport(int Event, int Button) { |
BOOL DecLocatorReport(int Event, int Button) { |
| 3777 |
switch (Event) { |
switch (Event) { |
| 3778 |
case IdMouseEventCurStat: |
case IdMouseEventCurStat: |
| 3779 |
if (MouseReportMode == IdMouseTrackDECELR) { |
if (MouseReportMode == IdMouseTrackDECELR) { |
| 3780 |
if (x < 0) { |
len = MakeLocatorReportStr(buff, sizeof(buff), 1, x, y); |
|
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "%d;%d&w", CLocale, 1, ButtonStat); |
|
|
} |
|
|
else { |
|
|
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "%d;%d;%d;%d;0&w", CLocale, 1, ButtonStat, y, x); |
|
|
} |
|
| 3781 |
} |
} |
| 3782 |
else { |
else { |
| 3783 |
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "0&w", CLocale); |
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "0&w", CLocale); |
| 3786 |
|
|
| 3787 |
case IdMouseEventBtnDown: |
case IdMouseEventBtnDown: |
| 3788 |
if (DecLocatorFlag & DecLocatorButtonDown) { |
if (DecLocatorFlag & DecLocatorButtonDown) { |
| 3789 |
if (x < 0) { |
len = MakeLocatorReportStr(buff, sizeof(buff), Button*2+2, x, y); |
|
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "%d;%d&w", CLocale, Button*2+2, ButtonStat); |
|
|
} |
|
|
else { |
|
|
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "%d;%d;%d;%d;0&w", CLocale, Button*2+2, ButtonStat, y, x); |
|
|
} |
|
| 3790 |
} |
} |
| 3791 |
break; |
break; |
| 3792 |
|
|
| 3793 |
case IdMouseEventBtnUp: |
case IdMouseEventBtnUp: |
| 3794 |
if (DecLocatorFlag & DecLocatorButtonUp) { |
if (DecLocatorFlag & DecLocatorButtonUp) { |
| 3795 |
if (x < 0) { |
len = MakeLocatorReportStr(buff, sizeof(buff), Button*2+3, x, y); |
|
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "%d;%d&w", CLocale, Button*2+3, ButtonStat); |
|
|
} |
|
|
else { |
|
|
len = _snprintf_s_l(buff, sizeof(buff), _TRUNCATE, "%d;%d;%d;%d;0&w", CLocale, Button*2+3, ButtonStat, y, x); |
|
|
} |
|
| 3796 |
} |
} |
| 3797 |
break; |
break; |
| 3798 |
|
|
| 3799 |
case IdMouseEventMove: |
case IdMouseEventMove: |
| 3800 |
// not supported yet |
if (DecLocatorFlag & DecLocatorFiltered) { |
| 3801 |
|
if (y < FilterTop || y > FilterBottom || x < FilterLeft || x > FilterRight) { |
| 3802 |
|
len = MakeLocatorReportStr(buff, sizeof(buff), 10, x, y); |
| 3803 |
|
DecLocatorFlag &= ~DecLocatorFiltered; |
| 3804 |
|
} |
| 3805 |
|
} |
| 3806 |
break; |
break; |
| 3807 |
} |
} |
| 3808 |
|
|
| 3818 |
return TRUE; |
return TRUE; |
| 3819 |
} |
} |
| 3820 |
|
|
| 3821 |
|
int MakeMouseReportStr(char *buff, size_t buffsize, int mb, int x, int y) { |
| 3822 |
|
return _snprintf_s_l(buff, buffsize, _TRUNCATE, "M%c%c%c", CLocale, mb+32, x+32, y+32); |
| 3823 |
|
} |
| 3824 |
|
|
| 3825 |
BOOL MouseReport(int Event, int Button, int Xpos, int Ypos) { |
BOOL MouseReport(int Event, int Button, int Xpos, int Ypos) { |
| 3826 |
char Report[10]; |
char Report[10]; |
| 3827 |
int x, y, len, modifier; |
int x, y, len, modifier; |
|
|
Legend:
| Removed from v.3998 |
|
| changed lines |
| |
Added in v.3999 |
|
|
| |