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

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

?? alert.c

?? 操作系統(tǒng)SunOS 4.1.3版本的源碼
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/*    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:	    alert->client_offset_x = (int)value;	    break;	case WIN_Y:	    alert->client_offset_y = (int)value;	    break;	case ALERT_POSITION: 	    if ((int)value == (int)ALERT_SCREEN_CENTERED ||		(int)value == (int)ALERT_CLIENT_CENTERED ||		(int)value == (int)ALERT_CLIENT_OFFSET)		alert->position = (int)value;	    break;	case ALERT_OPTIONAL:	    alert->is_optional = ((int)value == 1) ? 1 : 0;	    break;	case ALERT_NO_BEEPING:	    if ((int)value == 1) alert->dont_beep = 1;	    break;	case ALERT_TRIGGER:	    alert->default_input_code = (int)avlist[1];	    trigger_set = 1;	    break;	case ALERT_MESSAGE_STRINGS_ARRAY_PTR: 	    alert->message_items = (char **)value;	    break;	case ALERT_MESSAGE_STRINGS:	    alert->message_items = (char **)&avlist[1];	    break;	/* 	 * ALERT_NO_IMAGE and ALERT_IMAGE are obsolete attributes.	 */	case ALERT_NO_IMAGE:	case ALERT_IMAGE:	    break;	case ALERT_BUTTON_YES: {	    struct pixrect	*image;	    button_handle	button;	    if (!yes_button_seen) {		yes_button_seen = TRUE;	    } else {	        fprintf(		    stderr,		    "alert: Only one ALERT_BUTTON_YES allowed. Attr ignored.\n");		break;	    }	    button = (button_handle)create_button_struct();	    button->string = (char *)avlist[1];	    button->is_yes = TRUE;	    button->value = ALERT_YES;	    alert->yes_button_exists = TRUE;	    number_of_buttons_seen++;	    (void) alert_add_button_to_list(alert, button);	    break;	}	case ALERT_BUTTON_NO: {	    struct pixrect	*image;	    button_handle	button;	    if (!no_button_seen){		no_button_seen = TRUE;	    } else {	        fprintf(		    stderr,		    "alert: Only one ALERT_BUTTON_NO allowed. Attr ignored.\n");		break;	    }	    button = (button_handle)create_button_struct();	    button->string = (char *)avlist[1];	    button->is_no = TRUE;	    button->value = ALERT_NO;	    alert->no_button_exists = TRUE;	    number_of_buttons_seen++;	    (void) alert_add_button_to_list(alert, button);	    break;	}	case ALERT_BUTTON: { 	    button_handle	button;	    button = (button_handle)create_button_struct();	    button->string = (char *)avlist[1];	    button->value = (int)avlist[2];	    (void) alert_add_button_to_list(alert, button);	    number_of_buttons_seen++;	    break;	}	case ALERT_BUTTON_FONT:	case ALERT_MESSAGE_FONT:	    /* already previewed above */	    break;	case HELP_DATA:	    alert->help_data = value;	    break;	default:	    fprintf(stderr, "alert: attribute not allowed.\n");	    break;	}    }    if ((number_of_buttons_seen == 0) && (trigger_set == 0)) 	alert->default_input_code = (int)ACTION_STOP;}/* ------------------------------------------------------------------ */static voidalert_get_alert_size(alert, rect, fd)    register alert_handle	alert;    struct rect			*rect;    int				fd;{    Rect		r;    int			x, y, height, width, i, left, top, num_lines = 0;    int			swoosh_offset =     			    ((struct pixrect *)&alert_arrow_right_pr)->pr_size.x - 4;    short_text_line = 0;    x = 0;  y = 0; /* start calculations out at zero, add margins later */#ifdef OLD_ALERT_IMAGES    if (alert->image_item) 	x += alert->image_item->pr_size.x + left_marg; #else/*    x += ((struct pixrect *)&alert_arrow_right_pr)->pr_size.x +          ((struct pixrect *)&alert_leftswoosh_pr)->pr_size.x; */#endif OLD_ALERT_IMAGES    if (alert->message_items) {	char	**strs;	char	**tmp_strings;	int	max_width = 0;	int	str_width = 0;        Pixfont	*mess_font = (alert->message_font) ?				alert->message_font : defpf;	strs = (char **)alert->message_items;	tmp_strings = (char **)alert->message_items;	while (*strs) {	    str_width = alert_text_width(mess_font, (char *)*strs);	    max_width = calc_max(str_width, max_width);	    num_lines++;	    strs++;	}	/*	 * The two pixrects are layed out such that the right arrow pixrect	 * is layered 16 pixels both to the right and down of the swoosh pixrect.	 * The assumption is that the arrow comes in pointing pretty much	 * at the text.  The pixrect of the arrow is 64 pixels wide, but	 * only 60 of them are in the border of the alert box.	 * The layout is such that the text is 60 pixels plus the left	 * margin inside of the alert_box on the left and is 60 pixels plus	 * the right margin inside of the alert_box on the right.  The	 * buttons are layed out such that the first button is "left_margin"	 * pixels inside the alert_box and the last is "right_margin" pixels	 * inside the alert_box.	 */	x += max_width + swoosh_offset * 2;	y += (num_lines*mess_font->pf_defaultsize.y);    }    /*     * Make sure that the text part is at least as high as the     * height of the swoosh glyph     */    if (y + row_gap + top_marg > swoosh_height)  {	y += row_gap;	short_text_line = 0;    } else {        short_text_line = num_lines;	y = swoosh_height;    }    i = 0;    if (alert->button_info) {	int  		max_buttons_width = 0;	int		width = 0;	int		total = 0;        button_handle	curr;        struct pixfont *font = alert->button_font;	for (curr = alert->button_info; curr != NULL; curr = curr->next) {	    width = alert_button_width(font, curr);	    max_buttons_width += width;	    i++; 	    }	y += font->pf_defaultsize.y + BUTTON_HEIGHT_EXTRA;	/*	 * figure out the total pixels needed to fit buttons and text, which	 * ever is longer.  This is just for the actual buttons and/or text,	 * and not including the margins	 */	x = calc_max(max_buttons_width, x);	total = x + left_marg + right_marg + (4*BORDER);	if (total >= alert_screen_rect.r_width) {   	  /* if buttons too wide, then they clip just like the text will.  	   * this is not very nice, but TOO BAD!! it's a rough job attempting  	   * to handle their wraping.  	   */	    button_gap = 0;	} else {	    if (i==1) {		button_gap = calc_max(0, (x - max_buttons_width)/2);	    } else { /* >1 */		button_gap = calc_max(0, (x - max_buttons_width)/(i-1));	    }	    if (i>1 && button_gap == 0 && (((i-1)*min_button_gap) < total)) {	    	button_gap = min_button_gap;	    	x += (i-1) * min_button_gap;	    }	}    }    y += top_marg + bottom_marg + (2*BORDER);    /*      * add in the borders and the SWOOSH_OUTSIDE_BOX pixels that are outside of the      * alert_box, but is regarded as alert_box-metro area     */    x += left_marg + right_marg + (4*BORDER) + SWOOSH_OUTSIDE_BOX;    /*     * discount the SWOOSH_OUTSIDE_BOX pixels of the swoosh for centering purpose     */    width = x;    height = y;    /*      * now try and position the alert and make it pretty      *//*  if ((alert->client_frame == (Frame)0) 	    || (window_get(alert->client_frame, FRAME_CLOSED)))	alert->position = (int)ALERT_SCREEN_CENTERED;*/    if (alert->client_frame == (Frame)0)	alert->position = (int)ALERT_SCREEN_CENTERED;    if (alert->client_frame != (Frame)0)	window_getrelrect(0, window_fd(alert->client_frame), &r);    if ((alert->position == (int)ALERT_SCREEN_CENTERED)	    || (alert->client_frame == (Frame)0)) {	/*	 * Disregard the part of swoosh outside of the box when centering	 */	left = calc_max(0, (alert_screen_rect.r_width  - width - SWOOSH_OUTSIDE_BOX)/2);	top = calc_max(0, (alert_screen_rect.r_height - height)/2);    } else {	/*	 * Disregard the part of swoosh outside of the box when centering	 */	left = calc_max(0, r.r_left + (r.r_width  - width - SWOOSH_OUTSIDE_BOX)/2);	top = calc_max(0, r.r_top + (r.r_height - height)/2);	if (alert->position == (int)ALERT_CLIENT_OFFSET) {	    left = alert->client_offset_x + r.r_left-(calc_max(0, width/2));	    top = alert->client_offset_y + r.r_top-(calc_max(0, height/2));	}/* try to reposition alert near frame for aesthetics, if near boarder */	if ((left <= (r.r_left)) && (width >= r.r_width)) {	    if ((left == 0)		&& ((r.r_left + (r.r_width/2)) <= alert_screen_rect.r_width)) {		left += (r.r_width/2);	    }	    if ((left < r.r_left) && ((left + width + 	      (BORDER + SHADOW)) >= alert_screen_rect.r_width)) {		left -= (r.r_width/2);		if ((left + width + (BORDER + SHADOW)) >= 			alert_screen_rect.r_width) { /* still overflows */		    left = alert_screen_rect.r_width - width - 			(BORDER + SHADOW);		    if ((left - (r.r_width/2)) >= 0)			left -= (r.r_width/2);		}	    }	}	if ((top <= (r.r_top)) && (height >= r.r_height)) {	    if ((top == 0)		&& ((r.r_top + (r.r_height/2)) <= alert_screen_rect.r_height)) {		top += (r.r_height/2);	    }	    if ((top < r.r_top) && ((top + height + 	      (BORDER + SHADOW)) > alert_screen_rect.r_height)) {		top -= (r.r_height/2);		if ((top + height + (BORDER + SHADOW)) >= 			alert_screen_rect.r_height) { /* still overflows */		    top = alert_screen_rect.r_height - height - 			(BORDER + SHADOW);		    if ((top - (r.r_height/2)) >= 0)			top -= (r.r_height/2);		}	    }	}    }    if (width > alert_screen_rect.r_width) left = 0;    if (height > alert_screen_rect.r_height) top = 0;    rect->r_top = top;    rect->r_left = left;    rect->r_width = x;    rect->r_height = y;}static voidalert_layout(alert, rect, pw)    register alert_handle	alert;    struct rect			*rect;    struct pixwin		*pw;{    Rect		r;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美一区二区精品婷婷| 成人午夜视频网站| 久久久噜噜噜久久中文字幕色伊伊| 粉嫩av亚洲一区二区图片| 亚洲国产一区二区三区青草影视| 久久人人爽爽爽人久久久| 欧美无乱码久久久免费午夜一区| 国产高清精品在线| 欧美aaaaa成人免费观看视频| 亚洲精品国产精品乱码不99| 26uuu欧美日本| 国产精品乱人伦一区二区| 夜夜嗨av一区二区三区网页 | 亚洲视频电影在线| 日韩一区二区中文字幕| 91在线porny国产在线看| 韩国成人福利片在线播放| 亚洲国产wwwccc36天堂| 亚洲欧美在线视频观看| 久久一二三国产| 日韩欧美国产麻豆| 欧美日韩成人综合在线一区二区| 91色视频在线| 成人精品视频一区二区三区| 国产一区二区中文字幕| 日韩专区欧美专区| 亚洲成人免费视| 樱花草国产18久久久久| 中文字幕视频一区二区三区久| www成人在线观看| 欧美精品一区二| 日韩精品中文字幕一区| 欧美一级片免费看| 欧美人动与zoxxxx乱| 欧美色图激情小说| 欧美亚洲综合网| 欧美影院一区二区三区| 欧美在线制服丝袜| 香蕉影视欧美成人| 欧美欧美欧美欧美首页| 国产在线精品一区二区| 在线免费观看视频一区| 91免费国产在线观看| caoporn国产精品| aaa国产一区| 91在线精品一区二区| 91在线观看视频| 在线亚洲精品福利网址导航| 欧美写真视频网站| 欧美伊人精品成人久久综合97 | 日韩黄色片在线观看| 亚洲成av人片www| 日韩高清一区在线| 久久机这里只有精品| 国产美女av一区二区三区| 国产成人精品午夜视频免费| 不卡在线观看av| 在线观看免费一区| 制服丝袜在线91| 久久久五月婷婷| 成人免费视频在线观看| 亚洲免费在线观看视频| 五月天激情综合网| 在线亚洲高清视频| 色噜噜狠狠成人中文综合| 亚洲成年人影院| 国产在线精品免费| 韩国一区二区三区| 成人性生交大合| 在线一区二区三区四区五区| 3d动漫精品啪啪1区2区免费 | 亚洲自拍偷拍欧美| 日本欧美韩国一区三区| 国产一区二区三区免费看| 不卡的av网站| 在线电影一区二区三区| 久久蜜桃av一区精品变态类天堂| 国产精品福利电影一区二区三区四区| 亚洲女同一区二区| 麻豆成人免费电影| 91丨九色porny丨蝌蚪| 6080日韩午夜伦伦午夜伦| 国产亚洲欧美日韩日本| 一区二区三区四区蜜桃| 精品亚洲porn| 亚洲国产精品成人综合| 精品国产乱码久久久久久浪潮| 99久久国产综合精品女不卡| 欧美日韩精品一区视频| 久久久久久97三级| 亚洲国产cao| 国产91丝袜在线播放| 在线播放中文一区| 国产精品―色哟哟| 蜜臀av性久久久久蜜臀av麻豆| 成人网男人的天堂| 日韩欧美专区在线| 1区2区3区欧美| 韩国三级中文字幕hd久久精品| 色婷婷久久久综合中文字幕| 久久久久久亚洲综合| 亚洲大片精品永久免费| 成人午夜免费av| 日韩精品中午字幕| 亚洲制服丝袜av| av一区二区不卡| 欧美成人精品福利| 亚洲高清视频的网址| a4yy欧美一区二区三区| 久久久亚洲国产美女国产盗摄 | 国产精品免费网站在线观看| 日韩国产精品久久| 欧美影院一区二区三区| 国产三级一区二区三区| 在线免费不卡电影| 国产一区999| 亚洲精品高清在线观看| 韩国理伦片一区二区三区在线播放| 欧洲一区二区av| 中文字幕在线一区免费| 国产福利不卡视频| 精品国产亚洲在线| 视频一区免费在线观看| 色婷婷久久久亚洲一区二区三区| 中文无字幕一区二区三区| 黑人精品欧美一区二区蜜桃| 日韩欧美黄色影院| 青青草成人在线观看| 欧美肥妇bbw| 亚洲大片在线观看| 欧美嫩在线观看| 香蕉久久夜色精品国产使用方法| 欧美性猛片aaaaaaa做受| 亚洲乱码日产精品bd| 色先锋久久av资源部| 一区二区三区日韩| 在线观看中文字幕不卡| 亚洲自拍偷拍综合| 欧洲激情一区二区| 婷婷综合五月天| 欧美一区欧美二区| 蜜桃精品视频在线观看| 日韩三级高清在线| 狠狠色丁香婷综合久久| 国产精品国产自产拍在线| 91精品欧美一区二区三区综合在 | 国产91丝袜在线播放0| 精品av综合导航| 国模无码大尺度一区二区三区| 日韩一区和二区| 国产麻豆日韩欧美久久| 久久精品视频免费| 不卡电影一区二区三区| 亚洲少妇30p| 欧美日韩一区二区在线视频| 日韩激情一二三区| www国产亚洲精品久久麻豆| 国产夫妻精品视频| 国产精品久久久久久久久快鸭| 91视频.com| 亚洲va国产天堂va久久en| 欧美一级欧美三级在线观看| 韩国一区二区在线观看| 亚洲欧洲精品一区二区三区| 欧亚一区二区三区| 蜜臀av性久久久久av蜜臀妖精 | 久久精品国产亚洲高清剧情介绍| 欧美xingq一区二区| 国产成人亚洲综合色影视| 日韩国产欧美在线视频| 美女网站在线免费欧美精品| 精品国精品国产| 不卡av电影在线播放| 亚洲午夜激情网页| 久久综合一区二区| 岛国精品在线播放| 亚洲国产视频直播| 久久综合久久综合久久| 色综合中文综合网| 丰满放荡岳乱妇91ww| 一区二区三区在线看| 日韩欧美亚洲一区二区| 成+人+亚洲+综合天堂| 日韩福利视频导航| 亚洲欧美在线aaa| 欧美一卡在线观看| 91啪亚洲精品| 国产在线一区观看| 亚洲福利视频一区二区| 久久久久久久久99精品| 欧美性色欧美a在线播放| 国产酒店精品激情| 亚洲高清免费在线| 国产精品久久久久一区二区三区| 欧美丰满嫩嫩电影| heyzo一本久久综合| 美女高潮久久久| 亚洲二区在线视频| 国产精品不卡在线观看| 精品久久久久久最新网址|