1: #include <X/mit-copyright.h>
   2: 
   3: /* Copyright    Massachusetts Institute of Technology    1985	*/
   4: 
   5: /*
   6:  *	StoreCursors - This subroutine stores all the cursors used
   7:  *	by the X Window System window manager (xwm).
   8:  *
   9:  *	File:		StoreCursors.c
  10:  */
  11: 
  12: #include "xwm.h"
  13: 
  14: #ifndef lint
  15: static char *rcsid_StoreCursors_c = "$Header: StoreCursors.c,v 10.3 86/02/01 16:10:10 tony Rel $";
  16: #endif
  17: 
  18: /*
  19:  * Include the cursor definition files.
  20:  */
  21: #include "../cursors/arrow_cross.cursor"
  22: #include "../cursors/arrow_cross_mask.cursor"
  23: #include "../cursors/ll_angle.cursor"
  24: #include "../cursors/ll_angle_mask.cursor"
  25: #include "../cursors/ul_angle.cursor"
  26: #include "../cursors/ul_angle_mask.cursor"
  27: #include "../cursors/lr_angle.cursor"
  28: #include "../cursors/lr_angle_mask.cursor"
  29: #include "../cursors/ur_angle.cursor"
  30: #include "../cursors/ur_angle_mask.cursor"
  31: #include "../cursors/top_tee.cursor"
  32: #include "../cursors/top_tee_mask.cursor"
  33: #include "../cursors/left_tee.cursor"
  34: #include "../cursors/left_tee_mask.cursor"
  35: #include "../cursors/bottom_tee.cursor"
  36: #include "../cursors/bottom_tee_mask.cursor"
  37: #include "../cursors/right_tee.cursor"
  38: #include "../cursors/right_tee_mask.cursor"
  39: #include "../cursors/dot.cursor"
  40: #include "../cursors/dot_mask.cursor"
  41: #include "../cursors/circle.cursor"
  42: #include "../cursors/circle_mask.cursor"
  43: #include "../cursors/xterm.cursor"
  44: #include "../cursors/xterm_mask.cursor"
  45: #include "../cursors/icon.cursor"
  46: #include "../cursors/icon_mask.cursor"
  47: 
  48: /*
  49:  * Store all the cursors into global variables.
  50:  */
  51: StoreCursors()
  52: {
  53:     /*
  54:      * Main xwm cursor and movement cursor.
  55:      */
  56:     ArrowCrossCursor = XCreateCursor(
  57:         arrow_cross_width, arrow_cross_height,
  58:         arrow_cross_bits, arrow_cross_mask_bits,
  59:     8, 8,
  60:     BlackPixel, WhitePixel,
  61:     CursorFunc
  62:     );
  63:     if (ArrowCrossCursor == FAILURE) {
  64:     Error("StoreCursors -> Unable to store ArrowCrossCursor.");
  65:     }
  66: 
  67:     /*
  68:      * Upper left angle cursor used to resize windows.
  69:      */
  70:     ULAngleCursor = XCreateCursor(
  71:         ul_angle_width, ul_angle_height,
  72:         ul_angle_bits, ul_angle_mask_bits,
  73:     2, 2,
  74:     BlackPixel, WhitePixel,
  75:     CursorFunc
  76:     );
  77:     if (ULAngleCursor == FAILURE) {
  78:     Error("StoreCursors -> Unable to store ULAngleCursor.");
  79:     }
  80: 
  81:     /*
  82:      * Lower left angle cursor used to resize windows.
  83:      */
  84:     LLAngleCursor = XCreateCursor(
  85:         ll_angle_width, ll_angle_height,
  86:         ll_angle_bits, ll_angle_mask_bits,
  87:     2, 15,
  88:     BlackPixel, WhitePixel,
  89:     CursorFunc
  90:     );
  91:     if (LLAngleCursor == FAILURE) {
  92:     Error("StoreCursors -> Unable to store LLAngleCursor.");
  93:     }
  94: 
  95:     /*
  96:      * Lower right angle cursor used to resize windows.
  97:      */
  98:     LRAngleCursor = XCreateCursor(
  99:         lr_angle_width, lr_angle_height,
 100:         lr_angle_bits, lr_angle_mask_bits,
 101:     15, 15,
 102:     BlackPixel, WhitePixel,
 103:     CursorFunc
 104:     );
 105:     if (LRAngleCursor == FAILURE) {
 106:     Error("StoreCursors -> Unable to store LRAngleCursor.");
 107:     }
 108: 
 109:     /*
 110:      * Upper right angle cursor used to resize windows.
 111:      */
 112:     URAngleCursor = XCreateCursor(
 113:         ur_angle_width, ur_angle_height,
 114:         ur_angle_bits, ur_angle_mask_bits,
 115:     15, 2,
 116:     BlackPixel, WhitePixel,
 117:     CursorFunc
 118:     );
 119:     if (URAngleCursor == FAILURE) {
 120:     Error("StoreCursors -> Unable to store URAngleCursor.");
 121:     }
 122: 
 123:     /*
 124:      * Top tee cursor used to resize windows.
 125:      */
 126:     TopTeeCursor = XCreateCursor(
 127:         top_tee_width, top_tee_height,
 128:         top_tee_bits, top_tee_mask_bits,
 129:     8, 2,
 130:     BlackPixel, WhitePixel,
 131:     CursorFunc
 132:     );
 133:     if (TopTeeCursor == FAILURE) {
 134:     Error("StoreCursors -> Unable to store TopTeeCursor.");
 135:     }
 136: 
 137:     /*
 138:      * Left tee cursor used to resize windows.
 139:      */
 140:     LeftTeeCursor = XCreateCursor(
 141:         left_tee_width, left_tee_height,
 142:         left_tee_bits, left_tee_mask_bits,
 143:     2, 8,
 144:     BlackPixel, WhitePixel,
 145:     CursorFunc
 146:     );
 147:     if (LeftTeeCursor == FAILURE) {
 148:     Error("StoreCursors -> Unable to store LeftTeeCursor.");
 149:     }
 150: 
 151:     /*
 152:      * Bottom tee cursor used to resize windows.
 153:      */
 154:     BottomTeeCursor = XCreateCursor(
 155:         bottom_tee_width, bottom_tee_height,
 156:         bottom_tee_bits, bottom_tee_mask_bits,
 157:     8, 15,
 158:     BlackPixel, WhitePixel,
 159:     CursorFunc
 160:     );
 161:     if (BottomTeeCursor == FAILURE) {
 162:     Error("StoreCursors -> Unable to store BottomTeeCursor.");
 163:     }
 164: 
 165:     /*
 166:      * Right tee cursor used to resize windows.
 167:      */
 168:     RightTeeCursor = XCreateCursor(
 169:         right_tee_width, right_tee_height,
 170:         right_tee_bits, right_tee_mask_bits,
 171:     15, 8,
 172:     BlackPixel, WhitePixel,
 173:     CursorFunc
 174:     );
 175:     if (RightTeeCursor == FAILURE) {
 176:     Error("StoreCursors -> Unable to store RightTeeCursor.");
 177:     }
 178: 
 179:     /*
 180:      * Dot cursor used to lower windows.
 181:      */
 182:     DotCursor = XCreateCursor(
 183:         dot_width, dot_height,
 184:         dot_bits, dot_mask_bits,
 185:     8, 8,
 186:     BlackPixel, WhitePixel,
 187:     CursorFunc
 188:     );
 189:     if (DotCursor == FAILURE) {
 190:     Error("StoreCursors -> Unable to store DotCursor.");
 191:     }
 192: 
 193:     /*
 194:      * Circle cursor used to raise windows.
 195:      */
 196:     CircleCursor = XCreateCursor(
 197:         circle_width, circle_height,
 198:         circle_bits, circle_mask_bits,
 199:     8, 8,
 200:     BlackPixel, WhitePixel,
 201:     CursorFunc
 202:     );
 203:     if (CircleCursor == FAILURE) {
 204:     Error("StoreCursors -> Unable to store CircleCursor.");
 205:     }
 206: 
 207:     /*
 208:      * Text cursor used in icons.
 209:      */
 210:     TextCursor = XCreateCursor(
 211:         xterm_width, xterm_height,
 212:         xterm_bits, xterm_mask_bits,
 213:     8, 8,
 214:     BlackPixel, WhitePixel,
 215:     CursorFunc
 216:     );
 217:     if (TextCursor == FAILURE) {
 218:     Error("StoreCursors -> Unable to store TextCursor.");
 219:     }
 220: 
 221:     /*
 222:      * Icon cursor used to iconify windows.
 223:      */
 224:     IconCursor = XCreateCursor(
 225:         icon_width, icon_height,
 226:         icon_bits, icon_mask_bits,
 227:     8, 8,
 228:     ITextForground, ITextBackground,
 229:     IconCursorFunc
 230:     );
 231:     if (IconCursor == FAILURE) {
 232:     Error("StoreCursors -> Unable to store IconCursor.");
 233:     }
 234: }

Defined functions

StoreCursors defined in line 51; used 2 times

Defined variables

rcsid_StoreCursors_c defined in line 15; never used
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1066
Valid CSS Valid XHTML 1.0 Strict