亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? window.c

?? 遠程登陸工具軟件源碼 用于遠程登陸unix
?? C
?? 第 1 頁 / 共 5 頁
字號:
	InvalidateRect(hwnd, NULL, TRUE);
#ifdef RDB_DEBUG_PATCH
	debug((27, "reset_window() -> Reposition terminal"));
#endif
    }

    if (IsZoomed(hwnd)) {
	/* We're fullscreen, this means we must not change the size of
	 * the window so it's the font size or the terminal itself.
	 */

	extra_width = wr.right - wr.left - cr.right + cr.left;
	extra_height = wr.bottom - wr.top - cr.bottom + cr.top;

	if (cfg.resize_action != RESIZE_TERM) {
	    if (  font_width != win_width/term->cols || 
		  font_height != win_height/term->rows) {
		deinit_fonts();
		init_fonts(win_width/term->cols, win_height/term->rows);
		offset_width = (win_width-font_width*term->cols)/2;
		offset_height = (win_height-font_height*term->rows)/2;
		InvalidateRect(hwnd, NULL, TRUE);
#ifdef RDB_DEBUG_PATCH
		debug((25, "reset_window() -> Z font resize to (%d, %d)",
			font_width, font_height));
#endif
	    }
	} else {
	    if (  font_width != win_width/term->cols || 
		  font_height != win_height/term->rows) {
		/* Our only choice at this point is to change the 
		 * size of the terminal; Oh well.
		 */
		term_size(term, win_height/font_height, win_width/font_width,
			  cfg.savelines);
		offset_width = (win_width-font_width*term->cols)/2;
		offset_height = (win_height-font_height*term->rows)/2;
		InvalidateRect(hwnd, NULL, TRUE);
#ifdef RDB_DEBUG_PATCH
		debug((27, "reset_window() -> Zoomed term_size"));
#endif
	    }
	}
	return;
    }

    /* Hmm, a force re-init means we should ignore the current window
     * so we resize to the default font size.
     */
    if (reinit>0) {
#ifdef RDB_DEBUG_PATCH
	debug((27, "reset_window() -> Forced re-init"));
#endif

	offset_width = offset_height = cfg.window_border;
	extra_width = wr.right - wr.left - cr.right + cr.left + offset_width*2;
	extra_height = wr.bottom - wr.top - cr.bottom + cr.top +offset_height*2;

	if (win_width != font_width*term->cols + offset_width*2 ||
	    win_height != font_height*term->rows + offset_height*2) {

	    /* If this is too large windows will resize it to the maximum
	     * allowed window size, we will then be back in here and resize
	     * the font or terminal to fit.
	     */
	    SetWindowPos(hwnd, NULL, 0, 0, 
		         font_width*term->cols + extra_width, 
			 font_height*term->rows + extra_height,
			 SWP_NOMOVE | SWP_NOZORDER);
	}

	InvalidateRect(hwnd, NULL, TRUE);
	return;
    }

    /* Okay the user doesn't want us to change the font so we try the 
     * window. But that may be too big for the screen which forces us
     * to change the terminal.
     */
    if ((cfg.resize_action == RESIZE_TERM && reinit<=0) ||
        (cfg.resize_action == RESIZE_EITHER && reinit<0) ||
	    reinit>0) {
	offset_width = offset_height = cfg.window_border;
	extra_width = wr.right - wr.left - cr.right + cr.left + offset_width*2;
	extra_height = wr.bottom - wr.top - cr.bottom + cr.top +offset_height*2;

	if (win_width != font_width*term->cols + offset_width*2 ||
	    win_height != font_height*term->rows + offset_height*2) {

	    static RECT ss;
	    int width, height;
		
		get_fullscreen_rect(&ss);

	    width = (ss.right - ss.left - extra_width) / font_width;
	    height = (ss.bottom - ss.top - extra_height) / font_height;

	    /* Grrr too big */
	    if ( term->rows > height || term->cols > width ) {
		if (cfg.resize_action == RESIZE_EITHER) {
		    /* Make the font the biggest we can */
		    if (term->cols > width)
			font_width = (ss.right - ss.left - extra_width)
			    / term->cols;
		    if (term->rows > height)
			font_height = (ss.bottom - ss.top - extra_height)
			    / term->rows;

		    deinit_fonts();
		    init_fonts(font_width, font_height);

		    width = (ss.right - ss.left - extra_width) / font_width;
		    height = (ss.bottom - ss.top - extra_height) / font_height;
		} else {
		    if ( height > term->rows ) height = term->rows;
		    if ( width > term->cols )  width = term->cols;
		    term_size(term, height, width, cfg.savelines);
#ifdef RDB_DEBUG_PATCH
		    debug((27, "reset_window() -> term resize to (%d,%d)",
			       height, width));
#endif
		}
	    }
	    
	    SetWindowPos(hwnd, NULL, 0, 0, 
		         font_width*term->cols + extra_width, 
			 font_height*term->rows + extra_height,
			 SWP_NOMOVE | SWP_NOZORDER);

	    InvalidateRect(hwnd, NULL, TRUE);
#ifdef RDB_DEBUG_PATCH
	    debug((27, "reset_window() -> window resize to (%d,%d)",
			font_width*term->cols + extra_width,
			font_height*term->rows + extra_height));
#endif
	}
	return;
    }

    /* We're allowed to or must change the font but do we want to ?  */

    if (font_width != (win_width-cfg.window_border*2)/term->cols || 
	font_height != (win_height-cfg.window_border*2)/term->rows) {

	deinit_fonts();
	init_fonts((win_width-cfg.window_border*2)/term->cols, 
		   (win_height-cfg.window_border*2)/term->rows);
	offset_width = (win_width-font_width*term->cols)/2;
	offset_height = (win_height-font_height*term->rows)/2;

	extra_width = wr.right - wr.left - cr.right + cr.left +offset_width*2;
	extra_height = wr.bottom - wr.top - cr.bottom + cr.top+offset_height*2;

	InvalidateRect(hwnd, NULL, TRUE);
#ifdef RDB_DEBUG_PATCH
	debug((25, "reset_window() -> font resize to (%d,%d)", 
		   font_width, font_height));
#endif
    }
}

static void set_input_locale(HKL kl)
{
    char lbuf[20];

    GetLocaleInfo(LOWORD(kl), LOCALE_IDEFAULTANSICODEPAGE,
		  lbuf, sizeof(lbuf));

    kbd_codepage = atoi(lbuf);
}

static void click(Mouse_Button b, int x, int y, int shift, int ctrl, int alt)
{
    int thistime = GetMessageTime();

    if (send_raw_mouse && !(cfg.mouse_override && shift)) {
	lastbtn = MBT_NOTHING;
	term_mouse(term, b, translate_button(b), MA_CLICK,
		   x, y, shift, ctrl, alt);
	return;
    }

    if (lastbtn == b && thistime - lasttime < dbltime) {
	lastact = (lastact == MA_CLICK ? MA_2CLK :
		   lastact == MA_2CLK ? MA_3CLK :
		   lastact == MA_3CLK ? MA_CLICK : MA_NOTHING);
    } else {
	lastbtn = b;
	lastact = MA_CLICK;
    }
    if (lastact != MA_NOTHING)
	term_mouse(term, b, translate_button(b), lastact,
		   x, y, shift, ctrl, alt);
    lasttime = thistime;
}

/*
 * Translate a raw mouse button designation (LEFT, MIDDLE, RIGHT)
 * into a cooked one (SELECT, EXTEND, PASTE).
 */
static Mouse_Button translate_button(Mouse_Button button)
{
    if (button == MBT_LEFT)
	return MBT_SELECT;
    if (button == MBT_MIDDLE)
	return cfg.mouse_is_xterm == 1 ? MBT_PASTE : MBT_EXTEND;
    if (button == MBT_RIGHT)
	return cfg.mouse_is_xterm == 1 ? MBT_EXTEND : MBT_PASTE;
    return 0;			       /* shouldn't happen */
}

static void show_mouseptr(int show)
{
    static int cursor_visible = 1;
    if (!cfg.hide_mouseptr)	       /* override if this feature disabled */
	show = 1;
    if (cursor_visible && !show)
	ShowCursor(FALSE);
    else if (!cursor_visible && show)
	ShowCursor(TRUE);
    cursor_visible = show;
}

static int is_alt_pressed(void)
{
    BYTE keystate[256];
    int r = GetKeyboardState(keystate);
    if (!r)
	return FALSE;
    if (keystate[VK_MENU] & 0x80)
	return TRUE;
    if (keystate[VK_RMENU] & 0x80)
	return TRUE;
    return FALSE;
}

static int is_shift_pressed(void)
{
    BYTE keystate[256];
    int r = GetKeyboardState(keystate);
    if (!r)
	return FALSE;
    if (keystate[VK_SHIFT] & 0x80)
	return TRUE;
    return FALSE;
}

static int resizing;

static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
				WPARAM wParam, LPARAM lParam)
{
    HDC hdc;
    static int ignore_clip = FALSE;
    static int need_backend_resize = FALSE;
    static int fullscr_on_max = FALSE;
    static UINT last_mousemove = 0;

    switch (message) {
      case WM_TIMER:
	if (pending_netevent)
	    enact_pending_netevent();
	if (GetCapture() != hwnd || 
	    (send_raw_mouse && !(cfg.mouse_override && is_shift_pressed())))
	    term_out(term);
	noise_regular();
	HideCaret(hwnd);
	term_update(term);
	ShowCaret(hwnd);
	if (cfg.ping_interval > 0) {
	    time_t now;
	    time(&now);
	    if (now - last_movement > cfg.ping_interval) {
		back->special(backhandle, TS_PING);
		last_movement = now;
	    }
	}
	net_pending_errors();
	return 0;
      case WM_CREATE:
	break;
      case WM_CLOSE:
	{
	    char *str;
	    show_mouseptr(1);
	    str = dupprintf("%s Exit Confirmation", appname);
	    if (!cfg.warn_on_close || session_closed ||
		MessageBox(hwnd,
			   "Are you sure you want to close this session?",
			   str, MB_ICONWARNING | MB_OKCANCEL) == IDOK)
		DestroyWindow(hwnd);
	    sfree(str);
	}
	return 0;
      case WM_DESTROY:
	show_mouseptr(1);
	PostQuitMessage(0);
	return 0;
      case WM_COMMAND:
      case WM_SYSCOMMAND:
	switch (wParam & ~0xF) {       /* low 4 bits reserved to Windows */
	  case IDM_SHOWLOG:
	    showeventlog(hwnd);
	    break;
	  case IDM_NEWSESS:
	  case IDM_DUPSESS:
	  case IDM_SAVEDSESS:
	    {
		char b[2048];
		char c[30], *cl;
		int freecl = FALSE;
		STARTUPINFO si;
		PROCESS_INFORMATION pi;
		HANDLE filemap = NULL;

		if (wParam == IDM_DUPSESS) {
		    /*
		     * Allocate a file-mapping memory chunk for the
		     * config structure.
		     */
		    SECURITY_ATTRIBUTES sa;
		    Config *p;

		    sa.nLength = sizeof(sa);
		    sa.lpSecurityDescriptor = NULL;
		    sa.bInheritHandle = TRUE;
		    filemap = CreateFileMapping((HANDLE) 0xFFFFFFFF,
						&sa,
						PAGE_READWRITE,
						0, sizeof(Config), NULL);
		    if (filemap) {
			p = (Config *) MapViewOfFile(filemap,
						     FILE_MAP_WRITE,
						     0, 0, sizeof(Config));
			if (p) {
			    *p = cfg;  /* structure copy */
			    UnmapViewOfFile(p);
			}
		    }
		    sprintf(c, "putty &%p", filemap);
		    cl = c;
		} else if (wParam == IDM_SAVEDSESS) {
		    if ((lParam - IDM_SAVED_MIN) / 16 < sesslist.nsessions) {
			char *session =
			    sesslist.sessions[(lParam - IDM_SAVED_MIN) / 16];
			cl = snewn(16 + strlen(session), char);
				       /* 8, but play safe */
			if (!cl)
			    cl = NULL;    
				       /* not a very important failure mode */
			else {
			    sprintf(cl, "putty @%s", session);
			    freecl = TRUE;
			}
		    } else
			break;
		} else
		    cl = NULL;

		GetModuleFileName(NULL, b, sizeof(b) - 1);
		si.cb = sizeof(si);
		si.lpReserved = NULL;
		si.lpDesktop = NULL;
		si.lpTitle = NULL;
		si.dwFlags = 0;
		si.cbReserved2 = 0;
		si.lpReserved2 = NULL;
		CreateProcess(b, cl, NULL, NULL, TRUE,
			      NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi);

		if (filemap)
		    CloseHandle(filemap);
		if (freecl)
		    sfree(cl);
	    }
	    break;
	  case IDM_RECONF:
	    {
		Config prev_cfg;
		int init_lvl = 1;

		GetWindowText(hwnd, cfg.wintitle, sizeof(cfg.wintitle));
		prev_cfg = cfg;

		if (!do_reconfig(hwnd))
		    break;

		{
		    /* Disable full-screen if resizing forbidden */
		    HMENU m = GetSystemMenu (hwnd, FALSE);
		    EnableMenuItem(m, IDM_FULLSCREEN, MF_BYCOMMAND | 
				   (cfg.resize_action == RESIZE_DISABLED)
				   ? MF_GRAYED : MF_ENABLED);
		    /* Gracefully unzoom if necessary */
		    if (IsZoomed(hwnd) &&
			(cfg.resize_action == RESIZE_DISABLED)) {
			ShowWindow(hwnd, SW_RESTORE);
		    }
		}

		/* Pass new config data to the logging module */
		log_reconfig(logctx, &cfg);

		sfree(logpal);
		/*
		 * Flush the line discipline's edit buffer in the
		 * case where local editing has just been disabled.
		 */
		ldisc_send(ldisc, NULL, 0, 0);
		if (pal)
		    DeleteObject(pal);
		logpal = NULL;
		pal = NULL;
		cfgtopalette();
		init_palette();

		/* Pass new config data to the terminal */
		term_reconfig(term, &cfg);

		/* Pass new config data to the back end */
		back->reconfig(backhandle, &cfg);

		/* Screen size changed ? */
		if (cfg.height != prev_cfg.height ||
		    cfg.width != prev_cfg.width ||
		    cfg.savelines != prev_cfg.savelines ||
		    cfg.resize_action == RESIZE_FONT ||
		    (cfg.resize_action == RESIZE_EITHER && IsZoomed(hwnd)) ||
		    cfg.resize_action == RESIZE_DISABLED)
		    term_size(term, cfg.height, cfg.width, cfg.savelines);

		/* Enable or disable the scroll bar, etc */
		{
		    LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE);
		    LONG nexflag, exflag =
			GetWindowLong(hwnd, GWL_EXSTYLE);

		    nexflag = exflag;
		    if (cfg.alwaysontop != prev_cfg.alwaysontop) {
			if (cfg.alwaysontop) {
			    nexflag |= WS_EX_TOPMOST;
			    SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0,
					 SWP_NOMOVE | SWP_NOSIZE);
			} else {
			    nexflag &= ~(WS_EX_TOPMOST);
			    SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0,
					 SWP_NOMOVE | SWP_NOSIZE);
			}
		    }
		    if (cfg.sunken_edge)
			nexflag |= WS_EX_CLIENTEDGE;
		    else
			nexflag &= ~(WS_EX_CLIENTEDGE);

		    nflg = flag;
		    if (is_full_screen() ?
			cfg.scrollbar_in_fullscreen : cfg.scrollbar)
			nflg |= WS_VSCROLL;
		    else
			nflg &= ~WS_VSCROLL;

		    if (cfg.resize_action == RESIZE_DISABLED ||
                        is_full_screen())
			nflg &= ~WS_THICKFRAME;
		    else
			nflg |= WS_THICKFRAME;

		    if (cfg.resize_action == RESIZE_DISABLED)
			nflg &= ~WS_MAXIMIZEBOX;
		    else
			nflg |= WS_MAXIMIZEBOX;

		    if (nflg != flag || nexflag != exflag) {
			if (nflg != flag)
			    SetWindowLong(hwnd, GWL_STYLE, nflg);
			if (nexflag != exflag)
			    SetWindowLong(hwnd, GWL_EXSTYLE, nexflag);

			SetWindowPos(hwnd, NULL, 0, 0, 0, 0,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷开心激情综合| 一本色道久久综合亚洲aⅴ蜜桃| 国产激情一区二区三区四区| 色综合天天综合网天天狠天天| 精品入口麻豆88视频| 亚洲免费观看高清完整版在线观看| 久久91精品久久久久久秒播| 欧美三级资源在线| 18欧美乱大交hd1984| 国产成人免费视频| 欧美r级电影在线观看| 亚洲高清免费一级二级三级| 91在线无精精品入口| 欧美激情一区二区在线| 精品一区二区免费在线观看| 欧美一区二区播放| 亚洲福利视频导航| 在线中文字幕一区| 亚洲私人影院在线观看| 成人动漫中文字幕| 国产精品你懂的在线| 国产成人一区在线| 国产色综合久久| 韩国v欧美v日本v亚洲v| 精品久久一区二区三区| 美女性感视频久久| 日韩精品自拍偷拍| 美女爽到高潮91| 精品国产乱码久久久久久免费 | 久久国产精品免费| 欧美一级艳片视频免费观看| 亚洲电影在线免费观看| 欧美日韩你懂得| 丝袜国产日韩另类美女| 欧美二区乱c少妇| 欧美a一区二区| 久久综合九色综合欧美就去吻| 老司机精品视频在线| 精品国产乱码久久久久久久| 另类欧美日韩国产在线| 337p粉嫩大胆噜噜噜噜噜91av| 久久成人免费网站| 日本一区二区三区国色天香| 成人动漫一区二区在线| 一区二区三区四区蜜桃| 欧美日韩精品一区二区三区四区| 亚洲丶国产丶欧美一区二区三区| 欧美一区日本一区韩国一区| 国产在线视频不卡二| 久久久99久久精品欧美| 91小视频免费看| 亚洲成人一二三| 欧美大片日本大片免费观看| 国产成人亚洲综合a∨婷婷图片| 中文成人av在线| 欧美三级蜜桃2在线观看| 日本vs亚洲vs韩国一区三区二区| 久久一留热品黄| 色婷婷综合久色| 男女男精品视频网| 国产精品色一区二区三区| 欧美在线观看一区二区| 国产自产高清不卡| 亚洲乱码国产乱码精品精的特点| 欧美精品日韩综合在线| 国产电影一区二区三区| 亚洲国产一区视频| 日本一区二区三区四区在线视频 | 在线播放国产精品二区一二区四区| 欧美aaaaaa午夜精品| 中文字幕中文在线不卡住| 在线播放日韩导航| 成人av电影在线观看| 秋霞电影一区二区| 亚洲蜜臀av乱码久久精品| 欧美成人性战久久| 91成人免费网站| 国产91丝袜在线观看| 午夜欧美2019年伦理| 1区2区3区欧美| 精品99一区二区三区| 欧美三级电影精品| 99热国产精品| 国产精品 欧美精品| 人妖欧美一区二区| 亚洲大片精品永久免费| 亚洲欧洲av另类| 国产日韩欧美麻豆| 26uuu精品一区二区| 在线91免费看| 欧美亚洲尤物久久| 91毛片在线观看| 国产成人aaaa| 国产一区二区三区国产| 蜜臀久久久久久久| 亚洲国产毛片aaaaa无费看| 国产精品久久一卡二卡| 国产性做久久久久久| 精品少妇一区二区三区免费观看| 欧美美女bb生活片| 欧美三级三级三级| 在线观看不卡一区| 在线免费精品视频| 在线影视一区二区三区| 91片在线免费观看| 91日韩在线专区| 91免费在线看| 99精品久久只有精品| 成人av在线一区二区| 成人免费视频一区| 成人晚上爱看视频| 高清不卡一区二区| 成人中文字幕合集| 成人av网址在线| 一本久久精品一区二区| 色88888久久久久久影院按摩| 91在线云播放| 欧美主播一区二区三区美女| 欧洲亚洲精品在线| 欧美精选午夜久久久乱码6080| 欧美视频一区在线| 91麻豆精品国产91久久久久久 | 99久久免费精品| av亚洲精华国产精华精| 99久久国产免费看| 99国产精品久| 欧美在线不卡视频| 日韩欧美一级精品久久| 久久影院午夜论| 国产精品三级久久久久三级| 亚洲激情综合网| 日韩精品午夜视频| 国产一区二区三区免费观看| 成人av集中营| 欧美精品久久一区| 国产欧美一区二区精品性色超碰| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲欧美色图小说| 蜜臀久久99精品久久久画质超高清| 国产一区 二区| 色综合咪咪久久| 欧美影院精品一区| 精品少妇一区二区三区日产乱码| 国产欧美精品一区| 亚洲一区二区三区三| 精品一区二区三区在线播放视频| 成人97人人超碰人人99| 欧美久久久久中文字幕| 久久精品欧美一区二区三区不卡 | 国产精品视频九色porn| 亚洲成人www| 国产一区二区三区国产| 色先锋久久av资源部| 精品国产伦一区二区三区观看体验 | 欧美大肚乱孕交hd孕妇| 136国产福利精品导航| 日韩av在线免费观看不卡| 高清国产一区二区| 91麻豆精品国产91久久久| 国产精品久久久一本精品| 免费欧美高清视频| 日本韩国欧美国产| 久久综合色天天久久综合图片| 亚洲另类春色国产| 国产精品一线二线三线精华| 欧美日韩免费视频| 亚洲视频在线一区| 国产毛片一区二区| 日韩免费观看高清完整版在线观看| 亚洲人成网站精品片在线观看| 狠狠v欧美v日韩v亚洲ⅴ| 欧美日韩国产精品成人| 国产精品久久久久久久蜜臀| 久久超碰97中文字幕| 欧美日韩国产在线播放网站| 国产精品美女久久久久久久久 | 日韩女优毛片在线| 亚洲成国产人片在线观看| 不卡视频一二三四| 国产午夜一区二区三区| 精品无人码麻豆乱码1区2区 | 色噜噜久久综合| 欧美激情在线观看视频免费| 久久国产免费看| 欧美大白屁股肥臀xxxxxx| 三级精品在线观看| 制服丝袜成人动漫| 亚洲成人动漫在线免费观看| 在线免费一区三区| 亚洲综合色婷婷| 欧美性色aⅴ视频一区日韩精品| 亚洲人成在线观看一区二区| 岛国精品在线观看| 欧美高清在线一区| yourporn久久国产精品| 国产精品免费久久| av在线这里只有精品| 18涩涩午夜精品.www| 91日韩一区二区三区| 亚洲自拍偷拍麻豆|