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

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

?? 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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区五区| 国产日韩欧美激情| 日韩一级片在线观看| 51精品国自产在线| 色综合天天综合网天天狠天天| 欧洲在线/亚洲| 欧美午夜影院一区| 911精品国产一区二区在线| 欧美精品乱人伦久久久久久| 欧美精品v国产精品v日韩精品 | 91在线观看下载| 国产成人精品免费一区二区| 成人性生交大片免费看在线播放 | 欧美国产乱子伦 | av影院午夜一区| 一本到不卡精品视频在线观看| 在线视频观看一区| 日韩一区二区精品在线观看| 精品国产青草久久久久福利| 欧美激情一区在线观看| 亚洲乱码中文字幕| 六月婷婷色综合| 国产成人在线免费| 91福利小视频| 精品三级av在线| 国产精品区一区二区三区| 国产精品―色哟哟| 午夜精品一区在线观看| 国模套图日韩精品一区二区| a4yy欧美一区二区三区| 欧美男男青年gay1069videost| 日韩亚洲欧美中文三级| 日本一区二区三区在线观看| 亚洲综合视频网| 日韩精品91亚洲二区在线观看| 久久99蜜桃精品| www.欧美.com| 777欧美精品| 国产精品视频一二三| 亚洲va欧美va人人爽| 精品午夜一区二区三区在线观看| 99久久99久久久精品齐齐| 日韩二区在线观看| 色哟哟日韩精品| 精品国产乱码久久久久久浪潮 | 一区二区视频在线看| 日本aⅴ精品一区二区三区| 粉嫩av亚洲一区二区图片| 91小视频在线免费看| 欧美一区二区三区免费大片| 久久精品人人爽人人爽| 一区二区三区免费观看| 国产综合成人久久大片91| 99精品欧美一区二区三区小说 | 色婷婷av久久久久久久| 成人av在线播放网址| 日韩一区二区三区av| 亚洲美女偷拍久久| 国产成人在线影院| 久久综合九色综合97婷婷女人 | 蜜臀va亚洲va欧美va天堂| 91麻豆国产自产在线观看| 久久蜜桃一区二区| 老司机免费视频一区二区| 91福利在线导航| 亚洲男女一区二区三区| 精品一区二区免费| 欧美日韩国产综合草草| 国产精品美女久久久久aⅴ| 精品一区二区日韩| 欧美精品日日鲁夜夜添| 亚洲女同一区二区| 懂色av一区二区夜夜嗨| 国产午夜三级一区二区三| 青青草国产精品亚洲专区无| 欧美一区二区精品久久911| 成人少妇影院yyyy| 日韩写真欧美这视频| 一区二区三区在线影院| 欧美一区二区三区四区高清| 婷婷综合在线观看| 久久久噜噜噜久久中文字幕色伊伊| 久久九九影视网| 日本sm残虐另类| 成人福利视频在线看| 国产曰批免费观看久久久| 日本不卡视频一二三区| 国产农村妇女毛片精品久久麻豆 | 婷婷开心激情综合| 精品日韩在线观看| 国产精品亚洲午夜一区二区三区| 亚洲美女偷拍久久| 欧美日韩精品专区| 美女久久久精品| 精品国产一区二区三区忘忧草| 五月开心婷婷久久| 欧美一卡2卡3卡4卡| 午夜日韩在线电影| 精品国产一区二区三区忘忧草| jizzjizzjizz欧美| 99久久婷婷国产| 九九九精品视频| 中文字幕色av一区二区三区| 欧美日韩一区二区在线视频| 成人精品一区二区三区四区 | 亚洲成年人影院| 欧美高清www午色夜在线视频| 欧美无砖专区一中文字| 美女爽到高潮91| 亚洲午夜成aⅴ人片| 精品国产精品网麻豆系列| 国产成人夜色高潮福利影视| 亚洲一区二区三区视频在线播放| 91久久精品一区二区三| 国产高清精品在线| 亚洲免费观看在线观看| 中文字幕欧美国产| 亚洲与欧洲av电影| 天天影视色香欲综合网老头| 国产精品久久久一本精品| 日韩视频免费观看高清在线视频| 在线亚洲免费视频| 91国偷自产一区二区开放时间 | 亚洲欧洲av另类| 久久久久久久久久久久久女国产乱| av一区二区三区在线| 天天av天天翘天天综合网 | 成人免费av在线| 亚洲综合色婷婷| 日韩欧美一级在线播放| 成人黄色小视频| 午夜私人影院久久久久| 91精品国产入口在线| 成人禁用看黄a在线| 天天综合天天做天天综合| 欧美激情一区二区三区全黄| 色就色 综合激情| 久久99久久99小草精品免视看| 亚洲视频一区在线观看| 欧美一级高清片| 国产成人精品综合在线观看| 天天操天天色综合| 欧美经典一区二区三区| 欧美日韩国产一二三| 高清国产一区二区| 亚洲高清三级视频| 中文字幕在线观看一区| 日韩免费看网站| 国产成人夜色高潮福利影视| 亚洲国产美国国产综合一区二区| 精品国产髙清在线看国产毛片| 欧美天堂一区二区三区| 国产精品亚洲综合一区在线观看| 亚洲精品国产精华液| 国产欧美中文在线| 欧美日韩电影一区| 一本大道久久a久久精二百| 久久se精品一区精品二区| 国产精品第四页| 久久精品视频在线看| 91精品在线观看入口| caoporm超碰国产精品| 精品一区二区三区欧美| 日日摸夜夜添夜夜添国产精品| 一本大道久久a久久精二百| 亚洲国产精品影院| 精品国产乱码久久久久久牛牛| 国产一区视频导航| 日韩一级大片在线观看| 日本大胆欧美人术艺术动态| 99精品视频在线播放观看| 欧美一区二区视频网站| 亚洲国产精品久久人人爱| 精品一区二区精品| 91蜜桃在线免费视频| 欧美无人高清视频在线观看| 国产精品入口麻豆九色| 久久久亚洲精品一区二区三区| 欧美电影一区二区| 欧美日韩一区不卡| 91福利在线导航| 91视频精品在这里| www.综合网.com| 国产精品自产自拍| 国产成a人无v码亚洲福利| 国产一区二区电影| 亚洲国产日韩综合久久精品| 中文字幕一区二区三区不卡在线| 国产片一区二区| 久久久久久久综合日本| 精品99一区二区三区| 久久久久综合网| 精品国产凹凸成av人导航| 久久综合九色综合欧美亚洲| 国产亚洲人成网站| 日韩欧美国产一区二区三区| 欧美日韩成人激情| 欧美一级久久久| 欧美一级高清大全免费观看| 亚洲精品一区二区三区99|