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

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

?? windows.c

?? 安裝DDD之前
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* $Id: windows.c,v 1.1 2004/08/28 19:25:46 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 placement code is by Rob Nation  * * This code does smart-placement initial window placement stuff * * Copyright 1994 Robert Nation. No restrictions are placed on this code, * as long as the copyright notice is preserved . No guarantees or * warrantees of any sort whatsoever are given or implied or anything. ****************************************************************************//*********************************************************************** * The rest of it is all my fault -- MLM * mwm - "LessTif Window Manager" ***********************************************************************/#include <LTconfig.h>#include <stdio.h>#ifdef HAVE_UNISTD_H#include <unistd.h>#endif#include <X11/Intrinsic.h>#include <X11/extensions/shape.h>#include <Xm/Xm.h>#include <Xm/MwmUtil.h>#include "mwm.h"/* * some macros used by the constraint code */#define makemult(a,b) ((b==1) ? (a) : (((int)((a)/(b))) * (b)) )#define _min(a,b) (((a) < (b)) ? (a) : (b))#define MaxAspectX(t) ((t)->hints.max_aspect.x)#define MaxAspectY(t) ((t)->hints.max_aspect.y)#define MinAspectX(t) ((t)->hints.min_aspect.x)#define MinAspectY(t) ((t)->hints.min_aspect.y)static Boolean PPosOverride = False;static long isIconicState = 0;char NoName[] = "Untitled";	/* name if no name is specified *//* * check to see if we should really put a mwm frame on the window */static Booleanmapped_not_override(ScreenInfo *scr, Window w){    XWindowAttributes wa;    Atom atype;    int aformat;    unsigned long nitems, bytes_remain;    unsigned char *prop;    isIconicState = DontCareState;    if (!XGetWindowAttributes(dpy, w, &wa))	return False;    if (XGetWindowProperty(dpy, w, XA_WM_STATE, 0L, 3L, False, XA_WM_STATE,		   &atype, &aformat, &nitems, &bytes_remain, &prop) == Success)    {	if (prop != NULL)	{	    isIconicState = *(long *)prop;	    XFree(prop);	}    }    if (w == scr->pager_win)	return True;    if ((isIconicState == IconicState || wa.map_state != IsUnmapped) &&	wa.override_redirect != True)	return True;    return False;}/* * map gravity to (x,y) offset signs for adding to x and y when window is * mapped to get proper placement. */static voidget_gravity_offsets(MwmWindow *tmp, int *xp, int *yp){    static struct _gravity_offset    {	int x, y;    }    gravity_offsets[11] =    {	{	    0, 0	}	,			/* ForgetGravity */	{	    -1, -1	}	,			/* NorthWestGravity */	{	    0, -1	}	,			/* NorthGravity */	{	    1, -1	}	,			/* NorthEastGravity */	{	    -1, 0	}	,			/* WestGravity */	{	    0, 0	}	,			/* CenterGravity */	{	    1, 0	}	,			/* EastGravity */	{	    -1, 1	}	,			/* SouthWestGravity */	{	    0, 1	}	,			/* SouthGravity */	{	    1, 1	}	,			/* SouthEastGravity */	{	    0, 0	}	,			/* StaticGravity */    };    register int g = ((tmp->hints.flags & PWinGravity)		      ? tmp->hints.win_gravity : NorthWestGravity);    if (g < ForgetGravity || g > StaticGravity)	*xp = *yp = 0;    else    {	*xp = (int)gravity_offsets[g].x;	*yp = (int)gravity_offsets[g].y;    }}/* * grab needed buttons for the window */static voidgrab_buttons(ScreenInfo *scr, MwmWindow *tmp_win){    MouseButton *MouseEntry;    MouseEntry = scr->buttons;    while (MouseEntry != (MouseButton *)0)    {	if ((MouseEntry->func != (int)0) && (MouseEntry->context & C_WINDOW))	{	    if (MouseEntry->button > 0)	    {		XGrabButton(dpy, MouseEntry->button, MouseEntry->modifier,			    tmp_win->w,			    True, ButtonPressMask | ButtonReleaseMask,			    GrabModeAsync, GrabModeAsync, None,			    scr->cursors[DEFAULT_CURS]);		if (MouseEntry->modifier != AnyModifier)		{		    XGrabButton(dpy, MouseEntry->button,				(MouseEntry->modifier | LockMask),				tmp_win->w,				True, ButtonPressMask | ButtonReleaseMask,				GrabModeAsync, GrabModeAsync, None,				scr->cursors[DEFAULT_CURS]);		}	    }	    else	    {		XGrabButton(dpy, 1, MouseEntry->modifier,			    tmp_win->w,			    True, ButtonPressMask | ButtonReleaseMask,			    GrabModeAsync, GrabModeAsync, None,			    scr->cursors[DEFAULT_CURS]);		XGrabButton(dpy, 2, MouseEntry->modifier,			    tmp_win->w,			    True, ButtonPressMask | ButtonReleaseMask,			    GrabModeAsync, GrabModeAsync, None,			    scr->cursors[DEFAULT_CURS]);		XGrabButton(dpy, 3, MouseEntry->modifier,			    tmp_win->w,			    True, ButtonPressMask | ButtonReleaseMask,			    GrabModeAsync, GrabModeAsync, None,			    scr->cursors[DEFAULT_CURS]);		if (MouseEntry->modifier != AnyModifier)		{		    XGrabButton(dpy, 1,				(MouseEntry->modifier | LockMask),				tmp_win->w,				True, ButtonPressMask | ButtonReleaseMask,				GrabModeAsync, GrabModeAsync, None,				scr->cursors[DEFAULT_CURS]);		    XGrabButton(dpy, 2,				(MouseEntry->modifier | LockMask),				tmp_win->w,				True, ButtonPressMask | ButtonReleaseMask,				GrabModeAsync, GrabModeAsync, None,				scr->cursors[DEFAULT_CURS]);		    XGrabButton(dpy, 3,				(MouseEntry->modifier | LockMask),				tmp_win->w,				True, ButtonPressMask | ButtonReleaseMask,				GrabModeAsync, GrabModeAsync, None,				scr->cursors[DEFAULT_CURS]);		}	    }	}	MouseEntry = MouseEntry->next;    }}/* * grab needed keys for the window */static voidgrab_keys(ScreenInfo *scr, MwmWindow *tmp_win){    FuncKey *tmp;    for (tmp = scr->keys; tmp != NULL; tmp = tmp->next)    {	if (tmp->cont & (C_WINDOW | C_TITLE | C_RALL | C_LALL | C_FRAME))	{	    XGrabKey(dpy, tmp->keycode, tmp->mods, tmp_win->frame, True,		     GrabModeAsync, GrabModeAsync);	    if (tmp->mods != AnyModifier)	    {		XGrabKey(dpy, tmp->keycode, tmp->mods | LockMask,			 tmp_win->frame, True,			 GrabModeAsync, GrabModeAsync);	    }	}    }}/* * set the contexts for the various windows */static voidsave_context(MwmWindow *tmp_win){    int i;    XSaveContext(dpy, tmp_win->w, MwmContext, (XPointer)tmp_win);    XSaveContext(dpy, tmp_win->frame, MwmContext, (XPointer)tmp_win);    XSaveContext(dpy, tmp_win->parent, MwmContext, (XPointer)tmp_win);    if (tmp_win->decorations & MWM_DECOR_TITLE)    {	XSaveContext(dpy, tmp_win->title, MwmContext,		     (XPointer)tmp_win);	if (tmp_win->menub != None)	    XSaveContext(dpy, tmp_win->menub, MwmContext,			 (XPointer)tmp_win);	if (tmp_win->minimizeb != None)	    XSaveContext(dpy, tmp_win->minimizeb, MwmContext,			 (XPointer)tmp_win);	if (tmp_win->maximizeb != None)	    XSaveContext(dpy, tmp_win->maximizeb, MwmContext,			 (XPointer)tmp_win);    }    if (tmp_win->decorations & MWM_DECOR_BORDER)    {	for (i = 0; i < 4; i++)	{	    XSaveContext(dpy, tmp_win->sides[i],			 MwmContext, (XPointer)tmp_win);	}    }    if (tmp_win->decorations & MWM_DECOR_RESIZEH)    {	for (i = 0; i < 4; i++)	{	    XSaveContext(dpy, tmp_win->corners[i],			 MwmContext, (XPointer)tmp_win);	}    }}/* * The function below, in its previous life, tried to allocate a window * such that it wouldn't overlap with others. I guess this comes from fvwm. * If the result (x and y) are negative, our caller will prompt the user * to let him interactively position the window. * * As far as I know mwm isn't supposed to behave like this so I really * disabled that functionality. * * Danny 19/4/1997 * * Converted this to a resource file setting.  MLM (sometime in August 97). */#define	INC	25/* * try to be smart about how to place the window */static voidsmart_placement(ScreenInfo *scr, MwmWindow *t,		int width, int height, int *x, int *y){    int temp_h, temp_w;    int test_x = 0, test_y = 0;    int loc_ok = False, tw, tx, ty, th;    MwmWindow *test_window;    static int last_x = 0, last_y = 0, begin_x = INC, begin_y = INC;    temp_h = height;    temp_w = width;    if (!scr->smart_placement)    {	if (t == NULL)	{	    test_x = test_y = -1;	}	else	{	    test_x = t->frame_x;	    test_y = t->frame_y;	    /* If the user specified a position, grant it */	    if (t->hints.flags & USPosition)	    {		*x = test_x;		*y = test_y;		return;	    }	    /* Otherwise, we need to make up a position.	     * Let's start near the top left of the screen, always move a bit	     * to the lower right with each next window, until a window would	     * fall of the screen either on the right or on the bottom edge.	     * When that happens, start near the upper left again.	     * The upper left starting point should change somewhat too.	     */#if 0	    if (test_x == 0 && test_y == 0)#endif	    {		last_x += INC;		last_y += INC;		test_x = last_x;		test_y = last_y;		if (t->frame_width + last_x >= scr->d_width		    || t->frame_height + last_y >= scr->d_height)		{		    begin_x += INC;		    begin_y = INC;		    test_x = last_x = begin_x;		    test_y = last_y = begin_y;		    if (begin_x > scr->d_width / 2)			begin_x = begin_y = INC;		}		/* Is this window simply too big ? */		if (t->frame_width + last_x >= scr->d_width)		    test_x = 0;		if (t->frame_height + last_y >= scr->d_height)		    test_y = 0;	    }	}    }    /* smart placement */    else    {	while (((test_y + temp_h) < (scr->d_height)) && (!loc_ok))	{	    test_x = 0;	    while (((test_x + temp_w) < (scr->d_width)) && (!loc_ok))	    {		loc_ok = True;		test_window = scr->mwm_root.next;		while ((test_window != (MwmWindow *)0) && (loc_ok == True))		{		    if (test_window->Desk == scr->current_desk)		    {			if (scr->flags & StubbornPlacement)			{			    if ((test_window->flags & ICONIFIED) &&				(!(test_window->flags & ICON_UNMAPPED)) &&				(test_window->icon_w) &&				(test_window != t))			    {				tw = test_window->icon_p_width;				th = test_window->icon_p_height +				    test_window->icon_w_height;				tx = test_window->icon_x_loc;				ty = test_window->icon_y_loc;				if ((tx < (test_x + width)) && ((tx + tw) > test_x) &&				    (ty < (test_y + height)) && ((ty + th) > test_y))				{				    loc_ok = False;				    test_x = tx + tw;				}			    }			}			if (!(test_window->flags & ICONIFIED) && (test_window != t))			{			    tw = test_window->frame_width + 2 * test_window->bw;			    th = test_window->frame_height + 2 * test_window->bw;			    tx = test_window->frame_x;			    ty = test_window->frame_y;			    if ((tx <= (test_x + width)) && ((tx + tw) >= test_x) &&			    (ty <= (test_y + height)) && ((ty + th) >= test_y))			    {				loc_ok = False;				test_x = tx + tw;			    }			}		    }		    test_window = test_window->next;		}		test_x += 1;	    }	    test_y += 1;	}	if (loc_ok == False)	{	    *x = -1;	    *y = -1;	    return;	}    }    *x = test_x;    *y = test_y;}/* * Handles initial placement and sizing of a new window. Returns False in * the event of a lost window. */static Booleanplace_window(ScreenInfo *scr, MwmWindow *tmp_win)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久69国产一区二区蜜臀| 99久久99久久精品免费看蜜桃 | 精品久久久久av影院| 欧美激情一区在线| 亚洲成人激情社区| 91欧美一区二区| 久久精品男人的天堂| 亚洲图片欧美综合| 成人sese在线| 久久精品亚洲精品国产欧美| 日韩综合在线视频| 日本精品视频一区二区| 亚洲国产高清aⅴ视频| 免费观看30秒视频久久| 欧美性猛交xxxxxx富婆| 国产精品福利一区| 国产不卡在线播放| 欧美精品一区二区三区蜜桃 | 蜜桃久久av一区| 欧美日韩美少妇| 亚洲黄色av一区| 91啦中文在线观看| 国产精品久久久久久久裸模| 国产精品一区二区无线| 日韩欧美一级在线播放| 亚洲成年人影院| 91久久免费观看| 亚洲欧美另类小说| 一本色道久久综合亚洲精品按摩| 国产精品人成在线观看免费| 国产精品99久久久久久久女警| 欧美一区二区三区在线| 日韩精品成人一区二区三区| 欧美日韩国产综合一区二区 | 在线播放91灌醉迷j高跟美女| 一区二区在线观看视频| 色综合久久99| 天天综合天天做天天综合| 欧美日韩国产成人在线免费| 亚洲一区日韩精品中文字幕| 欧美午夜精品一区二区三区| 日韩精品高清不卡| 精品1区2区在线观看| 国产成人精品www牛牛影视| 国产精品欧美精品| 91在线视频观看| 亚洲成人自拍网| 日韩三级伦理片妻子的秘密按摩| 激情另类小说区图片区视频区| 久久久亚洲精华液精华液精华液| 国产999精品久久久久久| 国产精品麻豆欧美日韩ww| av网站免费线看精品| 亚洲愉拍自拍另类高清精品| 欧美一区二区视频观看视频| 国产乱人伦偷精品视频不卡| 国产精品久久久久久久久免费樱桃| 国产91色综合久久免费分享| 国产精品色在线| 欧美日韩免费在线视频| 麻豆精品视频在线观看| 国产精品视频一二三区 | 国产精品一区免费在线观看| 中文字幕亚洲欧美在线不卡| 欧美亚洲动漫精品| 国产精品一区二区黑丝| 亚洲欧美另类久久久精品| 日韩欧美一卡二卡| 欧美一二三区精品| 成人高清视频在线观看| 亚洲一区二区三区激情| 2021久久国产精品不只是精品| 99re成人在线| 精品亚洲国产成人av制服丝袜| 中文字幕日韩精品一区| 欧美一区二区女人| 99精品在线免费| 久久99日本精品| 一级做a爱片久久| 国产亚洲欧美色| 91精品久久久久久久99蜜桃| 99久久er热在这里只有精品15 | 日韩影院在线观看| 国产欧美日韩视频在线观看| 在线播放/欧美激情| aaa国产一区| 国产一区二区三区| 偷拍一区二区三区四区| 亚洲视频图片小说| 国产日韩成人精品| 精品日韩一区二区| 欧美精品免费视频| 一本色道a无线码一区v| 激情成人综合网| 亚洲福利视频一区二区| 亚洲欧美激情小说另类| 欧美激情资源网| 精品国产91洋老外米糕| 欧美日韩黄色影视| 欧美在线播放高清精品| 99re这里都是精品| 99视频精品在线| 成人免费看黄yyy456| 久久成人av少妇免费| 日韩中文字幕一区二区三区| 亚洲国产成人精品视频| 亚洲啪啪综合av一区二区三区| 国产精品毛片大码女人| 国产农村妇女毛片精品久久麻豆 | 中文字幕中文乱码欧美一区二区| 久久亚洲精品国产精品紫薇| 日韩一区二区三区免费观看| 欧美一区二区三区的| 在线不卡a资源高清| 欧美日韩黄色影视| 国产亲近乱来精品视频| 国产无人区一区二区三区| 亚洲精品一区二区三区香蕉| 日韩欧美黄色影院| 欧美一区二区日韩一区二区| 欧美精品在线一区二区三区| 欧美日本在线观看| 91精品国产综合久久久久| 欧美精品三级在线观看| 日韩视频免费观看高清在线视频| 日韩女同互慰一区二区| 久久综合99re88久久爱| 国产清纯在线一区二区www| 国产精品久久一卡二卡| 一区二区三区不卡视频在线观看| 亚洲在线免费播放| 青椒成人免费视频| 国产麻豆一精品一av一免费 | 欧美日韩国产中文| 日韩三级视频中文字幕| 国产色产综合产在线视频| 中文字幕一区av| 亚洲va天堂va国产va久| 久久疯狂做爰流白浆xx| 成人精品小蝌蚪| 欧洲生活片亚洲生活在线观看| 91精品婷婷国产综合久久| 日韩欧美精品三级| 亚洲视频一区在线观看| 日韩成人伦理电影在线观看| 国产激情视频一区二区三区欧美 | 亚洲蜜臀av乱码久久精品蜜桃| 一区二区三区不卡视频| 久久精品国产一区二区三| 成人免费三级在线| 欧美群妇大交群的观看方式| 久久久久一区二区三区四区| 亚洲三级久久久| 麻豆国产精品一区二区三区| 成人黄色免费短视频| 欧美精选一区二区| 国产精品丝袜一区| 免费在线观看一区二区三区| jvid福利写真一区二区三区| 69av一区二区三区| 国产精品伦理在线| 日韩高清不卡在线| 97久久超碰国产精品电影| 日韩欧美成人激情| 亚洲精品videosex极品| 国产毛片精品国产一区二区三区| 欧美日韩一区高清| 日本一区二区久久| 久久97超碰色| 欧美日本一区二区在线观看| 国产精品久久久久婷婷| 久久er99精品| 欧美一区二区三区免费在线看 | 中文字幕欧美区| 狂野欧美性猛交blacked| 在线观看国产日韩| 中文字幕亚洲一区二区va在线| 国产一区二区三区四区五区入口| 欧美日韩一区高清| 亚洲精品网站在线观看| 成人h版在线观看| 久久精品免费在线观看| 久久国产精品免费| 欧美一卡在线观看| 亚洲成a人v欧美综合天堂| 色综合久久综合网欧美综合网 | 99视频国产精品| 国产片一区二区| 欧美日韩国产天堂| 91免费小视频| 欧美精品一区二区三区高清aⅴ| 婷婷综合五月天| 欧美丝袜丝交足nylons| 亚洲精品综合在线| 91在线观看一区二区| 国产精品美女久久久久久久网站| 国产成人午夜视频| 国产精品网站在线播放| 国产成人精品免费视频网站| 国产欧美精品一区二区色综合|