Annotation of researchv9/X11/src/X.V11R1/server/ddx/mi/miwindow.c, revision 1.1.1.1

1.1       root        1: /***********************************************************
                      2: Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
                      3: and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
                      4: 
                      5:                         All Rights Reserved
                      6: 
                      7: Permission to use, copy, modify, and distribute this software and its 
                      8: documentation for any purpose and without fee is hereby granted, 
                      9: provided that the above copyright notice appear in all copies and that
                     10: both that copyright notice and this permission notice appear in 
                     11: supporting documentation, and that the names of Digital or MIT not be
                     12: used in advertising or publicity pertaining to distribution of the
                     13: software without specific, written prior permission.  
                     14: 
                     15: DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
                     16: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
                     17: DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
                     18: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
                     19: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
                     20: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
                     21: SOFTWARE.
                     22: 
                     23: ******************************************************************/
                     24: /* $Header: miwindow.c,v 1.14 87/09/11 07:20:06 toddb Exp $ */
                     25: #include "X.h"
                     26: #include "miscstruct.h"
                     27: #include "region.h"
                     28: #include "mi.h"
                     29: #include "windowstr.h"
                     30: #include "scrnintstr.h"
                     31: #include "pixmapstr.h"
                     32: 
                     33: /* 
                     34:  * miwindow.c : machine independent window routines 
                     35:  *  miClearToBackground
                     36:  *  miPaintWindow
                     37:  *
                     38:  *  author: drewry
                     39:  *          Dec 1986
                     40:  */
                     41: 
                     42: 
                     43: void 
                     44: miClearToBackground(pWin, x, y, w, h, generateExposures)
                     45:     WindowPtr pWin;
                     46:     short x,y;
                     47:     unsigned short w,h;
                     48:     Bool generateExposures;
                     49: {
                     50:     BoxRec box;
                     51:     RegionPtr pReg;
                     52: 
                     53:     if ((pWin->backgroundTile == (PixmapPtr)None) ||
                     54:        (pWin->class == InputOnly))
                     55:         return ;
                     56:     box.x1 = pWin->absCorner.x + x;
                     57:     box.y1 = pWin->absCorner.y + y;
                     58:     if (w)
                     59:         box.x2 = box.x1 + w;
                     60:     else
                     61:         box.x2 = box.x1 + pWin->clientWinSize.width - x;
                     62:     if (h)
                     63:         box.y2 = box.y1 + h;   
                     64:     else
                     65:         box.y2 = box.y1 + pWin->clientWinSize.height - y;
                     66: 
                     67:     pReg = (* pWin->drawable.pScreen->RegionCreate)(&box, 1);
                     68:     if (generateExposures)
                     69:     {
                     70:         (* pWin->drawable.pScreen->Intersect)(pWin->exposed, pReg, pWin->clipList);
                     71:         HandleExposures(pWin);
                     72:     }
                     73:     else
                     74:     {
                     75:         (* pWin->drawable.pScreen->Intersect)(pReg, pReg, pWin->clipList);
                     76:         (*pWin->PaintWindowBackground)(pWin, pReg, PW_BACKGROUND);
                     77:     }
                     78:     (* pWin->drawable.pScreen->RegionDestroy)(pReg);
                     79: }
                     80: 
                     81: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.