Annotation of 43BSDTahoe/new/X/uwm/StoreCursors.c, revision 1.1.1.1

1.1       root        1: #ifndef lint
                      2: static char *rcsid_StoreCursors_c = "$Header: StoreCursors.c,v 10.4 86/11/19 16:24:48 jg Rel $";
                      3: #endif lint
                      4: 
                      5: /*
                      6:  *                     COPYRIGHT 1985, 1986
                      7:  *                DIGITAL EQUIPMENT CORPORATION
                      8:  *                    MAYNARD, MASSACHUSETTS
                      9:  *                     ALL RIGHTS RESERVED.
                     10:  *
                     11:  * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
                     12:  * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
                     13:  * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITIBILITY OF THIS SOFTWARE FOR
                     14:  * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
                     15:  *
                     16:  * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
                     17:  * APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
                     18:  * SET FORTH ABOVE.
                     19:  *
                     20:  *
                     21:  * Permission to use, copy, modify, and distribute this software and its
                     22:  * documentation for any purpose and without fee is hereby granted, provided
                     23:  * that the above copyright notice appear in all copies and that both that
                     24:  * copyright notice and this permission notice appear in supporting documentation,
                     25:  * and that the name of Digital Equipment Corporation not be used in advertising
                     26:  * or publicity pertaining to distribution of the software without specific, 
                     27:  * written prior permission.
                     28:  *
                     29:  */
                     30: 
                     31: 
                     32: /*
                     33:  * MODIFICATION HISTORY
                     34:  *
                     35:  * 000 -- M. Gancarz, DEC Ultrix Engineering Group
                     36:  */
                     37: 
                     38: #ifndef lint
                     39: static char *sccsid = "@(#)StoreCursors.c      3.8     1/24/86";
                     40: #endif
                     41: 
                     42: #include "uwm.h"
                     43: 
                     44: /*
                     45:  * Include the cursor definition files.
                     46:  */
                     47: #include <X/cursors/arrow_cross.cursor>
                     48: #include <X/cursors/arrow_cross_mask.cursor>
                     49: #include <X/cursors/xterm.cursor>
                     50: #include <X/cursors/xterm_mask.cursor>
                     51: #include <X/cursors/icon.cursor>
                     52: #include <X/cursors/icon_mask.cursor>
                     53: #include "menu.cursor"
                     54: #include "menu_mask.cursor"
                     55: #include "leftbutton.cursor"
                     56: #include "middlebutton.cursor"
                     57: #include "rightbutton.cursor"
                     58: #include "button_mask.cursor"
                     59: 
                     60: /*
                     61:  * Store all the cursors into global variables.
                     62:  */
                     63: StoreCursors()
                     64: {
                     65:     /*
                     66:      * Main uwm cursor and movement cursor.
                     67:      */
                     68:     ArrowCrossCursor = XCreateCursor(
                     69:        arrow_cross_width, arrow_cross_height, 
                     70:        arrow_cross_bits, arrow_cross_mask_bits, 
                     71:        8, 8,
                     72:        BlackPixel, WhitePixel,
                     73:        CursorFunc
                     74:     );
                     75:     if (ArrowCrossCursor == FAILURE) {
                     76:        Error("StoreCursors -> Unable to store ArrowCrossCursor.");
                     77:     }
                     78: 
                     79:     /*
                     80:      * Text cursor used in icons.
                     81:      */
                     82:     TextCursor = XCreateCursor(
                     83:        xterm_width, xterm_height, 
                     84:        xterm_bits, xterm_mask_bits, 
                     85:        8, 8,
                     86:        BlackPixel, WhitePixel,
                     87:        CursorFunc
                     88:     ); 
                     89:     if (TextCursor == FAILURE) {
                     90:        Error("StoreCursors -> Unable to store TextCursor.");
                     91:     }
                     92: 
                     93:     /*
                     94:      * Icon cursor used to iconify windows.
                     95:      */
                     96:     IconCursor = XCreateCursor(
                     97:        icon_width, icon_height, 
                     98:        icon_bits, icon_mask_bits, 
                     99:        8, 8,
                    100:        ITextForground, ITextBackground,
                    101:        IconCursorFunc
                    102:     ); 
                    103:     if (IconCursor == FAILURE) {
                    104:        Error("StoreCursors -> Unable to store IconCursor.");
                    105:     }
                    106: 
                    107:     /*
                    108:      * Menu cursor.
                    109:      */
                    110:     MenuCursor = XCreateCursor(
                    111:        menu_width, menu_height, 
                    112:        menu_bits, menu_mask_bits, 
                    113:        0, 8,
                    114:        ITextForground, ITextBackground,
                    115:        IconCursorFunc
                    116:     ); 
                    117:     if (MenuCursor == FAILURE) {
                    118:        Error("StoreCursors -> Unable to store MenuCursor.");
                    119:     }
                    120: 
                    121:     /*
                    122:      * Left button main cursor.
                    123:      */
                    124:     LeftButtonCursor = XCreateCursor(
                    125:        leftbutton_width, leftbutton_height, 
                    126:        leftbutton_bits, button_mask_bits, 
                    127:        8, 8,
                    128:        WhitePixel, BlackPixel,
                    129:        CursorFunc
                    130:     ); 
                    131:     if (LeftButtonCursor == FAILURE) {
                    132:        Error("StoreCursors -> Unable to store LeftButtonCursor.");
                    133:     }
                    134: 
                    135:     /*
                    136:      * Middle button main cursor.
                    137:      */
                    138:     MiddleButtonCursor = XCreateCursor(
                    139:        middlebutton_width, middlebutton_height, 
                    140:        middlebutton_bits, button_mask_bits, 
                    141:        8, 8,
                    142:        WhitePixel, BlackPixel,
                    143:        CursorFunc
                    144:     ); 
                    145:     if (MiddleButtonCursor == FAILURE) {
                    146:        Error("StoreCursors -> Unable to store MiddleButtonCursor.");
                    147:     }
                    148: 
                    149:     /*
                    150:      * Right button main cursor.
                    151:      */
                    152:     RightButtonCursor = XCreateCursor(
                    153:        rightbutton_width, rightbutton_height, 
                    154:        rightbutton_bits, button_mask_bits, 
                    155:        8, 8,
                    156:        WhitePixel, BlackPixel,
                    157:        CursorFunc
                    158:     ); 
                    159:     if (RightButtonCursor == FAILURE) {
                    160:        Error("StoreCursors -> Unable to store RightButtonCursor.");
                    161:     }
                    162: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.