home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume3 / awm2 / part07 / Cursors.c next >
Encoding:
C/C++ Source or Header  |  1989-02-20  |  4.1 KB  |  143 lines

  1.  
  2.  
  3.  
  4. #ifndef lint
  5. static char *rcsid_StoreCursors_c = "$Header: /usr/graph2/X11.3/contrib/windowmgrs/awm/RCS/Cursors.c,v 1.1 89/01/23 15:34:10 jkh Exp $";
  6. #endif    lint
  7.  
  8. #include "X11/copyright.h"
  9. /*
  10.  *
  11.  * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  12.  *
  13.  * Copyright 1987 by Jordan Hubbard.
  14.  *
  15.  *
  16.  *                         All Rights Reserved
  17.  *
  18.  * Permission to use, copy, modify, and distribute this software and its
  19.  * documentation for any purpose and without fee is hereby granted,
  20.  * provided that the above copyright notice appear in all copies and that
  21.  * both that copyright notice and this permission notice appear in
  22.  * supporting documentation, and that the name of Ardent Computer
  23.  * Corporation or Jordan Hubbard not be used in advertising or publicity
  24.  * pertaining to distribution of the software without specific, written
  25.  * prior permission.
  26.  *
  27.  */
  28.  
  29. /*
  30.  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  31.  *
  32.  *                         All Rights Reserved
  33.  *
  34.  * Permission to use, copy, modify, and distribute this software and its
  35.  * documentation for any purpose and without fee is hereby granted,
  36.  * provided that the above copyright notice appear in all copies and that
  37.  * both that copyright notice and this permission notice appear in
  38.  * supporting documentation, and that the name of Digital Equipment
  39.  * Corporation not be used in advertising or publicity pertaining to
  40.  * distribution of the software without specific, written prior permission.
  41.  *
  42.  *
  43.  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  44.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  45.  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  46.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  47.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  48.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  49.  * SOFTWARE.
  50.  */
  51.  
  52.  
  53.  
  54. /*
  55.  * MODIFICATION HISTORY
  56.  *
  57.  * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  58.  * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group
  59.  *        Convert to X11
  60.  * 1.2 -- Gumby cursor added (This was a major revision).
  61.  */
  62.  
  63. #ifndef lint
  64. static char *sccsid = "@(#)StoreCursors.c    3.8    1/24/86";
  65. #endif
  66.  
  67. #include "awm.h"
  68. #include "X11/cursorfont.h"
  69.  
  70. /*
  71.  * Store all the cursors into global variables.
  72.  */
  73. StoreCursors()
  74. {
  75.     Entry("StoreCursors")
  76.  
  77.     /*
  78.      * Main awm cursor and movement cursor.
  79.      */
  80.     ArrowCrossCursor = XCreateFontCursor(dpy, XC_fleur);
  81.     if (ArrowCrossCursor == FAILURE) {
  82.     Error("StoreCursors -> Unable to store ArrowCrossCursor.");
  83.     }
  84.  
  85.     /*
  86.      * Text cursor used in icons.
  87.      */
  88.     TextCursor = XCreateFontCursor(dpy, XC_xterm);    
  89.     if (TextCursor == FAILURE) {
  90.     Error("StoreCursors -> Unable to store TextCursor.");
  91.     }
  92.  
  93.     /*
  94.      * Icon cursor used to iconify windows.
  95.      */
  96.     IconCursor = XCreateFontCursor(dpy, XC_icon);    
  97.     if (IconCursor == FAILURE) {
  98.     Error("StoreCursors -> Unable to store IconCursor.");
  99.     }
  100.  
  101.     /*
  102.      * Left button main cursor.
  103.      */
  104.     LeftButtonCursor = XCreateFontCursor(dpy, XC_leftbutton);    
  105.     if (LeftButtonCursor == FAILURE) {
  106.     Error("StoreCursors -> Unable to store LeftButtonCursor.");
  107.     }
  108.  
  109.     /*
  110.      * Middle button main cursor.
  111.      */
  112.     MiddleButtonCursor = XCreateFontCursor(dpy, XC_middlebutton);    
  113.     if (MiddleButtonCursor == FAILURE) {
  114.     Error("StoreCursors -> Unable to store MiddleButtonCursor.");
  115.     }
  116.  
  117.     /*
  118.      * Right button main cursor.
  119.      */
  120.     RightButtonCursor = XCreateFontCursor(dpy, XC_rightbutton);    
  121.     if (RightButtonCursor == FAILURE) {
  122.     Error("StoreCursors -> Unable to store RightButtonCursor.");
  123.     }
  124.  
  125.     /*
  126.      * Targer cursor used to identify a window for an action.
  127.      */
  128.     TargetCursor = XCreateFontCursor(dpy, XC_circle);    
  129.     if (TargetCursor == FAILURE) {
  130.     Error("StoreCursors -> Unable to store TargetCursor.");
  131.     }
  132.     /*
  133.      * Gumby cursor used in icons if icon is not a typein icon
  134.      * (otherwise use textcursor
  135.      */
  136.     GumbyCursor = XCreateFontCursor(dpy, XC_gumby);    
  137.     if (GumbyCursor == FAILURE) {
  138.     Error("StoreCursors -> Unable to store GumbyCursor.");
  139.     }
  140.     Leave(0)
  141. }
  142.  
  143.