/* Maximum number of sessions on saved-session submenu */
#define MENU_SAVED_MAX ((IDM_SAVED_MAX-IDM_SAVED_MIN) / MENU_SAVED_STEP)
-#define WM_IGNORE_CLIP (WM_XUSER + 2)
-#define WM_FULLSCR_ON_MAX (WM_XUSER + 3)
-#define WM_AGENT_CALLBACK (WM_XUSER + 4)
+#define WM_IGNORE_CLIP (WM_APP + 2)
+#define WM_FULLSCR_ON_MAX (WM_APP + 3)
+#define WM_AGENT_CALLBACK (WM_APP + 4)
/* Needed for Chinese support and apparently not always defined. */
#ifndef VK_PROCESSKEY
{
}
+char *get_ttymode(void *frontend, const char *mode)
+{
+ return term_get_ttymode(term, mode);
+}
+
static void start_backend(void)
{
const char *error;
for (i = 0; i < NEXTCOLOURS; i++) {
if (i < 216) {
int r = i / 36, g = (i / 6) % 6, b = i % 6;
- defpal[i+16].rgbtRed = r * 0x33;
- defpal[i+16].rgbtGreen = g * 0x33;
- defpal[i+16].rgbtBlue = b * 0x33;
+ defpal[i+16].rgbtRed = r ? r * 40 + 55 : 0;
+ defpal[i+16].rgbtGreen = g ? g * 40 + 55 : 0;
+ defpal[i+16].rgbtBlue = b ? b * 40 + 55 : 0;
} else {
int shade = i - 216;
- shade = (shade + 1) * 0xFF / (NEXTCOLOURS - 216 + 1);
+ shade = shade * 10 + 8;
defpal[i+16].rgbtRed = defpal[i+16].rgbtGreen =
defpal[i+16].rgbtBlue = shade;
}
/* Enable or disable the scroll bar, etc */
{
- LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
+ LONG nflg, flag = GetWindowLongPtr(hwnd, GWL_STYLE);
LONG nexflag, exflag =
- GetWindowLong(hwnd, GWL_EXSTYLE);
+ GetWindowLongPtr(hwnd, GWL_EXSTYLE);
nexflag = exflag;
if (cfg.alwaysontop != prev_cfg.alwaysontop) {
if (nflg != flag || nexflag != exflag) {
if (nflg != flag)
- SetWindowLong(hwnd, GWL_STYLE, nflg);
+ SetWindowLongPtr(hwnd, GWL_STYLE, nflg);
if (nexflag != exflag)
- SetWindowLong(hwnd, GWL_EXSTYLE, nexflag);
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE, nexflag);
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOCOPYBITS |
rtfsize = 100 + strlen(cfg.font.name);
rtf = snewn(rtfsize, char);
- sprintf(rtf, "{\\rtf1\\ansi%d{\\fonttbl\\f0\\fmodern %s;}\\f0",
+ sprintf(rtf, "{\\rtf1\\ansi%d{\\fonttbl\\f0\\fmodern %s;}\\f0 ",
GetACP(), cfg.font.name);
rtflen = strlen(rtf);
{
if (!IsZoomed(hwnd))
return FALSE;
- if (GetWindowLong(hwnd, GWL_STYLE) & WS_CAPTION)
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_CAPTION)
return FALSE;
return TRUE;
}
return;
/* Remove the window furniture. */
- style = GetWindowLong(hwnd, GWL_STYLE);
+ style = GetWindowLongPtr(hwnd, GWL_STYLE);
style &= ~(WS_CAPTION | WS_BORDER | WS_THICKFRAME);
if (cfg.scrollbar_in_fullscreen)
style |= WS_VSCROLL;
else
style &= ~WS_VSCROLL;
- SetWindowLong(hwnd, GWL_STYLE, style);
+ SetWindowLongPtr(hwnd, GWL_STYLE, style);
/* Resize ourselves to exactly cover the nearest monitor. */
get_fullscreen_rect(&ss);
DWORD oldstyle, style;
/* Reinstate the window furniture. */
- style = oldstyle = GetWindowLong(hwnd, GWL_STYLE);
+ style = oldstyle = GetWindowLongPtr(hwnd, GWL_STYLE);
style |= WS_CAPTION | WS_BORDER;
if (cfg.resize_action == RESIZE_DISABLED)
style &= ~WS_THICKFRAME;
else
style &= ~WS_VSCROLL;
if (style != oldstyle) {
- SetWindowLong(hwnd, GWL_STYLE, style);
+ SetWindowLongPtr(hwnd, GWL_STYLE, style);
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_FRAMECHANGED);