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

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

?? events.c

?? 安裝DDD之前
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* $Id: events.c,v 1.1 2004/08/28 19:25:45 dannybackx Exp $ *//*****************************************************************************//**       Copyright 1988 by Evans & Sutherland Computer Corporation,        **//**                          Salt Lake City, Utah                           **//**  Portions Copyright 1989 by the Massachusetts Institute of Technology   **//**                        Cambridge, Massachusetts                         **//**                                                                         **//**                           All Rights Reserved                           **//**                                                                         **//**    Permission to use, copy, modify, and distribute this software and    **//**    its documentation  for  any  purpose  and  without  fee is hereby    **//**    granted, provided that the above copyright notice appear  in  all    **//**    copies and that both  that  copyright  notice  and  this  permis-    **//**    sion  notice appear in supporting  documentation,  and  that  the    **//**    names of Evans & Sutherland and M.I.T. not be used in advertising    **//**    in publicity pertaining to distribution of the  software  without    **//**    specific, written prior permission.                                  **//**                                                                         **//**    EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD    **//**    TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES  OF  MERCHANT-    **//**    ABILITY  AND  FITNESS,  IN  NO  EVENT SHALL EVANS & SUTHERLAND OR    **//**    M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL  DAM-    **//**    AGES OR  ANY DAMAGES WHATSOEVER  RESULTING FROM LOSS OF USE, DATA    **//**    OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER    **//**    TORTIOUS ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE    **//**    OR PERFORMANCE OF THIS SOFTWARE.                                     **//*****************************************************************************//**************************************************************************** * This module is based on Twm, but has been siginificantly modified  * by Rob Nation  ****************************************************************************//*********************************************************************** * The rest of it is all my fault -- MLM * mwm - "LessTif Window Manager" ***********************************************************************/#include <LTconfig.h>#ifdef HAVE_UNISTD_H#include <unistd.h>#endif#ifdef HAVE_SYS_TYPES_H#include <sys/types.h>#endif#ifdef HAVE_SYS_TIME_H#include <sys/time.h>#endif#ifdef HAVE_SYS_SELECT_H#include <sys/select.h>#endif#include <Xm/XmosP.h>#if XmVERSION >= 2#include <XmI/XmI.h>#endif#include <Xm/Xm.h>#include <Xm/MwmUtil.h>#include <X11/extensions/shape.h>#include "mwm.h"/* * shorthand defines */#define MAX_NAME_LEN 200L	/* truncate to this many */#define MAX_ICON_NAME_LEN 200L	/* ditto */#define MOD_MASK	(ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|\			 Mod4Mask | Mod5Mask)static int ShapeEventBase, ShapeErrorBase;/* * Waits Mwm.click_time, or until it is evident that the user is not * clicking, but is moving the cursor. */static Booleanis_click(ScreenInfo *scr, int x, int y, XEvent *d){    int xcurrent, ycurrent, total = 0;    XEvent trash;    xcurrent = x;    ycurrent = y;#if 0    XAllowEvents(dpy, ReplayPointer, CurrentTime);#endif    while ((total < Mwm.click_time) &&	   (x - xcurrent < Mwm.move_threshold) &&	   (x - xcurrent > -Mwm.move_threshold) &&	   (y - ycurrent < Mwm.move_threshold) &&	   (y - ycurrent > -Mwm.move_threshold))    {	_XmMicroSleep(10000);	total += 10;	if (XCheckMaskEvent(dpy, ButtonPressMask | ButtonReleaseMask, &trash))	{	    MISC_StashEventTime(&trash);	    if (trash.xbutton.button == d->xbutton.button)	    {		*d = trash;		return True;	    }	}	if (XCheckMaskEvent(dpy, ButtonMotionMask | PointerMotionMask, &trash))	{	    xcurrent = trash.xmotion.x_root;	    ycurrent = trash.xmotion.y_root;	    MISC_StashEventTime(&trash);	}    }    return False;}/* * This procedure handles both a client changing its own colormap, and * a client explicitly installing its colormap itself (only the window * manager should do that, so we must set it correctly). */static voidcolor_map_notify(ScreenInfo *scr, MwmWindow *win, XEvent *event){    XColormapEvent *cevent = (XColormapEvent *)event;    Boolean reinstall = False;    if (!win)	return;#ifdef __cplusplus    if (cevent->c_new)#else    if (cevent->new)#endif    {	XGetWindowAttributes(dpy, win->w, &(win->attr));	if (win == scr->mwm_colormap && win->number_cmap_windows == 0)	    scr->last_cmap = win->attr.colormap;	reinstall = True;    }    else if ((cevent->state == ColormapUninstalled) &&	     (scr->last_cmap == cevent->colormap))    {	/* Some window installed its colormap, change it back */	reinstall = True;    }    while (XCheckTypedEvent(dpy, ColormapNotify, event))    {	if (XFindContext(dpy, cevent->window,			 MwmContext, (XPointer *)&win) == XCNOENT)	    win = NULL;#ifdef __cplusplus	if ((win) && (cevent->c_new))#else	if ((win) && (cevent->new))#endif	{	    XGetWindowAttributes(dpy, win->w, &(win->attr));	    if (win == scr->mwm_colormap &&		win->number_cmap_windows == 0)		scr->last_cmap = win->attr.colormap;	    reinstall = True;	}	else if ((win) &&		 (cevent->state == ColormapUninstalled) &&		 (scr->last_cmap == cevent->colormap))	{	    /* Some window installed its colormap, change it back */	    reinstall = True;	}	else if ((win) &&		 (cevent->state == ColormapInstalled) &&		 (scr->last_cmap == cevent->colormap))	{	    /* The last color map installed was the correct one. Don't 	     * change anything */	    reinstall = False;	}    }    if (reinstall)	XInstallColormap(dpy, scr->last_cmap);}/* * handles focus in events */static voidfocus_in(ScreenInfo *scr, MwmWindow *win, XEvent *event){    XEvent d;    Window w;    w = event->xany.window;    while (XCheckTypedEvent(dpy, FocusIn, &d))	w = d.xany.window;    if (XFindContext(dpy, w, MwmContext, (XPointer *)&win) == XCNOENT)	win = NULL;    if (!win)	DEC_DrawDecorations(scr, scr->mwm_highlight, False, True, True, None);    else if (win != scr->mwm_highlight)	DEC_DrawDecorations(scr, win, True, True, True, None);    if (win && Mwm.colormap_focus_policy == XmKEYBOARD)	COLOR_InstallWindowColorMap(scr, win);}/* * this function deals with bad focus tracks * MLM: 6/??/98. Deal with what seems is a race condition between the * toolkit and the window manager.  When we set the input focus in * the unmap_notify() function, it can sometimes implicitly fail without * our knowing it.  I believe this is a race condition where the toolkit * calls XSetInputFocus() when dealing with the menu system.  The net * result is that we sometimes do not receive the FocusIn event we expect; * therefore the application terminates, and focus reverts to None. * We find out about that here. */static voidfocus_out(ScreenInfo *scr, MwmWindow *win, XEvent *event){    Window focusBug;    int rt;    XGetInputFocus(dpy, &focusBug, &rt);    if (win == NULL && scr->mwm_focus != NULL && focusBug == None)    {        XSetInputFocus(dpy, scr->mwm_focus->w, RevertToParent, CurrentTime);    }}/* * key press event handler */static voidkey_press(ScreenInfo *scr, MwmWindow *win, XEvent *event){    FuncKey *key;    unsigned int modifier;    Window dummy;    if (event->xkey.window == scr->shield_win)    {	XBell(dpy, 100);	return;    }    scr->event_context = EVENT_GetContext(scr, win, event, &dummy);    modifier = (event->xkey.state & MOD_MASK);    for (key = scr->keys; key != NULL; key = key->next)    {	scr->mwm_event = win;	/* Here's a real hack - some systems have two keys with the	 * same keysym and different keycodes. This converts all	 * the cases to one keycode. */	event->xkey.keycode =	    XKeysymToKeycode(dpy,			     XKeycodeToKeysym(dpy, event->xkey.keycode, 0));	if ((key->keycode == event->xkey.keycode) &&	    ((key->mods == (modifier & (~LockMask))) ||	     (key->mods == AnyModifier)) &&	    (key->cont & scr->event_context))	{	    FUNC_Execute(scr, key->func, key->action, event->xany.window, win,			 event, scr->event_context, key->val1, key->val2,			 key->val1_unit, key->val2_unit,			 key->menu);	    return;	}    }    /* if we get here, no function key was bound to the key.  Send it     * to the client if it was in a window we know about.     */    if (win)    {	if (event->xkey.window != win->w)	{	    event->xkey.window = win->w;	    XSendEvent(dpy, win->w, False, KeyPressMask, event);	}    }    scr->mwm_event = NULL;}/* * property notify event handler */static voidproperty_notify(ScreenInfo *scr, MwmWindow *win, XEvent *event){    char *prop = NULL;    Atom actual = None;    int actual_format;    unsigned long nitems, bytesafter;    if ((!win) || (XGetGeometry(dpy, win->w, &JunkRoot, &JunkX, &JunkY,			   &JunkWidth, &JunkHeight, &JunkBW, &JunkDepth) == 0))	return;    switch (event->xproperty.atom)    {    case XA_WM_NAME:	if (XGetWindowProperty(dpy, win->w, event->xproperty.atom, 0L,			       MAX_NAME_LEN, False, XA_STRING, &actual,			       &actual_format, &nitems, &bytesafter,			       (unsigned char **)&prop) != Success ||	    actual == None)	    return;	if (!prop)	    prop = NoName;	WIN_FreeNames(win, True, False);	win->name = prop;	/* fix the name in the title bar */	if (!(win->flags & ICONIFIED))	    DEC_DrawTitleBar(scr, win, (scr->mwm_highlight == win), True);	/*	 * if the icon name is NoName, set the name of the icon to be	 * the same as the window 	 */	if (win->icon_active_label == NoName)	{	    win->icon_active_label = win->name;	    ICON_UpdateWindow(scr, win, False);	}	break;    case XA_WM_ICON_NAME:	if (XGetWindowProperty(dpy, win->w, event->xproperty.atom, 0,			       MAX_ICON_NAME_LEN, False, XA_STRING, &actual,			       &actual_format, &nitems, &bytesafter,			       (unsigned char **)&prop) != Success ||	    actual == None)	    return;	if (!prop)	    prop = NoName;	WIN_FreeNames(win, False, True);	win->icon_label = prop;	ICON_UpdateWindow(scr, win, False);	break;    case XA_WM_HINTS:	if (win->wmhints)	    XFree((char *)win->wmhints);	win->wmhints = XGetWMHints(dpy, event->xany.window);	if (win->wmhints == NULL)	    return;	if ((win->wmhints->flags & IconPixmapHint) ||	    (win->wmhints->flags & IconWindowHint))	{	    if (win->icon_w)		XDestroyWindow(dpy, win->icon_w);	    XDeleteContext(dpy, win->icon_w, MwmContext);	    if (win->flags & ICON_OURS)	    {		if (win->icon_pixmap_w != None)		{		    XDestroyWindow(dpy, win->icon_pixmap_w);		    XDeleteContext(dpy, win->icon_pixmap_w, MwmContext);		}	    }	    else		XUnmapWindow(dpy, win->icon_pixmap_w);	    win->icon_w = None;	    win->icon_pixmap_w = None;	    win->icon_pixmap = (Window)NULL;	    if (win->flags & ICONIFIED)	    {		win->flags &= ~ICONIFIED;		win->flags &= ~ICON_UNMAPPED;		ICON_CreateWindow(scr, win,				  win->icon_x_loc, win->icon_y_loc);		WIN_Lower(scr, win);		ICON_AutoPlace(scr, win);		if (win->Desk == scr->current_desk)		{		    if (win->icon_w)			XMapWindow(dpy, win->icon_w);		    if (win->icon_pixmap_w != None)			XMapWindow(dpy, win->icon_pixmap_w);		}		win->flags |= ICONIFIED;		ICON_DrawWindow(scr, win);	    }	}	break;    case XA_WM_NORMAL_HINTS:	PROP_GetWindowSizeHints(win);	break;    default:	if (event->xproperty.atom == XA_WM_PROTOCOLS)	{	    PROP_GetWmProtocols(win);	}	else if (event->xproperty.atom == XA_WM_COLORMAP_WINDOWS)	{	    PROP_GetWmColormapWindows(win);	/* frees old data */	    COLOR_InstallWindowColorMap(scr, scr->mwm_colormap);	}	else if (event->xproperty.atom == XA_WM_STATE)	{	    if ((Mwm.keyboard_focus_policy == XmEXPLICIT) &&		(win == scr->mwm_focus) && (win != NULL))	    {		scr->mwm_focus = NULL;		WIN_SetFocusInTree(win);		WIN_SetFocus(scr, win->w, win);		MISC_SetFocusSequence(scr);	    }	}	else if (event->xproperty.atom == XA_MWM_HINTS)	{	    if (win)	    {		int width, height;		PROP_GetMwmHints(win);		DEC_ReselectDecorations(scr, win);		win->frame_width = win->attr.width +		    2 * win->boundary_width +		    2 * win->matte_width;		win->frame_height = win->attr.height +		    win->title_height +		    2 * win->boundary_width +		    2 * win->matte_width;		WIN_ConstrainWindow(scr, win,				    &win->frame_width,				    &win->frame_height);		width = win->frame_width;		win->frame_width = 0;		height = win->frame_height;		win->frame_height = 0;		DEC_ConfigureDecorations(scr, win,					 win->frame_x, win->frame_y,					 width, height,					 True);		if (scr->mwm_highlight == win)		{		    scr->mwm_highlight = NULL;		    DEC_DrawDecorations(scr, win, True, True, True, None);		}		else		    DEC_DrawDecorations(scr, win, False, False, True, None);	    }	}	else if (event->xproperty.atom == XA_MWM_MENU)	{	    if (win)	    {		if (win->mwm_menu)		    XFree((char *)win->mwm_menu);		MENU_DestroyWindowMenu(scr, win);		PROP_GetMwmMenu(win);		MENU_BuildWindowMenu(scr, win);	    }	}	else if (event->xproperty.atom == XA_MWM_MESSAGES)	{	    if (win)	    {		if (win->mwm_messages)		    XFree((char *)win->mwm_messages);		PROP_GetMwmMessages(win);	    }	}    }}/* * client message event handler */static voidclient_message(ScreenInfo *scr, MwmWindow *win, XEvent *event){    XEvent button;    if ((event->xclient.message_type == XA_WM_CHANGE_STATE) &&	(win) && (event->xclient.data.l[0] == IconicState) &&	!(win->flags & ICONIFIED))    {	XQueryPointer(dpy, scr->root_win, &JunkRoot, &JunkChild,		      &(button.xmotion.x_root),		      &(button.xmotion.y_root),		      &JunkX, &JunkY, &JunkMask);	button.type = 0;	FUNC_Execute(scr, F_ICONIFY, NULLSTR, event->xany.window,		     win, &button, C_FRAME, 0, 0, 0, 0,		     (MenuRoot *) 0);    }}/* * expose event handler */static voidexpose(ScreenInfo *scr, MwmWindow *win, XEvent *event){    if (event->xexpose.count != 0)	return;    if (win)    {	if ((win->w == scr->pager_win) ||	    (win->w == scr->pager_child_win))	{	    PAGER_Redraw(scr);	}	if ((event->xany.window == win->title))	{	    DEC_DrawTitleBar(scr, win, (scr->mwm_highlight == win), False);	}	else	{	    DEC_DrawDecorations(scr, win,				(scr->mwm_highlight == win),				True, True, event->xany.window);	}    }    else    {	if (WIN_WindowToStruct(scr, event->xany.window))	    PAGER_Redraw(scr);    }}/* * DestroyNotify event handler */static voiddestroy_notify(ScreenInfo *scr, MwmWindow *win, XEvent *event){    WIN_DestroyWindow(scr, win);}/*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩日av一区二区| 884aa四虎影成人精品一区| 亚洲男女毛片无遮挡| 欧美特级限制片免费在线观看| 亚洲国产欧美在线人成| 久久蜜桃一区二区| 日本久久电影网| 粉嫩高潮美女一区二区三区| 亚洲免费资源在线播放| 久久综合久久鬼色| 91精品国产91久久综合桃花| 中文字幕亚洲不卡| 欧美午夜寂寞影院| 99re这里只有精品视频首页| 丝袜国产日韩另类美女| 国产欧美视频在线观看| 欧美大片国产精品| 欧美日韩高清不卡| 欧美日韩免费观看一区二区三区 | 国产亚洲美州欧州综合国| 91免费视频网| 成人av在线资源网| 福利一区福利二区| jiyouzz国产精品久久| 国产精品一区二区男女羞羞无遮挡| 一区二区三区在线视频观看58| 欧美国产精品一区二区三区| www国产精品av| 中文字幕欧美激情一区| 久久久综合网站| 国产人妖乱国产精品人妖| 久久久亚洲综合| 国产精品福利一区| 一区二区三区蜜桃网| 亚洲国产成人av| 青椒成人免费视频| 国产精品一区二区久激情瑜伽 | 国产精品影视天天线| 成人性视频免费网站| 在线国产电影不卡| 欧美精品一区二区在线观看| 国产女主播视频一区二区| 一区二区在线免费| 麻豆精品在线播放| 91亚洲精品久久久蜜桃| 精品国产髙清在线看国产毛片| 日韩天堂在线观看| 久久婷婷久久一区二区三区| 亚洲天堂免费在线观看视频| 婷婷夜色潮精品综合在线| 久久 天天综合| 欧美亚洲一区三区| 久久久久久亚洲综合| 亚洲第一综合色| 国产91精品在线观看| 日韩亚洲国产中文字幕欧美| 中文字幕中文字幕一区二区| 欧美aaaaa成人免费观看视频| 99久久夜色精品国产网站| 26uuu色噜噜精品一区| 午夜视频一区二区三区| www.日韩精品| 中文字幕第一区第二区| 国产乱理伦片在线观看夜一区| 欧美系列一区二区| 亚洲一二三区在线观看| 99久久久免费精品国产一区二区| 国产亚洲欧美日韩在线一区| 国产一区在线观看麻豆| 欧美一区二区福利在线| 狂野欧美性猛交blacked| 欧美日韩亚洲不卡| 麻豆传媒一区二区三区| 久久综合久久综合久久综合| 国产精品1024久久| 中文字幕在线不卡| 一本大道久久a久久综合婷婷| 国产亚洲一区字幕| 欧美综合天天夜夜久久| 婷婷综合另类小说色区| 欧美精品一区二区三区很污很色的| 卡一卡二国产精品 | 91精品久久久久久蜜臀| 免费在线成人网| 日韩欧美国产一区二区在线播放| 国产成人av电影免费在线观看| 国产精品乱子久久久久| 日本精品视频一区二区| 毛片av中文字幕一区二区| 国产欧美视频一区二区| 在线视频一区二区三区| 激情五月婷婷综合网| 亚洲猫色日本管| 久久久久久久久久久久久女国产乱| 成人精品视频网站| 日韩高清不卡在线| 中文字幕一区二区在线播放| 日韩视频中午一区| 91久久精品日日躁夜夜躁欧美| 韩国中文字幕2020精品| 狠狠网亚洲精品| 蜜桃久久久久久久| 日本欧美在线观看| 亚洲国产一二三| 国产精品每日更新| 国产精品欧美经典| 国产日韩成人精品| 久久久不卡网国产精品二区| 制服.丝袜.亚洲.另类.中文| 欧美中文字幕不卡| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产精品一区二区在线观看不卡| 蜜臀精品一区二区三区在线观看| 亚洲成a人片综合在线| 亚洲午夜精品17c| 日日摸夜夜添夜夜添亚洲女人| 亚洲成人中文在线| 美女诱惑一区二区| 国产一区二三区| 成人免费视频网站在线观看| 成人精品免费视频| 日韩三级视频在线观看| 欧美一区二区在线免费播放| 69堂亚洲精品首页| 精品精品欲导航| 中文字幕日韩一区二区| 亚洲超丰满肉感bbw| 人人精品人人爱| 国产成人av在线影院| 99久久亚洲一区二区三区青草 | 91麻豆国产香蕉久久精品| 欧美亚洲丝袜传媒另类| 精品国产凹凸成av人网站| 欧美大片一区二区| 亚洲一线二线三线视频| 韩国欧美一区二区| 欧美日韩国产天堂| 日韩一区欧美小说| 精品无人码麻豆乱码1区2区| 懂色一区二区三区免费观看| 欧美国产欧美综合| 一区二区三区在线看| 久久黄色级2电影| 91精品国产综合久久久蜜臀粉嫩 | av一区二区三区黑人| 99精品久久只有精品| 99精品国产99久久久久久白柏| 日韩欧美精品在线视频| 亚洲成人你懂的| 欧美亚洲免费在线一区| 中文字幕中文字幕在线一区 | 精品久久久三级丝袜| 香蕉乱码成人久久天堂爱免费| 色欧美片视频在线观看在线视频| 欧美成人一区二区三区在线观看 | 国产91精品久久久久久久网曝门| 日韩欧美久久久| 狠狠色综合日日| 欧美国产97人人爽人人喊| 韩国精品主播一区二区在线观看| 亚洲精品一区二区三区在线观看 | 国产精品丝袜一区| 粉嫩欧美一区二区三区高清影视| 久久在线观看免费| 国产一区二区在线影院| 国产精品三级av| 欧美色中文字幕| 国产原创一区二区三区| 中文字幕在线不卡一区| 欧美午夜精品免费| 国产一区三区三区| 亚洲免费视频中文字幕| 欧美一级二级三级乱码| 国产自产视频一区二区三区| 国产精品福利影院| 欧美一区三区二区| 在线影院国内精品| 国产馆精品极品| 日本一区中文字幕| 亚洲天堂中文字幕| 国产欧美精品在线观看| 欧美日本一区二区三区| 成人亚洲一区二区一| 黄色精品一二区| 视频精品一区二区| 一区二区视频在线| 欧美国产日产图区| 欧美精品一区二区三区在线| 56国语精品自产拍在线观看| 成av人片一区二区| 国产一区二区三区四| 青青草91视频| 午夜婷婷国产麻豆精品| 亚洲第一av色| 亚洲国产三级在线| 奇米四色…亚洲| 久久国产综合精品| 国产精品资源在线观看| 成人综合在线观看| 99久久99久久精品免费看蜜桃|