(file) Return to aticursor.c CVS log (file) (dir) Up to [XFree86 CVS] / xc / programs / Xserver / hw / xfree86 / drivers / ati

 1 tsi   1.3 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/aticursor.c,v 1.2 2002/01/16 16:22:26 tsi Exp $ */
 2 tsi   1.1 /*
 3 tsi   1.3  * Copyright 2001 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
 4 tsi   1.1  *
 5            * Permission to use, copy, modify, distribute, and sell this software and its
 6            * documentation for any purpose is hereby granted without fee, provided that
 7            * the above copyright notice appear in all copies and that both that copyright
 8            * notice and this permission notice appear in supporting documentation, and
 9            * that the name of Marc Aurele La France not be used in advertising or
10            * publicity pertaining to distribution of the software without specific,
11            * written prior permission.  Marc Aurele La France makes no representations
12            * about the suitability of this software for any purpose.  It is provided
13            * "as-is" without express or implied warranty.
14            *
15            * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16            * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO
17            * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18            * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
19            * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20            * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21            * PERFORMANCE OF THIS SOFTWARE.
22            */
23           
24           #include "atiadapter.h"
25 tsi   1.1 #include "aticursor.h"
26           #include "atimach64.h"
27           #include "atistruct.h"
28           
29           #include "xf86.h"
30           
31           /*
32            * ATIInitializeCursor --
33            *
34            * This function initialises the screen cursor.
35            */
36           Bool
37           ATIInitializeCursor
38           (
39               ScreenPtr pScreen,
40               ATIPtr    pATI
41           )
42           {
43               /* Initialise software cursor */
44               if (!miDCInitialize(pScreen, xf86GetPointerScreenFuncs()))
45                   return FALSE;
46 tsi   1.1 
47               if (pATI->Cursor == ATI_CURSOR_SOFTWARE)
48                   return TRUE;
49           
50               if (!(pATI->pCursorInfo = xf86CreateCursorInfoRec()))
51                   return FALSE;
52           
53               switch (pATI->Adapter)
54               {
55                   case ATI_ADAPTER_MACH64:
56                       if (ATIMach64CursorInit(pATI->pCursorInfo))
57                           break;
58                       /* Fall through */
59           
60                   default:
61                       xf86DestroyCursorInfoRec(pATI->pCursorInfo);
62                       pATI->pCursorInfo = NULL;
63                       return FALSE;
64               }
65           
66               if (xf86InitCursor(pScreen, pATI->pCursorInfo))
67 tsi   1.1     {
68                   xf86SetSilkenMouse(pScreen);
69                   return TRUE;
70               }
71           
72               xf86DestroyCursorInfoRec(pATI->pCursorInfo);
73               pATI->pCursorInfo = NULL;
74               return FALSE;
75           }

Powered by
ViewCVS 0.9.2