diff options
Diffstat (limited to 'src/nv_cursor.c')
-rw-r--r-- | src/nv_cursor.c | 82 |
1 files changed, 46 insertions, 36 deletions
diff --git a/src/nv_cursor.c b/src/nv_cursor.c index 04107ee..85ac42a 100644 --- a/src/nv_cursor.c +++ b/src/nv_cursor.c @@ -1,30 +1,43 @@ -/* $XConsortium: nv_driver.c /main/3 1996/10/28 05:13:37 kaleb $ */ -/* - * Copyright 1996-1997 David J. McKay - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DAVID J. MCKAY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* Rewritten with reference from mga driver and 3.3.4 NVIDIA driver by - Jarno Paananen <jpaana@s2.org> */ - -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.11 2002/11/26 23:41:58 mvojkovi Exp $ */ + /***************************************************************************\ +|* *| +|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *| +|* *| +|* NOTICE TO USER: The source code is copyrighted under U.S. and *| +|* international laws. Users and possessors of this source code are *| +|* hereby granted a nonexclusive, royalty-free copyright license to *| +|* use this code in individual and commercial software. *| +|* *| +|* Any use of this source code must include, in the user documenta- *| +|* tion and internal comments to the code, notices to the end user *| +|* as follows: *| +|* *| +|* Copyright 2003 NVIDIA, Corporation. All rights reserved. *| +|* *| +|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *| +|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *| +|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *| +|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *| +|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *| +|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *| +|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *| +|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *| +|* SULTING 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 SOURCE CODE. *| +|* *| +|* U.S. Government End Users. This source code is a "commercial *| +|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| +|* consisting of "commercial computer software" and "commercial *| +|* computer software documentation," as such terms are used in *| +|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *| +|* ment only as a commercial end item. Consistent with 48 C.F.R. *| +|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| +|* all U.S. Government End Users acquire the source code with only *| +|* those rights set forth herein. *| +|* *| + \***************************************************************************/ + +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.12 2003/07/31 20:24:29 mvojkovi Exp $ */ #include "nv_include.h" @@ -129,7 +142,7 @@ TransformCursor (NVPtr pNv) } for(i = 0; i < dwords; i++) - pNv->riva.CURSOR[i] = tmp[i]; + pNv->CURSOR[i] = tmp[i]; DEALLOCATE_LOCAL(tmp); } @@ -150,7 +163,7 @@ NVSetCursorPosition(ScrnInfoPtr pScrn, int x, int y) { NVPtr pNv = NVPTR(pScrn); - pNv->riva.PRAMDAC[0x0000300/4] = (x & 0xFFFF) | (y << 16); + pNv->PRAMDAC[0x0000300/4] = (x & 0xFFFF) | (y << 16); } static void @@ -193,7 +206,7 @@ NVShowCursor(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); /* Enable cursor - X-Windows mode */ - pNv->riva.ShowHideCursor(&pNv->riva, 1); + NVShowHideCursor(pNv, 1); } static void @@ -201,7 +214,7 @@ NVHideCursor(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); /* Disable cursor */ - pNv->riva.ShowHideCursor(&pNv->riva, 0); + NVShowHideCursor(pNv, 0); } static Bool @@ -225,7 +238,7 @@ NVLoadCursorARGB(ScrnInfoPtr pScrn, CursorPtr pCurs) { NVPtr pNv = NVPTR(pScrn); CARD32 *image = pCurs->bits->argb; - CARD32 *dst = (CARD32*)pNv->riva.CURSOR; + CARD32 *dst = (CARD32*)pNv->CURSOR; int x, y, w, h; w = pCurs->bits->width; @@ -266,8 +279,6 @@ NVCursorInit(ScreenPtr pScreen) NVPtr pNv = NVPTR(pScrn); xf86CursorInfoPtr infoPtr; - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NVCursorInit\n")); - infoPtr = xf86CreateCursorInfoRec(); if(!infoPtr) return FALSE; @@ -289,8 +300,7 @@ NVCursorInit(ScreenPtr pScreen) #ifdef ARGB_CURSOR if(pNv->alphaCursor && - (((pNv->Chipset & 0x0ff0) != 0x0110) || - !(pNv->riva.flatPanel & FP_DITHER))) + (((pNv->Chipset & 0x0ff0) != 0x0110) || !pNv->FPDither)) { infoPtr->UseHWCursorARGB = NVUseHWCursorARGB; infoPtr->LoadCursorARGB = NVLoadCursorARGB; |