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

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

?? alert.ecd.c

?? 操作系統SunOS 4.1.3版本的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
#ifndef lint#ifdef sccsstatic char	sccsid[] = "@(#)alert.ecd.c 1.1 92/07/30";#endif#endif#ifdef ecd.alert/* * Copyright (c) 1986, 1987 by Sun Microsystems, Inc. */#include <stdio.h>#include <ctype.h>#include <varargs.h>#include <sys/file.h>#include <sys/types.h>#include <sys/time.h>#include <sys/ioctl.h>#include <sundev/kbd.h>#include <sundev/kbio.h>#include <sunwindow/sun.h>#include <sunwindow/defaults.h>#include <sunwindow/window_hs.h>#include <sunwindow/win_enum.h>#include <suntool/fullscreen.h>#include <suntool/sunview.h>#include <suntool/tool_struct.h>#include <suntool/panel.h>#ifdef ecd.help#include <suntool/help.h>#endif#include <suntool/alert.h>#include <suntool/alert_impl.h>/* ------------------------------------------------------------------ *//* --------------------------- Globals ------------------------------ *//* ------------------------------------------------------------------ */static alert_handle		saved_alert;static struct pixfont		*button_font;static int			default_beeps;static int			alert_use_audible_bell;static int			alert_jump_cursor;static int			alert_ignore_optional;static int			alert_fd;static Rect			alert_screen_rect;static short alert_bang[] = {#include <images/alert_bang64.pr>};mpr_static(alert_bang_pr, 64, 64, 1, alert_bang);static short alert_qmark[] = {#include <images/alert_qmark64.pr>};mpr_static(alert_qmark_pr, 64, 64, 1, alert_qmark);static short alert_gray50_data[] = {#include <images/square_50.pr>};mpr_static(alert_gray50_patch, 16, 16, 1, alert_gray50_data);/* ------------------------------------------------------------------ *//* --------------------------- DISPLAY PROCS ------------------------ *//* ------------------------------------------------------------------ */static int		alert_show();		/* display alert	 */static void		alert_get_alert_size(); /* determine rect        */static Pw_pixel_cache  *alert_drawbox();        /* draw outline & shadow */static void		alert_layout();		/* draw items            */static void		alert_build_button();	/* compute button pr     */static void		alert_outline_button(); /* draw std button       */static void		alert_yes_outline_button();  /* draw YES button  *//* ------------------------------------------------------------------ *//* --------------------------- UTILITY PROCS ------------------------ *//* ------------------------------------------------------------------ */static void		alert_select_button();static void		alert_unselect_button();static void		alert_preview_message_font();static void		alert_preview_button_font();static void 		alert_set_avlist();static void		alert_default();static void		alert_add_button_to_list();static int		alert_text_width();static int		alert_button_width();static int		alert_get_fd();static button_handle	alert_button_for_event();static int		alert_offset_from_baseline();static int		calc_max();static button_handle	create_button_struct();static void		free_button_structs();static void		alert_copy_event();static void		alert_do_bell();static void		alert_blocking_wait();/* ------------------------------------------------------------------ *//* --------------------------- STATICS ------------------------------ *//* ------------------------------------------------------------------ */static int		left_marg = 9;static int 		right_marg = 9;static int		top_marg = 19;static int		bottom_marg = 13;static int		row_gap = 4;static int		button_gap;static int		min_button_gap = 12;/* * In the case that the height of the image is larger than the height of  * the total text, short_text_line is the number of the lines in the text. * Otherwise, it's 0. */static int		 short_text_line;static struct pixfont	*defpf;static int		 image_height;static int		 image_width;#define BORDER			3	/* white space surounding text */#define SHADOW			6	/* thickness of shadow */#define BUTTON_HEIGHT_EXTRA	8  	/* max extra needed for yes button */#define YES_BUTTON_Y_DIFF	4	/* height diff between yes and no  */#define ALERT_ACTION_DO_IT	'\015'  /* simple return */#define MENU_BORDER		2/* * Number of pixels of the image that is hanging outside the alert_box */#define IMAGE_OUTSIDE_BOX		32/* ------------------------------------------------------------------ *//* ----------------------- Public Interface ------------------------- *//* ------------------------------------------------------------------ *//* VARARGS */intalert_prompt(client_frame, event, va_alist)    Frame	 client_frame;    Event	*event;    va_dcl{    va_list			valist;    int 			result;#ifdef ecd.help    for (;;) {	va_start(valist);	result = alert_show(client_frame, event, valist);	va_end(valist);	if (result != ALERT_HELP)	    break;	help_request(client_frame, saved_alert->help_data, event);    }#else    va_start(valist);    result = alert_show(client_frame, event, valist);    va_end(valist);#endif    return (result);}/* ------------------------------------------------------------------ *//* ----------------------PRIVATE PROCS------------------------------- *//* ------------------------------------------------------------------ */static intalert_show(client_frame, event, valist)    Frame	 client_frame;    Event	*event;    va_list	valist;{    Event			ie;    Alert_attribute		avlist[ATTR_STANDARD_SIZE];    register alert_handle	alert;    int				result, fd, opened;    Pw_pixel_cache		*bitmap_under;    struct rect 		rectsaved, rect;    struct fullscreen 		*fs;    button_handle	button;    button_handle	current_button = NULL;    int			is_highlighted = FALSE;    int			old_mousex, old_mousey;    unsigned short	this_event;        /*     * assuming that the image from the top of the alert_box proper, then     * image_height is the number of pixels from the top of the alert_box to     * lowest point of the image glyph.     */    if (!saved_alert)  {	char	*font_name;	int	my_fd;	saved_alert = (struct alert *)calloc(1, sizeof(struct alert));	if (!saved_alert) {	    (void)printf(stderr, "Alert ERROR: malloc failed.");	    return (ALERT_FAILED);	}	alert_use_audible_bell = (int)defaults_get_boolean(	    "/SunView/Audible_Bell", (Bool)TRUE, (int *)NULL);	alert_jump_cursor = (int)defaults_get_boolean(	    "/SunView/Alert_Jump_Cursor", (Bool)TRUE, (int *)NULL);	alert_ignore_optional = (int)defaults_get_boolean(	    "/SunView/Ignore_Optional_Alerts", (Bool)FALSE , (int *)NULL);	font_name = defaults_get_string(	    "/Menu/Font",		    "/usr/lib/fonts/fixedwidthfonts/screen.b.14", 		    (int *)0);	button_font = pf_open(font_name);	default_beeps = defaults_get_integer(		"/SunView/Alert_Bell", 1, (int *)NULL);	defpf = pw_pfsysopen();        if (!button_font)            button_font = defpf;    }    alert = saved_alert;    if ((opened = alert_get_fd(&alert->fd_for_fullscreen)) == 0) {	return (ALERT_FAILED);    }    fd = alert->fd_for_fullscreen;    (void) alert_default(alert);    alert->event = (Event *)event;    alert->client_frame = client_frame;    attr_make (avlist, ATTR_STANDARD_SIZE, valist);    (void)alert_set_avlist (alert, avlist, FALSE);        /* only if ALERT_OPTIONAL && ALERT_BUTTON_YES && default option */    if (alert->is_optional &&		alert->yes_button_exists &&		(alert_ignore_optional == TRUE))        return (ALERT_YES);    alert_do_bell(alert, fd);    fs = fullscreen_init(fd); /* go fullscreen first */    if (fs == 0) {	return (ALERT_FAILED);  /* probably out of fds */    }    /* now determine the size of the alert */    (void)alert_get_alert_size(alert, &rect, fs->fs_windowfd);    if ((bitmap_under = alert_drawbox( /* then draw empty box */		fs->fs_pixwin, &rect, &rectsaved, fs)) == NULL)	goto RestoreState;    /* now fill in the box with the image, text, buttons etc */    (void)alert_layout(alert, &rect, fs->fs_pixwin);    if (alert_jump_cursor && alert->yes_button_exists) {	button_handle	curr;      	old_mousex = win_get_vuid_value(fd, LOC_X_ABSOLUTE);    	old_mousey = win_get_vuid_value(fd, LOC_Y_ABSOLUTE);	for (curr = alert->button_info; curr != NULL; curr = curr->next) 	    if (curr->is_yes)	    	win_setmouseposition(fd,	    	    curr->button_rect.r_left + curr->button_rect.r_width / 2,	    	    curr->button_rect.r_top + curr->button_rect.r_height / 2	    	    );    }    /* Stay in fullscreen until a button is pressed, or trigger used */    for (;;) {	unsigned short	trigger = alert->default_input_code;    	if (input_readevent(fs->fs_windowfd, &ie) == -1)	    break;	this_event = event_action(&ie); /* get encoded event */		button = alert_button_for_event(alert, &ie);	if ((this_event == trigger) && ((trigger == (int)MS_LEFT) ? 	    (event_is_up(&ie) && (current_button == NULL)) : 1)) { 	    /* catch UP mouse left */	    alert->result = ALERT_TRIGGERED;	    (void) alert_copy_event(alert, &ie);	    goto Done;	} else if (((this_event == ACTION_STOP) || (this_event == WIN_STOP))	        && saved_alert->no_button_exists) {	    alert->result = ALERT_NO;	    (void) alert_copy_event(alert, &ie);	    goto Done;        } else if ((this_event == ACTION_DO_IT	         || this_event == ALERT_ACTION_DO_IT)		    && saved_alert->yes_button_exists) {	    alert->result = ALERT_YES;	    (void) alert_copy_event(alert, &ie);	    goto Done;	} else if ((this_event == MS_LEFT) && (alert->button_info)) {	    if (event_is_down(&ie) && (button != NULL)) {		alert_select_button(fs->fs_pixwin, button);		current_button = button;		is_highlighted = TRUE;	    } else if (event_is_up(&ie)) {		if ((current_button && is_highlighted)			&& (button != NULL)	                && (button == current_button)) {		    alert->result = button->value;		    (void) alert_copy_event(alert, &ie);		    goto Done;		} else if ((current_button && is_highlighted)		        && (button != NULL)	                && (button != current_button)) {		    alert->result = button->value;		    (void) alert_copy_event(alert, &ie);		    goto Done;		}	    }#ifdef ecd.help	} else if (this_event == ACTION_HELP) {	    if (event_is_down(&ie)) {		alert->result = ALERT_HELP;		(void) alert_copy_event(alert, &ie);		goto Done;	    }#endif	} else if (this_event == LOC_DRAG) {/* mouse moved w/MS down */	    if (((current_button != NULL) && is_highlighted)		    && ((button == NULL))		    &&  (button != current_button)) {		alert_unselect_button(fs->fs_pixwin, current_button);		current_button = NULL;		is_highlighted = FALSE;	    }	    if ((button != current_button) && (is_highlighted == FALSE)) {		alert_select_button(fs->fs_pixwin, button);		current_button = button;		is_highlighted = TRUE;	    }	}    }Done:    pw_restore_pixels(fs->fs_pixwin, bitmap_under);RestoreState:    if (alert_jump_cursor && alert->yes_button_exists) 	    win_setmouseposition(fd, old_mousex, old_mousey);    fullscreen_destroy(fs);    free_button_structs(alert->button_info);    result = alert->result;    return (result);}static voidalert_copy_event(alert, event)    register alert_handle alert;    Event		 *event;{    if (saved_alert->event == (Event *) 0) {	return;    } else {	saved_alert->event->ie_code = event->ie_code;	saved_alert->event->ie_flags = event->ie_flags;	saved_alert->event->ie_shiftmask = event->ie_shiftmask;	saved_alert->event->ie_locx = event->ie_locx;	saved_alert->event->ie_locy = event->ie_locy;	saved_alert->event->ie_time.tv_sec = event->ie_time.tv_sec;	saved_alert->event->ie_time.tv_usec = event->ie_time.tv_usec;    }/*    saved_alert->event->ie_locx = (event_x(event) < 0) ?	    (saved_alert->position_x - abs(event_x(event))) :	    (saved_alert->position_x + event_x(event));    saved_alert->event->ie_locy = (event_y(event) < 0) ? 	    (saved_alert->position_y - abs(event_y(event))) :	    (saved_alert->position_y + event_y(event));*/    if (saved_alert->client_frame) { /* make event client relative */	Rect	client_frame_place;	window_getrelrect(0,	    window_fd(saved_alert->client_frame), &client_frame_place);        saved_alert->event->ie_locx -= client_frame_place.r_left;        saved_alert->event->ie_locy -= client_frame_place.r_top;    }}/* ------------------------------------------------------------------ *//* --------------------------- Statics ------------------------------ *//* ------------------------------------------------------------------ */static intalert_preview_avlist_for_int_value(attr, avlist, default_if_not_present)    Alert_attribute		attr;    register Alert_attribute	*avlist;    int				default_if_not_present;{    Alert_attribute	current_attr;    int			value = default_if_not_present;    for (; *avlist; avlist = alert_attr_next(avlist)) {	current_attr = avlist[0];	if (attr == current_attr) value = (int)avlist[1];    }    return (int)value;}static voidalert_preview_button_font(alert, avlist)    register alert_handle	alert;    register Alert_attribute	*avlist;{    Alert_attribute	attr;    caddr_t		value;    for (; *avlist; avlist = alert_attr_next(avlist)) {        attr = avlist[0]; value = (caddr_t)avlist[1];	switch (attr) {	  case ALERT_BUTTON_FONT:	    alert->button_font = (struct pixfont *) value;	    break;	  default:	    break;	}    }}static voidalert_preview_message_font(alert, avlist)    register alert_handle	alert;    register Alert_attribute	*avlist;{    Alert_attribute	attr;    caddr_t		value;    for (; *avlist; avlist = alert_attr_next(avlist)) {        attr = avlist[0]; value = (caddr_t)avlist[1];	switch (attr) {	  case ALERT_MESSAGE_FONT:	    alert->message_font = (struct pixfont *) value;	    break;	  default:	    break;	}    }}static voidalert_set_avlist(alert, avlist, caller_external)    register alert_handle	alert;    register Alert_attribute	*avlist;    int				caller_external;{    int			i;    int			yes_button_seen = FALSE;    int			no_button_seen = FALSE;    int			number_of_buttons_seen = 0;    int			trigger_set = 0;    Alert_attribute	attr;    caddr_t		value;    int			image_attr_seen = 0; /* use default if haven't */        alert_preview_button_font(alert, avlist);    alert_preview_message_font(alert, avlist);    for (; *avlist; avlist = alert_attr_next(avlist)) {        attr = avlist[0]; value = (caddr_t)avlist[1];	switch (attr) {	case WIN_X:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲品质自拍视频| 成人免费视频视频在线观看免费| 免费成人美女在线观看.| 国产久卡久卡久卡久卡视频精品| 91麻豆免费看片| 国产丝袜美腿一区二区三区| 亚洲成a人v欧美综合天堂| 国产高清不卡一区| 欧美一区二区成人6969| 亚洲综合偷拍欧美一区色| 国产精品羞羞答答xxdd| 日韩欧美一级二级| 亚洲国产日韩在线一区模特| 成人污视频在线观看| 精品蜜桃在线看| 午夜精品久久一牛影视| 91看片淫黄大片一级在线观看| 日韩欧美在线网站| 午夜精彩视频在线观看不卡| 日本丰满少妇一区二区三区| 中文字幕不卡的av| 国产不卡在线播放| 2021中文字幕一区亚洲| 久久福利资源站| 欧美一级电影网站| 强制捆绑调教一区二区| 欧美久久高跟鞋激| 天堂久久久久va久久久久| 欧美在线看片a免费观看| 亚洲欧美乱综合| 色香色香欲天天天影视综合网| 日本一区二区三区久久久久久久久不| 狠狠色丁香婷综合久久| 精品国产乱码久久久久久夜甘婷婷 | 国产精品麻豆视频| 国内精品免费在线观看| 精品对白一区国产伦| 久久国产精品免费| 久久久久久久综合日本| 国产成人av一区二区| 国产欧美日韩在线观看| 成人爱爱电影网址| 亚洲欧美一区二区不卡| 欧美色区777第一页| 一区二区免费看| 欧美精品色一区二区三区| 首页国产丝袜综合| 精品国产伦一区二区三区观看体验| 精品亚洲porn| 中文字幕乱码亚洲精品一区| 成人h版在线观看| 悠悠色在线精品| 欧美一区二区黄色| 国产精品夜夜嗨| 亚洲男人电影天堂| 9191成人精品久久| 国产高清精品久久久久| 亚洲日本免费电影| 91精品在线观看入口| 国产麻豆91精品| 亚洲摸摸操操av| 91精品国产综合久久香蕉的特点| 久久精品国产**网站演员| 久久久久久日产精品| 91啪九色porn原创视频在线观看| 亚洲成人免费在线| 久久亚洲二区三区| 91国偷自产一区二区三区成为亚洲经典| 亚洲一区二区三区美女| 欧美精品一区二区三区高清aⅴ| 国产超碰在线一区| 亚洲永久精品大片| 久久久久99精品国产片| 色婷婷久久久久swag精品| 麻豆成人久久精品二区三区小说| 国产精品欧美久久久久一区二区 | 激情文学综合插| 国产精品成人一区二区艾草| 欧美一区二区三区成人| 不卡在线视频中文字幕| 蜜臂av日日欢夜夜爽一区| 亚洲欧美日韩国产综合在线 | 久久久精品中文字幕麻豆发布| 懂色av噜噜一区二区三区av| 亚洲成在人线在线播放| 日本一区二区免费在线观看视频| 欧美伦理视频网站| 一本到高清视频免费精品| 国产精品一区二区不卡| 美女性感视频久久| 亚洲一区在线观看免费观看电影高清 | 在线一区二区视频| 国产精品一区二区在线看| 日本系列欧美系列| 亚洲免费av高清| 国产精品久久久久桃色tv| 精品成人私密视频| 日韩精品一区二区三区swag| 欧美伊人久久大香线蕉综合69| 成人黄色片在线观看| 国产高清无密码一区二区三区| 免费观看日韩电影| 五月综合激情日本mⅴ| 亚洲一区二区三区影院| 亚洲欧洲综合另类在线| 亚洲日本在线天堂| 亚洲欧美一区二区在线观看| 国产精品美女www爽爽爽| 久久久国产一区二区三区四区小说 | 亚洲精品美腿丝袜| 国产精品理论片在线观看| 国产女主播一区| 国产亚洲精品aa午夜观看| 久久综合九色综合97婷婷女人 | 丁香六月综合激情| 国产大陆精品国产| 国产另类ts人妖一区二区| 国产一区二区三区四| 国模套图日韩精品一区二区 | a在线欧美一区| 成人aa视频在线观看| 不卡高清视频专区| 99re这里只有精品视频首页| 99精品欧美一区二区三区小说 | 国产一区二区三区综合| 极品销魂美女一区二区三区| 精品午夜久久福利影院| 国产99久久久国产精品潘金网站| 国产原创一区二区三区| 国产一区二区不卡在线| 成人动漫av在线| 在线影视一区二区三区| 欧美日韩一区二区三区在线| 91精品福利在线一区二区三区| 精品裸体舞一区二区三区| 欧美激情一区二区三区四区| 18欧美亚洲精品| 亚洲一区二区视频在线| 麻豆成人久久精品二区三区红| 国产传媒一区在线| eeuss鲁片一区二区三区在线看| 一本大道久久a久久综合| 91麻豆精品国产自产在线| 2024国产精品| 亚洲在线免费播放| 国产在线国偷精品免费看| 成人18视频在线播放| 制服丝袜中文字幕亚洲| 久久精品人人做人人爽人人| 亚洲激情五月婷婷| 麻豆精品蜜桃视频网站| 99精品欧美一区二区三区小说 | 高清shemale亚洲人妖| 色婷婷激情一区二区三区| 欧美一区二区三区视频在线 | 亚洲综合另类小说| 精品一区二区免费视频| 91视视频在线观看入口直接观看www | 日韩精品资源二区在线| 国产精品美女久久久久久| 亚州成人在线电影| 成人激情av网| 日韩欧美国产高清| 一区二区三区.www| 成人一级黄色片| 91麻豆精品国产91久久久使用方法 | 国产成人av一区二区三区在线观看| 色综合中文字幕国产 | 日韩午夜精品电影| 亚洲天堂2014| 国产精品一区二区三区四区| 欧美精品久久天天躁| 国产精品三级视频| 久久99精品一区二区三区三区| 91视频一区二区三区| 久久久久久久久久电影| 免费观看在线色综合| 精品视频1区2区| 亚洲欧洲日韩在线| 国产盗摄女厕一区二区三区| 欧美一区二区三区免费在线看| 亚洲免费在线视频一区 二区| 国产麻豆精品视频| 欧美成人官网二区| 人人精品人人爱| 欧美日韩欧美一区二区| 一区二区三区日韩在线观看| 成人黄色小视频| 国产精品久久久久影院色老大| 精品亚洲欧美一区| 欧美tickle裸体挠脚心vk| 日日欢夜夜爽一区| 欧美久久久久免费| 日韩制服丝袜av| 91精品一区二区三区久久久久久| 一区二区三区精品视频在线| 91成人在线观看喷潮| 一区二区三区四区高清精品免费观看| 99久久er热在这里只有精品15| 中文字幕亚洲在|