|
|
1.1 root 1: #ifndef lint
2: static char *rcsid_StoreCursors_c = "$Header: Cursors.c,v 1.2 87/09/11 08:21:52 toddb Exp $";
3: #endif lint
4:
5: #include <X11/copyright.h>
6:
7: /*
8: * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
9: *
10: * All Rights Reserved
11: *
12: * Permission to use, copy, modify, and distribute this software and its
13: * documentation for any purpose and without fee is hereby granted,
14: * provided that the above copyright notice appear in all copies and that
15: * both that copyright notice and this permission notice appear in
16: * supporting documentation, and that the name of Digital Equipment
17: * Corporation not be used in advertising or publicity pertaining to
18: * distribution of the software without specific, written prior permission.
19: *
20: *
21: * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
22: * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
23: * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
24: * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
25: * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
26: * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
27: * SOFTWARE.
28: */
29:
30:
31:
32: /*
33: * MODIFICATION HISTORY
34: *
35: * 000 -- M. Gancarz, DEC Ultrix Engineering Group
36: * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group
37: * Convert to X11
38: */
39:
40: #ifndef lint
41: static char *sccsid = "@(#)StoreCursors.c 3.8 1/24/86";
42: #endif
43:
44: #include "uwm.h"
45: #include <X11/cursorfont.h>
46:
47: /*
48: * Store all the cursors into global variables.
49: */
50: StoreCursors()
51: {
52: /*
53: * Main uwm cursor and movement cursor.
54: */
55: ArrowCrossCursor = XCreateFontCursor(dpy, XC_fleur);
56: if (ArrowCrossCursor == FAILURE) {
57: Error("StoreCursors -> Unable to store ArrowCrossCursor.");
58: }
59:
60: /*
61: * Text cursor used in icons.
62: */
63: TextCursor = XCreateFontCursor(dpy, XC_xterm);
64: if (TextCursor == FAILURE) {
65: Error("StoreCursors -> Unable to store TextCursor.");
66: }
67:
68: /*
69: * Icon cursor used to iconify windows.
70: */
71: IconCursor = XCreateFontCursor(dpy, XC_icon);
72: if (IconCursor == FAILURE) {
73: Error("StoreCursors -> Unable to store IconCursor.");
74: }
75:
76: /*
77: * Menu cursor.
78: */
79: MenuCursor = XCreateFontCursor(dpy, XC_sb_left_arrow);
80: if (MenuCursor == FAILURE) {
81: Error("StoreCursors -> Unable to store MenuCursor.");
82: }
83:
84: /*
85: * Left button main cursor.
86: */
87: LeftButtonCursor = XCreateFontCursor(dpy, XC_leftbutton);
88: if (LeftButtonCursor == FAILURE) {
89: Error("StoreCursors -> Unable to store LeftButtonCursor.");
90: }
91:
92: /*
93: * Middle button main cursor.
94: */
95: MiddleButtonCursor = XCreateFontCursor(dpy, XC_middlebutton);
96: if (MiddleButtonCursor == FAILURE) {
97: Error("StoreCursors -> Unable to store MiddleButtonCursor.");
98: }
99:
100: /*
101: * Right button main cursor.
102: */
103: RightButtonCursor = XCreateFontCursor(dpy, XC_rightbutton);
104: if (RightButtonCursor == FAILURE) {
105: Error("StoreCursors -> Unable to store RightButtonCursor.");
106: }
107:
108: /*
109: * Targer cursor used to identify a window for an action.
110: */
111: TargetCursor = XCreateFontCursor(dpy, XC_circle);
112: if (TargetCursor == FAILURE) {
113: Error("StoreCursors -> Unable to store TargetCursor.");
114: }
115: }
116:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.