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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? link.c

?? 一個很有名的瀏覽器
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* Links viewing/manipulation handling *//* $Id: link.c,v 1.309.2.6 2005/05/01 21:00:42 jonas Exp $ */#ifdef HAVE_CONFIG_H#include "config.h"#endif#include <stdlib.h>#include <string.h>#include "elinks.h"#include "bfu/listmenu.h"#include "bfu/menu.h"#include "dialogs/menu.h"#include "dialogs/status.h"#include "document/document.h"#include "document/forms.h"#include "document/html/parser.h"#include "document/html/renderer.h"#include "document/options.h"#include "document/view.h"#include "ecmascript/ecmascript.h"#include "intl/gettext/libintl.h"#include "protocol/uri.h"#include "sched/session.h"#include "sched/task.h"#include "terminal/color.h"#include "terminal/draw.h"#include "terminal/kbd.h"#include "terminal/screen.h"#include "terminal/tab.h"#include "terminal/terminal.h"#include "util/conv.h"#include "util/error.h"#include "util/memory.h"#include "util/object.h"#include "util/string.h"#include "viewer/text/form.h"#include "viewer/text/link.h"#include "viewer/text/search.h"#include "viewer/text/textarea.h"#include "viewer/text/view.h"#include "viewer/text/vs.h"/* Perhaps some of these would be more fun to have in viewer/common/, dunno. * --pasky */static intcurrent_link_evhook(struct document_view *doc_view, enum script_event_hook_type type){#ifdef CONFIG_ECMASCRIPT	struct link *link;	struct script_event_hook *evhook;	assert(doc_view && doc_view->vs);	link = get_current_link(doc_view);	if (!link) return -1;	if (!link->event_hooks) return -1;	if (!doc_view->vs->ecmascript) return -1;	foreach (evhook, *link->event_hooks) {		struct string src = INIT_STRING(evhook->src, strlen(evhook->src));		if (evhook->type != type) continue;		/* TODO: Some even handlers return a bool. */		if (!ecmascript_eval_boolback(doc_view->vs->ecmascript, &src))			return 0;	}	return 1;#else	return -1;#endif}#define current_link_hover(dv) \do { \	current_link_evhook(dv, SEVHOOK_ONMOUSEOVER); \	current_link_evhook(dv, SEVHOOK_ONHOVER); \	current_link_evhook(dv, SEVHOOK_ONFOCUS); \} while (0)#define current_link_blur(dv) \do { \	current_link_evhook(dv, SEVHOOK_ONMOUSEOUT); \	current_link_evhook(dv, SEVHOOK_ONBLUR); \} while (0)voidset_link(struct document_view *doc_view){	assert(doc_view);	if_assert_failed return;	if (current_link_is_visible(doc_view)) return;	find_link_page_down(doc_view);}static inline intget_link_cursor_offset(struct document_view *doc_view, struct link *link){	struct form_control *fc;	struct form_state *fs;	switch (link->type) {		case LINK_CHECKBOX:			return 1;		case LINK_BUTTON:			return 2;		case LINK_FIELD:			fc = get_link_form_control(link);			fs = find_form_state(doc_view, fc);			return fs ? fs->state - fs->vpos : 0;		case LINK_AREA:			fc = get_link_form_control(link);			fs = find_form_state(doc_view, fc);			return fs ? area_cursor(fc, fs) : 0;		case LINK_HYPERTEXT:		case LINK_MAP:		case LINK_SELECT:			return 0;	}	return 0;}/* Allocate doc_view->link_bg with enough space to save the colour * and attributes of each point of the given link plus one byte * for the template character. Initialise that template character * with the colour and attributes appropriate for an active link. */static inline struct screen_char *init_link_drawing(struct document_view *doc_view, struct link *link, int invert){	struct document_options *doc_opts;	struct screen_char *template;	enum color_flags color_flags;	enum color_mode color_mode;	struct color_pair colors;	/* Allocate an extra background char to work on here. */	doc_view->link_bg = mem_alloc((1 + link->npoints) * sizeof(*doc_view->link_bg));	if (!doc_view->link_bg) return NULL;	doc_view->link_bg_n = link->npoints;	/* Setup the template char. */	template = &doc_view->link_bg[link->npoints].c;	template->attr = SCREEN_ATTR_STANDOUT;	/* For the color mode options we use the options set for the document.	 * But for the active link options we prefer to use the global	 * global_doc_opts since it is kept up to date by an option change	 * hook. However if it is not available fall back to use the options	 * from the viewed document. */	doc_opts = &doc_view->document->options;	color_flags = (doc_opts->color_flags | COLOR_DECREASE_LIGHTNESS);	color_mode = doc_opts->color_mode;	if (global_doc_opts) doc_opts = global_doc_opts;	if (doc_opts->underline_active_link)		template->attr |= SCREEN_ATTR_UNDERLINE;	if (doc_opts->bold_active_link)		template->attr |= SCREEN_ATTR_BOLD;	if (doc_opts->color_active_link) {		colors.foreground = doc_opts->active_link_fg;		colors.background = doc_opts->active_link_bg;	} else {		colors.foreground = link->color.foreground;		colors.background = link->color.background;	}	if (doc_opts->invert_active_link && invert) {		swap_values(color_t, colors.foreground, colors.background);		/* Highlight text-input form-fields correctly if contrast		 * correction is needed. */		if (link_is_textinput(link)) {			/* Make sure to use the options belonging to the			 * current document when checking for fg and bg color			 * usage. */			doc_opts = &doc_view->document->options;			/* Are we fallen angels who didn't want to believe that			 * nothing /is/ nothing and so were born to lose our			 * loved ones and dear friends one by one and finally			 * our own life, to see it proved? --Kerouac */			/* Wipe out all default correction for 16 color mode */			color_flags = (color_flags & ~COLOR_INCREASE_CONTRAST);			/* Make contrast correction invert things properly */			color_flags |= COLOR_ENSURE_INVERTED_CONTRAST;		}	}	set_term_color(template, &colors, color_flags, color_mode);	return template;}/* Save the current link's colours and attributes to doc_view->link_bg * and give it the appropriate colour and attributes for an active link. */voiddraw_current_link(struct session *ses, struct document_view *doc_view){	struct terminal *term = ses->tab->term;	struct screen_char *template;	struct link *link;	int cursor_offset;	int xpos, ypos;	int i;	assert(term && doc_view && doc_view->vs);	if_assert_failed return;	assert(ses->tab == get_current_tab(term));	if_assert_failed return;	assertm(!doc_view->link_bg, "link background not empty");	if_assert_failed mem_free(doc_view->link_bg);	link = get_current_link(doc_view);	if (!link) return;	i = !link_is_textinput(link) || ses->insert_mode == INSERT_MODE_OFF;	template = init_link_drawing(doc_view, link, i);	if (!template) return;	xpos = doc_view->box.x - doc_view->vs->x;	ypos = doc_view->box.y - doc_view->vs->y;	if (ses->insert_mode == INSERT_MODE_OFF	    && ses->navigate_mode == NAVIGATE_CURSOR_ROUTING) {		/* If we are navigating using cursor routing and not editing a		 * text-input form-field never set the cursor. */		cursor_offset = -1;	} else {		cursor_offset = get_link_cursor_offset(doc_view, link);	}	for (i = 0; i < link->npoints; i++) {		int x = link->points[i].x + xpos;		int y = link->points[i].y + ypos;		struct screen_char *co;		if (!is_in_box(&doc_view->box, x, y)) {			doc_view->link_bg[i].x = -1;			doc_view->link_bg[i].y = -1;			continue;		}		doc_view->link_bg[i].x = x;		doc_view->link_bg[i].y = y;		co = get_char(term, x, y);		copy_screen_chars(&doc_view->link_bg[i].c, co, 1);		if (i == cursor_offset) {			int blockable = (!link_is_textinput(link)					 && co->color != template->color);			set_cursor(term, x, y, blockable);			set_window_ptr(ses->tab, x, y);		} 		template->data = co->data; 		copy_screen_chars(co, template, 1);		set_screen_dirty(term->screen, y, y);	}}voidfree_link(struct document_view *doc_view){	assert(doc_view);	if_assert_failed return;	mem_free_set(&doc_view->link_bg, NULL);	doc_view->link_bg_n = 0;}/* Restore the colours and attributes that the active link had * before it was selected. */voidclear_link(struct terminal *term, struct document_view *doc_view){	assert(term && doc_view);	if_assert_failed return;	if (doc_view->link_bg) {		struct link_bg *link_bg = doc_view->link_bg;		int i;		for (i = doc_view->link_bg_n - 1; i >= 0; i--) {			struct link_bg *bgchar = &link_bg[i];			if (bgchar->x != -1 && bgchar->y != -1) {				struct terminal_screen *screen = term->screen;				struct screen_char *co;				co = get_char(term, bgchar->x, bgchar->y);				copy_screen_chars(co, &bgchar->c, 1);				set_screen_dirty(screen, bgchar->y, bgchar->y);			}		}		free_link(doc_view);	}}struct link *get_first_link(struct document_view *doc_view){	struct link *link, *undef;	struct document *document;	int height;	int i;	assert(doc_view && doc_view->document);	if_assert_failed return NULL;	document = doc_view->document;	if (!document->lines1) return NULL;	height = doc_view->vs->y + doc_view->box.height;	link = undef = document->links + document->nlinks;	for (i = int_max(0, doc_view->vs->y);	     i < int_min(height, document->height);	     i++) {		if (document->lines1[i]		    && document->lines1[i] < link)			link = document->lines1[i];	}	return (link == undef) ? NULL : link;}struct link *get_last_link(struct document_view *doc_view){	struct link *link = NULL;	struct document *document;	int height;	int i;	assert(doc_view && doc_view->document);	if_assert_failed return NULL;	document = doc_view->document;	if (!document->lines2) return NULL;	height = doc_view->vs->y + doc_view->box.height;	for (i = int_max(0, doc_view->vs->y);	     i < int_min(height, document->height);	     i++)		if (document->lines2[i] > link)			link = document->lines2[i];	return link;}static inline intlink_in_view_x(struct document_view *doc_view, struct link *link){	int i, dx, width;	assert(doc_view && link);	if_assert_failed return 0;	dx = doc_view->vs->x;	width = doc_view->box.width;	for (i = 0; i < link->npoints; i++) {		int x = link->points[i].x - dx;		if (x >= 0 && x < width)			return 1;	}	return 0;}intlink_in_view_y(struct document_view *doc_view, struct link *link){	int i, dy, height;	assert(doc_view && link);	if_assert_failed return 0;	dy = doc_view->vs->y;	height = doc_view->box.height;	for (i = 0; i < link->npoints; i++) {		int y = link->points[i].y - dy;		if (y >= 0 && y < height)			return 1;	}	return 0;}intlink_in_view(struct document_view *doc_view, struct link *link){	assert(doc_view && link);	if_assert_failed return 0;	return link_in_view_y(doc_view, link) && link_in_view_x(doc_view, link);}intcurrent_link_is_visible(struct document_view *doc_view){	struct link *link;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国一区二区三区| 精品91自产拍在线观看一区| av日韩在线网站| 欧美日韩精品欧美日韩精品一综合| 色噜噜狠狠成人网p站| 日韩一区二区在线观看视频| 欧美日韩精品是欧美日韩精品| 日韩精品专区在线| 国产精品三级视频| 日本午夜精品视频在线观看| 狠狠色丁香婷综合久久| 色综合久久综合网97色综合 | 欧美日韩三级在线| 久久综合国产精品| 午夜久久久久久久久久一区二区| 国产成人一级电影| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲丝袜精品丝袜在线| 美腿丝袜一区二区三区| 91在线云播放| 国产亚洲人成网站| 国产一区不卡视频| 欧美剧情电影在线观看完整版免费励志电影 | 国产精品久久久久久久久晋中| 丝袜美腿亚洲色图| 欧美日韩在线播| 日韩毛片精品高清免费| 成人妖精视频yjsp地址| 日韩精品一区二区三区三区免费| 天天色天天操综合| 欧美精品久久99| 美女在线一区二区| 欧美日韩精品一二三区| 天天做天天摸天天爽国产一区| 欧美色区777第一页| 亚洲免费av网站| 在线观看一区不卡| 日一区二区三区| 精品成人一区二区三区四区| 国产一区二区成人久久免费影院| 精品国产伦理网| 成人av影院在线| 伊人夜夜躁av伊人久久| 3d动漫精品啪啪一区二区竹菊| 日韩精品午夜视频| www久久精品| 91免费看`日韩一区二区| 亚洲国产精品久久久男人的天堂| 6080yy午夜一二三区久久| 国产寡妇亲子伦一区二区| 一区二区三区四区国产精品| 欧美电影影音先锋| 99麻豆久久久国产精品免费| 天天射综合影视| 国产喂奶挤奶一区二区三区| 91麻豆文化传媒在线观看| 久久成人麻豆午夜电影| 一区二区欧美视频| 国产欧美日韩另类视频免费观看| 欧美揉bbbbb揉bbbbb| 99精品一区二区三区| 国产乱子轮精品视频| 日本成人超碰在线观看| 亚洲精品乱码久久久久久日本蜜臀 | 日本二三区不卡| 国产精品亚洲第一区在线暖暖韩国 | 精品亚洲porn| 一区二区三区在线观看国产| 中文字幕欧美区| 国产区在线观看成人精品| 日韩精品一区二区三区四区| 欧美日韩亚洲高清一区二区| 欧洲精品中文字幕| 欧美日韩一区二区欧美激情| 91国产成人在线| 欧美裸体bbwbbwbbw| 欧洲国产伦久久久久久久| 精品视频一区三区九区| 欧美在线|欧美| 日韩视频免费观看高清完整版在线观看 | 在线观看视频一区二区欧美日韩| 欧美一区午夜精品| 欧美一区二区成人| 精品久久久久久久人人人人传媒 | 欧美在线视频全部完| 欧美日韩一区在线观看| 欧美一二三区在线| 国产欧美日韩三区| 怡红院av一区二区三区| 天堂影院一区二区| 美腿丝袜亚洲色图| av电影在线观看一区| 欧美精品欧美精品系列| 久久免费的精品国产v∧| 中文字幕一区二区三区在线不卡| 亚洲制服丝袜在线| 久久99精品国产.久久久久久 | 欧美成人猛片aaaaaaa| 中文无字幕一区二区三区| 一区二区三区**美女毛片| 精品一区在线看| 国产午夜精品一区二区三区视频| 亚洲乱码国产乱码精品精可以看| 激情欧美一区二区| 在线一区二区三区| 国产精品久久久久久久久免费樱桃| 亚洲电影激情视频网站| 成人动漫一区二区在线| 日韩欧美www| 午夜欧美视频在线观看 | 亚洲欧洲精品一区二区精品久久久| 日本欧洲一区二区| 一本色道亚洲精品aⅴ| 国产欧美综合在线| 国精产品一区一区三区mba视频 | 粉嫩aⅴ一区二区三区四区| 日韩一区二区精品在线观看| 亚洲国产精品麻豆| 在线观看免费亚洲| 亚洲一区二区偷拍精品| 欧美午夜片在线看| 亚洲18女电影在线观看| 欧美亚州韩日在线看免费版国语版| 亚洲女人****多毛耸耸8| 99久久99久久精品免费观看| 欧美激情在线一区二区三区| 成人自拍视频在线观看| 亚洲视频网在线直播| 91在线视频观看| 亚洲精品一二三区| 欧美日韩国产综合一区二区三区| 亚洲成人免费视| 精品久久免费看| 99麻豆久久久国产精品免费| 午夜成人在线视频| 51精品秘密在线观看| 蜜臀av性久久久久av蜜臀妖精| 国产亚洲欧美日韩在线一区| 成人h精品动漫一区二区三区| 亚洲精品视频免费观看| 日韩视频免费观看高清完整版| 精品一区二区三区免费观看| 亚洲三级久久久| 精品国产一区二区亚洲人成毛片 | 亚洲精品午夜久久久| 91精品国产色综合久久ai换脸 | 26uuu欧美| 欧美日韩mp4| 一本色道久久综合狠狠躁的推荐| 丝袜亚洲另类欧美综合| 国产欧美综合在线| 日韩一二三区视频| 欧美色电影在线| 色婷婷精品久久二区二区蜜臀av| 免费亚洲电影在线| 午夜精品爽啪视频| 亚洲欧美乱综合| 国产日韩欧美精品电影三级在线| 91精品国产综合久久香蕉麻豆| 波多野结衣在线aⅴ中文字幕不卡| 久久er99精品| 日日夜夜免费精品视频| 亚洲一区影音先锋| 亚洲福利视频三区| 亚洲制服丝袜一区| 亚洲乱码国产乱码精品精可以看| 国产精品久久久久久久裸模| 久久精品欧美一区二区三区不卡 | 国产乱码精品一区二区三 | 69久久99精品久久久久婷婷| 久久免费电影网| 亚洲精品免费一二三区| 樱桃国产成人精品视频| 亚洲国产成人精品视频| 亚洲国产精品视频| 人妖欧美一区二区| 成人少妇影院yyyy| 91在线观看美女| 在线综合视频播放| 久久精品亚洲一区二区三区浴池| 国产精品乱码妇女bbbb| 成人欧美一区二区三区视频网页| 亚洲欧洲成人自拍| 天天综合网天天综合色| 久久国产精品99精品国产| 国产精品一区二区视频| 色哟哟精品一区| 日韩午夜三级在线| 最新成人av在线| 轻轻草成人在线| 午夜精品久久久久久久| 亚洲精品五月天| 极品少妇一区二区三区精品视频| 国产福利91精品一区二区三区| 成人精品在线视频观看| 麻豆国产欧美日韩综合精品二区 | 国产成a人亚洲精| 国产精品家庭影院| 色婷婷激情综合| 午夜久久电影网|