51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#define IDM_SPECIAL_MAX 0x0800
#define IDM_SAVED_MIN 0x1000
#define IDM_SAVED_MAX 0x2000
#define WM_IGNORE_CLIP (WM_XUSER + 2)
#define WM_FULLSCR_ON_MAX (WM_XUSER + 3)
/* Needed for Chinese support and apparently not always defined. */
#ifndef VK_PROCESSKEY
#define VK_PROCESSKEY 0xE5
#endif
/* Mouse wheel support. */
|
>
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#define IDM_SPECIAL_MAX 0x0800
#define IDM_SAVED_MIN 0x1000
#define IDM_SAVED_MAX 0x2000
#define WM_IGNORE_CLIP (WM_XUSER + 2)
#define WM_FULLSCR_ON_MAX (WM_XUSER + 3)
#define WM_AGENT_CALLBACK (WM_XUSER + 4)
/* Needed for Chinese support and apparently not always defined. */
#ifndef VK_PROCESSKEY
#define VK_PROCESSKEY 0xE5
#endif
/* Mouse wheel support. */
|
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
static const struct telnet_special *specials;
static int specials_menu_position;
Config cfg; /* exported to windlg.c */
extern struct sesslist sesslist; /* imported from windlg.c */
#define FONT_NORMAL 0
#define FONT_BOLD 1
#define FONT_UNDERLINE 2
#define FONT_BOLDUND 3
#define FONT_WIDE 0x04
#define FONT_HIGH 0x08
|
>
>
>
>
>
>
>
|
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
static const struct telnet_special *specials;
static int specials_menu_position;
Config cfg; /* exported to windlg.c */
extern struct sesslist sesslist; /* imported from windlg.c */
struct agent_callback {
void (*callback)(void *, void *, int);
void *callback_ctx;
void *data;
int len;
};
#define FONT_NORMAL 0
#define FONT_BOLD 1
#define FONT_UNDERLINE 2
#define FONT_BOLDUND 3
#define FONT_WIDE 0x04
#define FONT_HIGH 0x08
|
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
|
}
return 0;
case WM_SETCURSOR:
if (send_raw_mouse && LOWORD(lParam) == HTCLIENT) {
SetCursor(LoadCursor(NULL, IDC_ARROW));
return TRUE;
}
default:
if (message == wm_mousewheel || message == WM_MOUSEWHEEL) {
int shift_pressed=0, control_pressed=0;
if (message == WM_MOUSEWHEEL) {
wheel_accumulator += (short)HIWORD(wParam);
shift_pressed=LOWORD(wParam) & MK_SHIFT;
|
>
>
>
>
>
>
>
>
|
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
|
}
return 0;
case WM_SETCURSOR:
if (send_raw_mouse && LOWORD(lParam) == HTCLIENT) {
SetCursor(LoadCursor(NULL, IDC_ARROW));
return TRUE;
}
break;
case WM_AGENT_CALLBACK:
{
struct agent_callback *c = (struct agent_callback *)lParam;
c->callback(c->callback_ctx, c->data, c->len);
sfree(c);
}
return 0;
default:
if (message == wm_mousewheel || message == WM_MOUSEWHEEL) {
int shift_pressed=0, control_pressed=0;
if (message == WM_MOUSEWHEEL) {
wheel_accumulator += (short)HIWORD(wParam);
shift_pressed=LOWORD(wParam) & MK_SHIFT;
|
4622
4623
4624
4625
4626
4627
4628
|
return;
}
int from_backend(void *frontend, int is_stderr, const char *data, int len)
{
return term_data(term, is_stderr, data, len);
}
|
>
>
>
>
>
>
>
>
>
>
>
|
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
|
return;
}
int from_backend(void *frontend, int is_stderr, const char *data, int len)
{
return term_data(term, is_stderr, data, len);
}
void agent_schedule_callback(void (*callback)(void *, void *, int),
void *callback_ctx, void *data, int len)
{
struct agent_callback *c = snew(struct agent_callback);
c->callback = callback;
c->callback_ctx = callback_ctx;
c->data = data;
c->len = len;
PostMessage(hwnd, WM_AGENT_CALLBACK, 0, (LPARAM)c);
}
|