Blender V2.61 - r43446

wm_cursors.c

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version. 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2005-2007 Blender Foundation
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): Matt Ebb
00024  *
00025  * ***** END GPL/BL DUAL LICENSE BLOCK *****
00026  */
00027 
00033 #include <stdio.h>
00034 #include <string.h>
00035 
00036 #include "GHOST_C-api.h"
00037 
00038 #include "BLO_sys_types.h"
00039 
00040 #include "DNA_listBase.h"
00041 #include "DNA_userdef_types.h" 
00042 
00043 #include "BKE_context.h"
00044 #include "BKE_global.h"
00045 #include "BKE_main.h"
00046 
00047 #include "WM_api.h"
00048 #include "WM_types.h"
00049 #include "wm_cursors.h"
00050 
00051 /* XXX this still is mess from old code */
00052 
00053 
00054 
00055 /* Some simple ghost <-> blender conversions */
00056 static GHOST_TStandardCursor convert_cursor(int curs) 
00057 {
00058     switch(curs) {
00059         default:
00060         case CURSOR_STD:        return GHOST_kStandardCursorDefault;
00061         case CURSOR_FACESEL:    return GHOST_kStandardCursorRightArrow;
00062         case CURSOR_WAIT:       return GHOST_kStandardCursorWait;
00063         case CURSOR_EDIT:       return GHOST_kStandardCursorCrosshair;
00064         case CURSOR_HELP:       
00065 #ifdef __APPLE__
00066             return GHOST_kStandardCursorLeftRight;
00067 #else
00068             return GHOST_kStandardCursorHelp;
00069 #endif
00070         case CURSOR_X_MOVE:     return GHOST_kStandardCursorLeftRight;
00071         case CURSOR_Y_MOVE:     return GHOST_kStandardCursorUpDown;
00072         case CURSOR_PENCIL:     return GHOST_kStandardCursorPencil;
00073         case CURSOR_COPY:       return GHOST_kStandardCursorCopy;
00074     }
00075 }
00076 
00077 static void window_set_custom_cursor(wmWindow *win, unsigned char mask[16][2], 
00078                               unsigned char bitmap[16][2], int hotx, int hoty) 
00079 {
00080     GHOST_SetCustomCursorShape(win->ghostwin, bitmap, mask, hotx, hoty);
00081 }
00082 
00083 static void window_set_custom_cursor_ex(wmWindow *win, BCursor *cursor, int useBig) 
00084 {
00085     if (useBig) {
00086         GHOST_SetCustomCursorShapeEx(win->ghostwin, 
00087                                      (GHOST_TUns8 *)cursor->big_bm, (GHOST_TUns8 *)cursor->big_mask, 
00088                                      cursor->big_sizex,cursor->big_sizey,
00089                                      cursor->big_hotx,cursor->big_hoty,
00090                                      cursor->fg_color, cursor->bg_color);
00091     } else {
00092         GHOST_SetCustomCursorShapeEx(win->ghostwin, 
00093                                      (GHOST_TUns8 *)cursor->small_bm, (GHOST_TUns8 *)cursor->small_mask, 
00094                                      cursor->small_sizex,cursor->small_sizey,
00095                                      cursor->small_hotx,cursor->small_hoty,
00096                                      cursor->fg_color, cursor->bg_color);
00097     }
00098 }
00099 
00100 
00101 /* Cursor Globals */
00102 static BCursor *BlenderCursor[BC_NUMCURSORS]; /*Points to static BCursor Structs */
00103 
00104 void WM_cursor_set(wmWindow *win, int curs)
00105 {
00106 
00107     if (win==NULL) return; /* Can't set custom cursor before Window init */
00108 
00109     if (curs==CURSOR_NONE) {
00110         GHOST_SetCursorVisibility(win->ghostwin, 0);
00111         return;
00112     }
00113 
00114 #ifdef _WIN32
00115     /* the default win32 cross cursor is barely visible,
00116      * only 1 pixel thick, use another one instead */
00117     if(curs==CURSOR_EDIT)
00118         curs= BC_CROSSCURSOR;
00119 #endif
00120 
00121     GHOST_SetCursorVisibility(win->ghostwin, 1);
00122     
00123     if(curs == CURSOR_STD && win->modalcursor)
00124         curs= win->modalcursor;
00125     
00126     win->cursor= curs;
00127     
00128     /* detect if we use system cursor or Blender cursor */
00129     if(curs>=BC_GHOST_CURSORS) {
00130         GHOST_SetCursorShape(win->ghostwin, convert_cursor(curs));
00131     }
00132     else {
00133         if ((curs<SYSCURSOR) || (curs>=BC_NUMCURSORS)) return;  
00134 
00135         if (curs==SYSCURSOR) {  /* System default Cursor */
00136             GHOST_SetCursorShape(win->ghostwin, convert_cursor(CURSOR_STD));
00137         }
00138         else if ( (U.curssize==0) || (BlenderCursor[curs]->big_bm == NULL) ) {
00139             window_set_custom_cursor_ex(win, BlenderCursor[curs], 0);
00140         }
00141         else {
00142             window_set_custom_cursor_ex(win, BlenderCursor[curs], 1);
00143         }
00144     }
00145 }
00146 
00147 void WM_cursor_modal(wmWindow *win, int val)
00148 {
00149     if(win->lastcursor == 0)
00150         win->lastcursor = win->cursor;
00151     win->modalcursor = val;
00152     WM_cursor_set(win, val);
00153 }
00154 
00155 void WM_cursor_restore(wmWindow *win)
00156 {
00157     win->modalcursor = 0;
00158     if(win->lastcursor)
00159         WM_cursor_set(win, win->lastcursor);
00160     win->lastcursor = 0;
00161 }
00162 
00163 /* to allow usage all over, we do entire WM */
00164 void WM_cursor_wait(int val)
00165 {
00166     if(!G.background) {
00167         wmWindowManager *wm= G.main->wm.first;
00168         wmWindow *win= wm?wm->windows.first:NULL; 
00169         
00170         for(; win; win= win->next) {
00171             if(val) {
00172                 WM_cursor_modal(win, BC_WAITCURSOR);
00173             } else {
00174                 WM_cursor_restore(win);
00175             }
00176         }
00177     }
00178 }
00179 
00180 void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds)
00181 {
00182     /* Only grab cursor when not running debug.
00183      * It helps not to get a stuck WM when hitting a breakpoint  
00184      * */
00185     GHOST_TGrabCursorMode mode = GHOST_kGrabNormal;
00186 
00187     if(hide)        mode = GHOST_kGrabHide;
00188     else if(wrap)   mode = GHOST_kGrabWrap;
00189     if ((G.f & G_DEBUG) == 0) {
00190         if (win && win->ghostwin) {
00191             const GHOST_TabletData *tabletdata= GHOST_GetTabletData(win->ghostwin);
00192             // Note: There is no tabletdata on Windows if no tablet device is connected.
00193             if (!tabletdata)
00194                 GHOST_SetCursorGrab(win->ghostwin, mode, bounds);
00195             else if (tabletdata->Active == GHOST_kTabletModeNone)
00196                 GHOST_SetCursorGrab(win->ghostwin, mode, bounds);
00197 
00198             win->grabcursor = mode;
00199         }
00200     }
00201 }
00202 
00203 void WM_cursor_ungrab(wmWindow *win)
00204 {
00205     if ((G.f & G_DEBUG) == 0) {
00206         if(win && win->ghostwin) {
00207             GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, NULL);
00208             win->grabcursor = GHOST_kGrabDisable;
00209         }
00210     }
00211 }
00212 
00213 /* give it a modal keymap one day? */
00214 int wm_cursor_arrow_move(wmWindow *win, wmEvent *event)
00215 {
00216     if(win && event->val==KM_PRESS) {
00217         
00218         if(event->type==UPARROWKEY) {
00219             WM_cursor_warp(win, event->x, event->y+1);
00220             return 1;
00221         } else if(event->type==DOWNARROWKEY) {
00222             WM_cursor_warp(win, event->x, event->y-1);
00223             return 1;
00224         } else if(event->type==LEFTARROWKEY) {
00225             WM_cursor_warp(win, event->x-1, event->y);
00226             return 1;
00227         } else if(event->type==RIGHTARROWKEY) {
00228             WM_cursor_warp(win, event->x+1, event->y);
00229             return 1;
00230         }
00231     }
00232     return 0;
00233 }
00234 
00235 
00236 /* afer this you can call restore too */
00237 void WM_timecursor(wmWindow *win, int nr)
00238 {
00239     /* 10 8x8 digits */
00240     static char number_bitmaps[10][8]= {
00241     {0,  56,  68,  68,  68,  68,  68,  56}, 
00242     {0,  24,  16,  16,  16,  16,  16,  56}, 
00243     {0,  60,  66,  32,  16,   8,   4, 126}, 
00244     {0, 124,  32,  16,  56,  64,  66,  60}, 
00245     {0,  32,  48,  40,  36, 126,  32,  32}, 
00246     {0, 124,   4,  60,  64,  64,  68,  56}, 
00247     {0,  56,   4,   4,  60,  68,  68,  56}, 
00248     {0, 124,  64,  32,  16,   8,   8,   8}, 
00249     {0,  60,  66,  66,  60,  66,  66,  60}, 
00250     {0,  56,  68,  68, 120,  64,  68,  56} 
00251     };
00252     unsigned char mask[16][2];
00253     unsigned char bitmap[16][2]= {{0}};
00254     int i, idx;
00255     
00256     if(win->lastcursor == 0)
00257         win->lastcursor= win->cursor; 
00258     
00259     memset(&mask, 0xFF, sizeof(mask));
00260     
00261     /* print number bottom right justified */
00262     for (idx= 3; nr && idx>=0; idx--) {
00263         char *digit= number_bitmaps[nr%10];
00264         int x = idx%2;
00265         int y = idx/2;
00266         
00267         for (i=0; i<8; i++)
00268             bitmap[i + y*8][x]= digit[i];
00269         nr/= 10;
00270     }
00271     
00272     window_set_custom_cursor(win, mask, bitmap, 7, 7);
00273 }
00274 
00275 
00276 /* ****************************************************************** 
00277 Custom Cursor Description:
00278 
00279 Each bit represents a pixel, so 1 byte = 8 pixels, 
00280 the bytes go Left to Right. Top to bottom
00281 the bits in a byte go right to left
00282 (ie;  0x01, 0x80  represents a line of 16 pix with the first and last pix set.) 
00283 
00284 A 0 in the bitmap = bg_color, a 1 fg_color
00285 a 0 in the mask   = transparent pix.
00286 
00287 Until 32x32 cursors are supported on all platforms, the size of the 
00288 small cursors MUST be 16x16.
00289 
00290 Large cursors have a MAXSIZE of 32x32.
00291 
00292 Other than that, the specified size of the cursors is just a guideline, 
00293 However, the char array that defines the BM and MASK must be byte aligned.
00294 ie a 17x17 cursor needs 3 bytes (cols) * 17 bytes (rows) 
00295 (3 bytes = 17 bits rounded up to nearest whole byte).  Pad extra bits
00296 in mask with 0's.
00297 
00298 Setting big_bm=NULL disables the large version of the cursor.
00299 
00300 ******************************************************************* 
00301 
00302 There is a nice Python GUI utility that can be used for drawing cursors in
00303 this format in the Blender source distribution, in 
00304 blender/source/tools/MakeCursor.py . Start it with $ python MakeCursor.py
00305 It will copy its output to the console when you press 'Do it'.
00306 
00307 */
00308 
00309 /* Because defining a cursor mixes declarations and executable code
00310 each cursor needs it's own scoping block or it would be split up 
00311 over several hundred lines of code.  To enforce/document this better
00312 I define 2 pretty braindead macros so it's obvious what the extra "[]"
00313 are for */
00314 
00315 #define BEGIN_CURSOR_BLOCK {
00316 #define END_CURSOR_BLOCK   }
00317 
00318 void wm_init_cursor_data(void)
00319 {
00320     /********************** NW_ARROW Cursor **************************/
00321 BEGIN_CURSOR_BLOCK
00322         static char nw_sbm[]={
00323             0x03,  0x00,  0x05,  0x00,  0x09,  0x00,  0x11,  0x00,
00324                 0x21,  0x00,  0x41,  0x00,  0x81,  0x00,  0x01,  0x01,
00325                 0x01,  0x02,  0xc1,  0x03,  0x49,  0x00,  0x8d,  0x00,
00326                 0x8b,  0x00,  0x10,  0x01,  0x90,  0x01,  0x60,  0x00,
00327         };
00328 
00329         static char nw_smsk[]={
00330             0x03,  0x00,  0x07,  0x00,  0x0f,  0x00,  0x1f,  0x00,
00331                 0x3f,  0x00,  0x7f,  0x00,  0xff,  0x00,  0xff,  0x01,
00332                 0xff,  0x03,  0xff,  0x03,  0x7f,  0x00,  0xff,  0x00,
00333                 0xfb,  0x00,  0xf0,  0x01,  0xf0,  0x01,  0x60,  0x00,
00334         };
00335 
00336         static BCursor NWArrowCursor = {
00337             /*small*/
00338             nw_sbm, nw_smsk,
00339                 16, 16, 
00340                 6,  7,
00341                 /*big*/
00342                 NULL, NULL,
00343                 32,32, 
00344                 15, 15,
00345                 /*color*/
00346                 BC_BLACK, BC_WHITE
00347         };
00348 
00349         BlenderCursor[BC_NW_ARROWCURSOR]=&NWArrowCursor;
00350 END_CURSOR_BLOCK
00351 
00353 BEGIN_CURSOR_BLOCK
00354         static char ns_sbm[]={
00355             0x40,  0x01,  0x20,  0x02,  0x10,  0x04,  0x08,  0x08,
00356                 0x04,  0x10,  0x3c,  0x1e,  0x20,  0x02,  0x20,  0x02,
00357                 0x20,  0x02,  0x20,  0x02,  0x3c,  0x1e,  0x04,  0x10,
00358                 0x08,  0x08,  0x10,  0x04,  0x20,  0x02,  0x40,  0x01
00359         };
00360 
00361         static char ns_smsk[]={
00362             0xc0,  0x01,  0xe0,  0x03,  0xf0,  0x07,  0xf8,  0x0f,
00363                 0xfc,  0x1f,  0xfc,  0x1f,  0xe0,  0x03,  0xe0,  0x03,
00364                 0xe0,  0x03,  0xe0,  0x03,  0xfc,  0x1f,  0xfc,  0x1f,
00365                 0xf8,  0x0f,  0xf0,  0x07,  0xe0,  0x03,  0xc0,  0x01
00366         };
00367 
00368         static BCursor NSArrowCursor = {
00369             /*small*/
00370             ns_sbm, ns_smsk,
00371                 16, 16, 
00372                 6,  7,
00373                 /*big*/
00374                 NULL, NULL,
00375                 32,32, 
00376                 15, 15,
00377                 /*color*/
00378                 BC_BLACK, BC_WHITE
00379         };
00380 
00381         BlenderCursor[BC_NS_ARROWCURSOR]=&NSArrowCursor;
00382         
00383 END_CURSOR_BLOCK
00384     /********************** EW_ARROW Cursor *************************/
00385 BEGIN_CURSOR_BLOCK
00386     static char ew_sbm[]={
00387         0x00,  0x00,  0x00,  0x00,  0x10,  0x08,  0x38,  0x1c,
00388         0x2c,  0x34,  0xe6,  0x67,  0x03,  0xc0,  0x01,  0x80,
00389         0x03,  0xc0,  0xe6,  0x67,  0x2c,  0x34,  0x38,  0x1c,
00390         0x10,  0x08,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00391     };
00392 
00393     static char ew_smsk[]={
00394         0x00,  0x00,  0x00,  0x00,  0x10,  0x08,  0x38,  0x1c,
00395         0x3c,  0x3c,  0xfe,  0x7f,  0xff,  0xff,  0xff,  0xff,
00396         0xff,  0xff,  0xfe,  0x7f,  0x3c,  0x3c,  0x38,  0x1c,
00397         0x10,  0x08,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00398     };
00399 
00400     static BCursor EWArrowCursor = {
00401         /*small*/
00402         ew_sbm, ew_smsk,
00403         16, 16, 
00404         7,  6,
00405         /*big*/
00406         NULL, NULL,
00407         32,32, 
00408         15, 15,
00409         /*color*/
00410         BC_BLACK, BC_WHITE
00411     };
00412 
00413     BlenderCursor[BC_EW_ARROWCURSOR]=&EWArrowCursor;
00414 END_CURSOR_BLOCK
00415 
00416     /********************** Wait Cursor *****************************/
00417 BEGIN_CURSOR_BLOCK
00418     static char wait_sbm[]={
00419         0xfe,  0x7f,  0x02,  0x40,  0x02,  0x40,  0x84,  0x21,
00420         0xc8,  0x13,  0xd0,  0x0b,  0xa0,  0x04,  0x20,  0x05,
00421         0xa0,  0x04,  0x10,  0x09,  0x88,  0x11,  0xc4,  0x23,
00422         0xe2,  0x47,  0xfa,  0x5f,  0x02,  0x40,  0xfe,  0x7f,
00423     };
00424 
00425     static char wait_smsk[]={
00426         0xfe,  0x7f,  0xfe,  0x7f,  0x06,  0x60,  0x8c,  0x31,
00427         0xd8,  0x1b,  0xf0,  0x0f,  0xe0,  0x06,  0x60,  0x07,
00428         0xe0,  0x06,  0x30,  0x0d,  0x98,  0x19,  0xcc,  0x33,
00429         0xe6,  0x67,  0xfe,  0x7f,  0xfe,  0x7f,  0xfe,  0x7f,
00430     };
00431 
00432     static char wait_lbm[]={
00433         0xfc,  0xff,  0xff,  0x3f,  0xfc,  0xff,  0xff,  0x3f,
00434         0x0c,  0x00,  0x00,  0x30,  0x0c,  0x00,  0x00,  0x30,
00435         0x0c,  0x00,  0x00,  0x30,  0x0c,  0x00,  0x00,  0x18,
00436         0x18,  0xc0,  0x03,  0x0c,  0x30,  0x20,  0x07,  0x06,
00437         0x60,  0xf0,  0x0f,  0x03,  0xc0,  0xd0,  0x8d,  0x01,
00438         0x80,  0x79,  0xcf,  0x00,  0x00,  0xf3,  0x67,  0x00,
00439         0x00,  0x66,  0x37,  0x00,  0x00,  0x8c,  0x33,  0x00,
00440         0x00,  0x0c,  0x32,  0x00,  0x00,  0xcc,  0x33,  0x00,
00441         0x00,  0x8c,  0x30,  0x00,  0x00,  0x46,  0x61,  0x00,
00442         0x00,  0x03,  0xc3,  0x00,  0x80,  0x01,  0x83,  0x01,
00443         0xc0,  0xc0,  0x03,  0x03,  0x60,  0xa0,  0x05,  0x06,
00444         0x30,  0xf0,  0x0f,  0x0c,  0x18,  0xf8,  0x1d,  0x18,
00445         0x0c,  0x5c,  0x3f,  0x30,  0x0c,  0xff,  0x5f,  0x30,
00446         0x0c,  0xf7,  0xfe,  0x31,  0xcc,  0xfb,  0x9f,  0x33,
00447         0x0c,  0x00,  0x00,  0x30,  0x0c,  0x00,  0x00,  0x30,
00448         0xfc,  0xff,  0xff,  0x3f,  0xfc,  0xff,  0xff,  0x3f,
00449     };
00450 
00451     static char wait_lmsk[]={
00452         0xfc,  0xff,  0xff,  0x3f,  0xfc,  0xff,  0xff,  0x3f,
00453         0xfc,  0xff,  0xff,  0x3f,  0xfc,  0xff,  0xff,  0x3f,
00454         0x3c,  0x00,  0x00,  0x3c,  0x3c,  0x00,  0x00,  0x1e,
00455         0x78,  0xc0,  0x03,  0x0f,  0xf0,  0xa0,  0x87,  0x07,
00456         0xe0,  0xf1,  0xcf,  0x03,  0xc0,  0xf3,  0xef,  0x01,
00457         0x80,  0xff,  0xff,  0x00,  0x00,  0xff,  0x7f,  0x00,
00458         0x00,  0xfe,  0x3f,  0x00,  0x00,  0xfc,  0x3f,  0x00,
00459         0x00,  0x3c,  0x3f,  0x00,  0x00,  0xfc,  0x3f,  0x00,
00460         0x00,  0xbc,  0x3c,  0x00,  0x00,  0xde,  0x79,  0x00,
00461         0x00,  0x0f,  0xf3,  0x00,  0x80,  0x07,  0xe3,  0x01,
00462         0xc0,  0xc3,  0xc3,  0x03,  0xe0,  0xe1,  0x87,  0x07,
00463         0xf0,  0xf0,  0x0f,  0x0f,  0x78,  0xf8,  0x1f,  0x1e,
00464         0x3c,  0x7c,  0x3f,  0x3c,  0x3c,  0xff,  0x7f,  0x3c,
00465         0xbc,  0xff,  0xff,  0x3d,  0xfc,  0xfb,  0xbf,  0x3f,
00466         0xfc,  0xff,  0xff,  0x3f,  0xfc,  0xff,  0xff,  0x3f,
00467         0xfc,  0xff,  0xff,  0x3f,  0xfc,  0xff,  0xff,  0x3f,
00468     };
00469 
00470     static BCursor WaitCursor = {
00471         /*small*/
00472     wait_sbm, wait_smsk,
00473         16, 16, 
00474         7,  7,
00475         /*big*/
00476         wait_lbm, wait_lmsk,
00477         32,32, 
00478         15, 15,
00479         /*color*/
00480         BC_BLACK, BC_WHITE
00481     };
00482 
00483     BlenderCursor[BC_WAITCURSOR]=&WaitCursor;
00484 END_CURSOR_BLOCK
00485 
00486     /********************** Cross Cursor ***************************/
00487 BEGIN_CURSOR_BLOCK
00488     static char cross_sbm[]={
00489         0x00,  0x00,  0x80,  0x01,  0x80,  0x01,  0x80,  0x01,
00490         0x80,  0x01,  0x80,  0x01,  0x80,  0x01,  0x7e,  0x7e,
00491         0x7e,  0x7e,  0x80,  0x01,  0x80,  0x01,  0x80,  0x01,
00492         0x80,  0x01,  0x80,  0x01,  0x80,  0x01,  0x00,  0x00,
00493     };
00494 
00495     static char cross_smsk[]={
00496         0x80,  0x01,  0x80,  0x01,  0x80,  0x01,  0x80,  0x01,
00497         0x80,  0x01,  0x80,  0x01,  0xc0,  0x03,  0x7f,  0xfe,
00498         0x7f,  0xfe,  0xc0,  0x03,  0x80,  0x01,  0x80,  0x01,
00499         0x80,  0x01,  0x80,  0x01,  0x80,  0x01,  0x80,  0x01,
00500     };
00501     static char cross_lbm[]={
00502         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00503         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00504         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00505         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00506         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00507         0x00,  0x80,  0x01,  0x00,  0x00,  0xc0,  0x03,  0x00,
00508         0x00,  0xc0,  0x03,  0x00,  0x00,  0x40,  0x02,  0x00,
00509         0x00,  0x78,  0x1e,  0x00,  0xfc,  0x1f,  0xf8,  0x3f,
00510         0xfc,  0x1f,  0xf8,  0x3f,  0x00,  0x78,  0x1e,  0x00,
00511         0x00,  0x40,  0x02,  0x00,  0x00,  0xc0,  0x03,  0x00,
00512         0x00,  0xc0,  0x03,  0x00,  0x00,  0x80,  0x01,  0x00,
00513         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00514         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00515         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00516         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00517         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00518     };
00519 
00520     static char cross_lmsk[]={
00521         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00522         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00523         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00524         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00525         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00526         0x00,  0x80,  0x01,  0x00,  0x00,  0xc0,  0x03,  0x00,
00527         0x00,  0xe0,  0x07,  0x00,  0x00,  0x70,  0x0e,  0x00,
00528         0x00,  0x78,  0x1e,  0x00,  0xff,  0x1f,  0xf8,  0xff,
00529         0xff,  0x1f,  0xf8,  0xff,  0x00,  0x78,  0x1e,  0x00,
00530         0x00,  0x70,  0x0e,  0x00,  0x00,  0xe0,  0x07,  0x00,
00531         0x00,  0xc0,  0x03,  0x00,  0x00,  0x80,  0x01,  0x00,
00532         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00533         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00534         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00535         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00536         0x00,  0x80,  0x01,  0x00,  0x00,  0x80,  0x01,  0x00,
00537     };
00538 
00539     static BCursor CrossCursor = {
00540         /*small*/
00541         cross_sbm, cross_smsk,
00542         16, 16, 
00543         7,  7,
00544         /*big*/
00545         cross_lbm, cross_lmsk,
00546         32,32, 
00547         15, 15,
00548         /*color*/
00549         BC_BLACK, BC_WHITE
00550     };
00551 
00552     BlenderCursor[BC_CROSSCURSOR]=&CrossCursor;
00553 END_CURSOR_BLOCK
00554 
00555     /********************** EditCross Cursor ***********************/   
00556 BEGIN_CURSOR_BLOCK
00557     static char editcross_sbm[]={
00558         0x0e,  0x00,  0x11,  0x00,  0x1d,  0x00,  0x19,  0x03,
00559         0x1d,  0x03,  0x11,  0x03,  0x0e,  0x03,  0x00,  0x03,
00560         0xf8,  0x7c,  0xf8,  0x7c,  0x00,  0x03,  0x00,  0x03,
00561         0x00,  0x03,  0x00,  0x03,  0x00,  0x03,  0x00,  0x00,
00562     };
00563 
00564     static char editcross_smsk[]={
00565         0x0e,  0x00,  0x1f,  0x00,  0x1f,  0x03,  0x1f,  0x03,
00566         0x1f,  0x03,  0x1f,  0x03,  0x0e,  0x03,  0x80,  0x07,
00567         0xfc,  0xfc,  0xfc,  0xfc,  0x80,  0x07,  0x00,  0x03,
00568         0x00,  0x03,  0x00,  0x03,  0x00,  0x03,  0x00,  0x03,
00569     };
00570 
00571     static BCursor EditCrossCursor = {
00572         /*small*/
00573         editcross_sbm, editcross_smsk,
00574         16, 16, 
00575         9,  8,
00576         /*big*/
00577         NULL, NULL,
00578         32,32, 
00579         15, 15,
00580         /*color*/
00581         BC_BLACK, BC_WHITE
00582     };
00583 
00584     BlenderCursor[BC_EDITCROSSCURSOR]=&EditCrossCursor;
00585 END_CURSOR_BLOCK
00586 
00587     /********************** Box Select *************************/
00588 BEGIN_CURSOR_BLOCK
00589     static char box_sbm[32]={
00590     0x7f,  0x00,  0x41,  0x00,  0x41,  0x00,  0x41,  0x06,
00591         0x41,  0x06,  0x41,  0x06,  0x7f,  0x06,  0x00,  0x06,
00592         0xe0,  0x79,  0xe0,  0x79,  0x00,  0x06,  0x00,  0x06,
00593         0x00,  0x06,  0x00,  0x06,  0x00,  0x06,  0x00,  0x00,
00594     };
00595 
00596     static char box_smsk[32]={
00597     0x7f,  0x00,  0x7f,  0x00,  0x63,  0x06,  0x63,  0x06,
00598         0x63,  0x06,  0x7f,  0x06,  0x7f,  0x06,  0x00,  0x0f,
00599         0xf0,  0xf9,  0xf0,  0xf9,  0x00,  0x0f,  0x00,  0x06,
00600         0x00,  0x06,  0x00,  0x06,  0x00,  0x06,  0x00,  0x06,
00601 
00602     };
00603 
00604     static BCursor BoxSelCursor = {
00605         /*small*/
00606         box_sbm, box_smsk,
00607         16, 16, 
00608         9,  8,
00609         /*big*/
00610         NULL, NULL,
00611         32,32, 
00612         15, 15,
00613         /*color*/
00614         BC_BLACK, BC_WHITE
00615     };
00616 
00617     BlenderCursor[BC_BOXSELCURSOR]=&BoxSelCursor;
00618 
00619 END_CURSOR_BLOCK
00620     /********************** Knife Cursor ***********************/
00621 BEGIN_CURSOR_BLOCK
00622     static char knife_sbm[]={
00623         0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x2c,
00624         0x00, 0x5a, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x17,
00625         0x80, 0x06, 0x40, 0x03, 0xa0, 0x03, 0xd0, 0x01,
00626         0x68, 0x00, 0x1c, 0x00, 0x06, 0x00, 0x00, 0x00
00627     };
00628 
00629     static char knife_smsk[]={
00630         0x00, 0x60, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0xfe,
00631         0x00, 0xfe, 0x00, 0x7e, 0x00, 0x7f, 0x80, 0x3f,
00632         0xc0, 0x0e, 0x60, 0x07, 0xb0, 0x07, 0xd8, 0x03,
00633         0xec, 0x01, 0x7e, 0x00, 0x1f, 0x00, 0x07, 0x00
00634     };
00635 
00636     static char knife_lbm[]={
00637         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00638         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00639         0x00,  0x00,  0x00,  0x08,  0x00,  0x00,  0x00,  0x1c,
00640         0x00,  0x00,  0x00,  0x3e,  0x00,  0x00,  0x00,  0x7f,
00641         0x00,  0x00,  0x80,  0xbf,  0x00,  0x00,  0xc0,  0x5f,
00642         0x00,  0x00,  0xc0,  0x6f,  0x00,  0x00,  0xc0,  0x37,
00643         0x00,  0x00,  0xa8,  0x1b,  0x00,  0x00,  0x54,  0x0d,
00644         0x00,  0x00,  0xa8,  0x00,  0x00,  0x00,  0x54,  0x00,
00645         0x00,  0x00,  0xa8,  0x00,  0x00,  0x00,  0x53,  0x00,
00646         0x00,  0xc0,  0x07,  0x00,  0x00,  0xe0,  0x0f,  0x00,
00647         0x00,  0xd0,  0x0f,  0x00,  0x00,  0xe8,  0x07,  0x00,
00648         0x00,  0xf4,  0x07,  0x00,  0x00,  0xfa,  0x00,  0x00,
00649         0x00,  0x3d,  0x00,  0x00,  0x80,  0x0e,  0x00,  0x00,
00650         0xc0,  0x03,  0x00,  0x00,  0xe0,  0x00,  0x00,  0x00,
00651         0x30,  0x00,  0x00,  0x00,  0x08,  0x00,  0x00,  0x00,
00652         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00653 
00654     };
00655 
00656     static char knife_lmsk[]={
00657         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00658         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x18,
00659         0x00,  0x00,  0x00,  0x3c,  0x00,  0x00,  0x00,  0x7e,
00660         0x00,  0x00,  0x00,  0xff,  0x00,  0x00,  0x80,  0xff,
00661         0x00,  0x00,  0xc0,  0xbf,  0x00,  0x00,  0xe0,  0xdf,
00662         0x00,  0x00,  0xe0,  0xef,  0x00,  0x00,  0xf8,  0x77,
00663         0x00,  0x00,  0xfc,  0x3b,  0x00,  0x00,  0xfe,  0x1d,
00664         0x00,  0x00,  0xfe,  0x0f,  0x00,  0x00,  0xfe,  0x01,
00665         0x00,  0x00,  0xff,  0x01,  0x00,  0xc0,  0xff,  0x00,
00666         0x00,  0xe0,  0x7f,  0x00,  0x00,  0xf0,  0x1f,  0x00,
00667         0x00,  0xd8,  0x1f,  0x00,  0x00,  0xec,  0x0f,  0x00,
00668         0x00,  0xf6,  0x0f,  0x00,  0x00,  0xfb,  0x06,  0x00,
00669         0x80,  0xbd,  0x01,  0x00,  0xc0,  0x6e,  0x00,  0x00,
00670         0xe0,  0x1b,  0x00,  0x00,  0xf0,  0x06,  0x00,  0x00,
00671         0xb8,  0x01,  0x00,  0x00,  0x6c,  0x00,  0x00,  0x00,
00672         0x1c,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00673 
00674     };
00675 
00676     static BCursor KnifeCursor = {
00677         /*small*/
00678     knife_sbm, knife_smsk,
00679         16, 16, 
00680         0,  15,
00681         /*big*/
00682         knife_lbm, knife_lmsk,
00683         32,32, 
00684         0, 31,
00685         /*color*/
00686         BC_BLACK, BC_WHITE
00687     };
00688 
00689     BlenderCursor[BC_KNIFECURSOR]=&KnifeCursor;
00690 
00691 END_CURSOR_BLOCK
00692     
00693     /********************** Loop Select Cursor ***********************/
00694 BEGIN_CURSOR_BLOCK
00695 
00696 static char vloop_sbm[]={
00697         0x00,  0x00,  0x7e,  0x00,  0x3e,  0x00,  0x1e,  0x00,
00698         0x0e,  0x00,  0x66,  0x60,  0x62,  0x6f,  0x00,  0x00,
00699         0x20,  0x20,  0x20,  0x20,  0x20,  0x20,  0x20,  0x20,
00700         0x00,  0x00,  0x60,  0x60,  0x60,  0x6f,  0x00,  0x00,
00701 };
00702 
00703 static char vloop_smsk[]={
00704         0xff,  0x01,  0xff,  0x00,  0x7f,  0x00,  0x3f,  0x00,
00705         0xff,  0xf0,  0xff,  0xff,  0xf7,  0xff,  0xf3,  0xf0,
00706         0x61,  0x60,  0x60,  0x60,  0x60,  0x60,  0x60,  0x60,
00707         0xf0,  0xf0,  0xf0,  0xff,  0xf0,  0xff,  0xf0,  0xf0,
00708 };
00709 
00710 
00711 
00712 static char vloop_lbm[]={
00713         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00714         0xfc,  0x3f,  0x00,  0x00,  0xfc,  0x3f,  0x00,  0x00,
00715         0xfc,  0x0f,  0x00,  0x00,  0xfc,  0x0f,  0x00,  0x00,
00716         0xfc,  0x03,  0x00,  0x00,  0xfc,  0x03,  0x00,  0x00,
00717         0xfc,  0x00,  0x00,  0x00,  0xfc,  0x00,  0x00,  0x00,
00718         0x3c,  0x3c,  0x00,  0x3c,  0x3c,  0x3c,  0x00,  0x3c,
00719         0x0c,  0x3c,  0xff,  0x3c,  0x0c,  0x3c,  0xff,  0x3c,
00720         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00721         0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,
00722         0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,
00723         0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,
00724         0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,  0x00,  0x0c,
00725         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00726         0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,
00727         0x00,  0x3c,  0xff,  0x3c,  0x00,  0x3c,  0xff,  0x3c,
00728         0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00729 };
00730 
00731 static char vloop_lmsk[]={
00732         0xff,  0xff,  0x03,  0x00,  0xff,  0xff,  0x03,  0x00,
00733         0xff,  0xff,  0x00,  0x00,  0xff,  0xff,  0x00,  0x00,
00734         0xff,  0x3f,  0x00,  0x00,  0xff,  0x3f,  0x00,  0x00,
00735         0xff,  0x0f,  0x00,  0x00,  0xff,  0x0f,  0x00,  0x00,
00736         0xff,  0xff,  0x00,  0xff,  0xff,  0xff,  0x00,  0xff,
00737         0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,  0xff,
00738         0x3f,  0xff,  0xff,  0xff,  0x3f,  0xff,  0xff,  0xff,
00739         0x0f,  0xff,  0x00,  0xff,  0x0f,  0xff,  0x00,  0xff,
00740         0x03,  0x3c,  0x00,  0x3c,  0x03,  0x3c,  0x00,  0x3c,
00741         0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,
00742         0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,
00743         0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,  0x00,  0x3c,
00744         0x00,  0xff,  0x00,  0xff,  0x00,  0xff,  0x00,  0xff,
00745         0x00,  0xff,  0xff,  0xff,  0x00,  0xff,  0xff,  0xff,
00746         0x00,  0xff,  0xff,  0xff,  0x00,  0xff,  0xff,  0xff,
00747         0x00,  0xff,  0x00,  0xff,  0x00,  0xff,  0x00,  0xff,
00748 };
00749 
00750 
00751 
00752     static BCursor VLoopCursor = {
00753         /*small*/
00754     vloop_sbm, vloop_smsk,
00755         16, 16, 
00756         0,  0,
00757         /*big*/
00758         vloop_lbm, vloop_lmsk,
00759         32,32, 
00760         0, 0,
00761         /*color*/
00762         BC_BLACK, BC_WHITE
00763     };
00764 
00765     BlenderCursor[BC_VLOOPCURSOR]=&VLoopCursor;
00766 
00767 END_CURSOR_BLOCK    
00768     
00769 
00770     /********************** TextEdit Cursor ***********************/    
00771 BEGIN_CURSOR_BLOCK
00772     static char textedit_sbm[]={
00773         0xe0,  0x03,  0x10,  0x04,  0x60,  0x03,  0x40,  0x01,
00774         0x40,  0x01,  0x40,  0x01,  0x40,  0x01,  0x40,  0x01,
00775         0x40,  0x01,  0x40,  0x01,  0x40,  0x01,  0x40,  0x01,
00776         0x40,  0x01,  0x60,  0x03,  0x10,  0x04,  0xe0,  0x03,
00777     };
00778 
00779     static char textedit_smsk[]={
00780         0xe0,  0x03,  0xf0,  0x07,  0xe0,  0x03,  0xc0,  0x01,
00781         0xc0,  0x01,  0xc0,  0x01,  0xc0,  0x01,  0xc0,  0x01,
00782         0xc0,  0x01,  0xc0,  0x01,  0xc0,  0x01,  0xc0,  0x01,
00783         0xc0,  0x01,  0xe0,  0x03,  0xf0,  0x07,  0xe0,  0x03,
00784     };
00785 
00786     static BCursor TextEditCursor = {
00787         /*small*/
00788         textedit_sbm, textedit_smsk,
00789         16, 16, 
00790         9,  8,
00791         /*big*/
00792         NULL, NULL,
00793         32,32, 
00794         15, 15,
00795         /*color*/
00796         BC_BLACK, BC_WHITE
00797     };
00798 
00799     BlenderCursor[BC_TEXTEDITCURSOR]=&TextEditCursor;
00800 END_CURSOR_BLOCK
00801 
00802 
00803     /********************** Paintbrush Cursor ***********************/  
00804 BEGIN_CURSOR_BLOCK
00805     static char paintbrush_sbm[]={
00806 
00807         0x00,  0xe0,  0x00,  0x98,  0x00,  0x44,  0x00,  0x42,
00808         0x00,  0x21,  0x80,  0x20,  0x40,  0x13,  0x40,  0x17,
00809         0xa0,  0x0b,  0x98,  0x05,  0x04,  0x02,  0x02,  0x01,
00810         0x02,  0x01,  0x02,  0x01,  0x81,  0x00,  0x7f,  0x00,
00811 
00812 
00813 
00814     };
00815 
00816     static char paintbrush_smsk[]={
00817         0x00,  0xe0,  0x00,  0xf8,  0x00,  0x7c,  0x00,  0x7e,
00818         0x00,  0x3f,  0x80,  0x3f,  0xc0,  0x1f,  0xc0,  0x1f,
00819         0xe0,  0x0f,  0xf8,  0x07,  0xfc,  0x03,  0xfe,  0x01,
00820         0xfe,  0x01,  0xfe,  0x01,  0xff,  0x00,  0x7f,  0x00,
00821 
00822 
00823     };
00824 
00825     static BCursor PaintBrushCursor = {
00826         /*small*/
00827         paintbrush_sbm, paintbrush_smsk,
00828         16, 16, 
00829         0,  15,
00830         /*big*/
00831         NULL, NULL,
00832         32,32, 
00833         15, 15,
00834         /*color*/
00835         BC_BLACK, BC_WHITE
00836     };
00837 
00838     BlenderCursor[BC_PAINTBRUSHCURSOR]=&PaintBrushCursor;
00839 END_CURSOR_BLOCK
00840 
00841 
00842 /********************** Hand Cursor ***********************/
00843 BEGIN_CURSOR_BLOCK
00844 
00845 static char hand_sbm[]={ 
00846     0x00,  0x00,  0x00,  0x00,  0x80,  0x01,  0x80,  0x0d,  
00847     0x98,  0x6d,  0x98,  0x6d,  0xb0,  0x6d,  0xb0,  0x6d,  
00848     0xe0,  0x6f,  0xe6,  0x7f,  0xee,  0x7f,  0xfc,  0x3f,  
00849     0xf8,  0x3f,  0xf0,  0x1f,  0xc0,  0x1f,  0xc0,  0x1f,  
00850 };
00851 
00852 static char hand_smsk[]={ 
00853     0x00,  0x00,  0x80,  0x01,  0xc0,  0x0f,  0xd8,  0x7f,  
00854     0xfc,  0xff,  0xfc,  0xff,  0xf8,  0xff,  0xf8,  0xff,  
00855     0xf6,  0xff,  0xff,  0xff,  0xff,  0xff,  0xfe,  0x7f,  
00856     0xfc,  0x7f,  0xf8,  0x3f,  0xf0,  0x3f,  0xe0,  0x3f,  
00857 };
00858 
00859 
00860 static BCursor HandCursor = {
00861     /*small*/
00862     hand_sbm, hand_smsk,
00863     16, 16, 
00864     8,  8,
00865     /*big*/
00866     NULL, NULL,
00867     32,32, 
00868     15, 15,
00869     /*color*/
00870     BC_BLACK, BC_WHITE
00871 };
00872 
00873 BlenderCursor[BC_HANDCURSOR]=&HandCursor;
00874 
00875 END_CURSOR_BLOCK
00876 
00877 /********************** NSEW Scroll Cursor ***********************/
00878 BEGIN_CURSOR_BLOCK
00879 
00880 static char nsewscroll_sbm[]={ 
00881     0x00,  0x00,  0x80,  0x01,  0xc0,  0x03,  0xc0,  0x03,  
00882     0x00,  0x00,  0x00,  0x00,  0x0c,  0x30,  0x0e,  0x70,  
00883     0x0e,  0x70,  0x0c,  0x30,  0x00,  0x00,  0x00,  0x00,  
00884     0xc0,  0x03,  0xc0,  0x03,  0x80,  0x01,  0x00,  0x00, 
00885 };
00886 
00887 static char nsewscroll_smsk[]={ 
00888     0x80,  0x01,  0xc0,  0x03,  0xe0,  0x07,  0xe0,  0x07,  
00889     0xc0,  0x03,  0x0c,  0x30,  0x1e,  0x78,  0x1f,  0xf8,  
00890     0x1f,  0xf8,  0x1e,  0x78,  0x0c,  0x30,  0xc0,  0x03,  
00891     0xe0,  0x07,  0xe0,  0x07,  0xc0,  0x03,  0x80,  0x01, 
00892 };
00893 
00894 
00895 static BCursor NSEWScrollCursor = {
00896     /*small*/
00897     nsewscroll_sbm, nsewscroll_smsk,
00898     16, 16, 
00899     8, 8,
00900     /*big*/
00901     NULL, NULL,
00902     32,32, 
00903     15, 15,
00904     /*color*/
00905     BC_BLACK, BC_WHITE
00906 };
00907 
00908 BlenderCursor[BC_NSEW_SCROLLCURSOR]=&NSEWScrollCursor;
00909 
00910 END_CURSOR_BLOCK
00911 
00912 
00913 /********************** NS Scroll Cursor ***********************/
00914 BEGIN_CURSOR_BLOCK
00915 
00916 static char nsscroll_sbm[]={ 
00917     0x00,  0x00,  0x80,  0x01,  0xc0,  0x03,  0xc0,  0x03,  
00918     0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  
00919     0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  
00920     0xc0,  0x03,  0xc0,  0x03,  0x80,  0x01,  0x00,  0x00,
00921 };
00922 
00923 static char nsscroll_smsk[]={ 
00924     0x80,  0x01,  0xc0,  0x03,  0xe0,  0x07,  0xe0,  0x07,  
00925     0xc0,  0x03,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  
00926     0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0xc0,  0x03,  
00927     0xe0,  0x07,  0xe0,  0x07,  0xc0,  0x03,  0x80,  0x01,
00928 };
00929 
00930 
00931 static BCursor NSScrollCursor = {
00932     /*small*/
00933     nsscroll_sbm, nsscroll_smsk,
00934     16, 16, 
00935     8, 8,
00936     /*big*/
00937     NULL, NULL,
00938     32,32, 
00939     15, 15,
00940     /*color*/
00941     BC_BLACK, BC_WHITE
00942 };
00943 
00944 BlenderCursor[BC_NS_SCROLLCURSOR]=&NSScrollCursor;
00945 
00946 END_CURSOR_BLOCK
00947 
00948 
00949 /********************** EW Scroll Cursor ***********************/
00950 BEGIN_CURSOR_BLOCK
00951 
00952 static char ewscroll_sbm[]={ 
00953     0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  
00954     0x00,  0x00,  0x00,  0x00,  0x0c,  0x30,  0x0e,  0x70,  
00955     0x0e,  0x70,  0x0c,  0x30,  0x00,  0x00,  0x00,  0x00,  
00956     0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00957 };
00958 
00959 static char ewscroll_smsk[]={ 
00960     0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  
00961     0x00,  0x00,  0x0c,  0x30,  0x1e,  0x78,  0x1f,  0xf8,  
00962     0x1f,  0xf8,  0x1e,  0x78,  0x0c,  0x30,  0x00,  0x00,  
00963     0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
00964 };
00965 
00966 
00967 static BCursor EWScrollCursor = {
00968     /*small*/
00969     ewscroll_sbm, ewscroll_smsk,
00970     16, 16, 
00971     8, 8,
00972     /*big*/
00973     NULL, NULL,
00974     32,32, 
00975     15, 15,
00976     /*color*/
00977     BC_BLACK, BC_WHITE
00978 };
00979 
00980 BlenderCursor[BC_EW_SCROLLCURSOR]=&EWScrollCursor;
00981 
00982 END_CURSOR_BLOCK
00983 
00984 /********************** Eyedropper Cursor ***********************/
00985 BEGIN_CURSOR_BLOCK
00986 
00987 static char eyedropper_sbm[]={ 
00988     0x00,  0x30,  0x00,  0x48,  0x00,  0x85,  0x80,  0x82,  
00989     0x40,  0x40,  0x80,  0x20,  0x40,  0x11,  0xa0,  0x23,  
00990     0xd0,  0x15,  0xe8,  0x0a,  0x74,  0x01,  0xb4,  0x00,  
00991     0x4a,  0x00,  0x35,  0x00,  0x08,  0x00,  0x04,  0x00,
00992 };
00993 
00994 static char eyedropper_smsk[]={ 
00995     0x00,  0x30,  0x00,  0x78,  0x00,  0xfd,  0x80,  0xff,  
00996     0xc0,  0x7f,  0x80,  0x3f,  0xc0,  0x1f,  0xe0,  0x3f,  
00997     0xf0,  0x1f,  0xf8,  0x0b,  0xfc,  0x01,  0xfc,  0x00,  
00998     0x7e,  0x00,  0x3f,  0x00,  0x0c,  0x00,  0x04,  0x00, 
00999 };
01000 
01001 
01002 static BCursor EyedropperCursor = {
01003     /*small*/
01004     eyedropper_sbm, eyedropper_smsk,
01005     16, 16, 
01006     1, 15,
01007     /*big*/
01008     NULL, NULL,
01009     32,32, 
01010     15, 15,
01011     /*color*/
01012     BC_BLACK, BC_WHITE
01013 };
01014 
01015 BlenderCursor[BC_EYEDROPPER_CURSOR]=&EyedropperCursor;
01016 
01017 END_CURSOR_BLOCK
01018 
01019 /********************** Swap Area Cursor ***********************/
01020 BEGIN_CURSOR_BLOCK
01021 static char swap_sbm[]={
01022     0xc0,  0xff,  0x40,  0x80,  0x40,  0x80,  0x40,  0x9c,
01023     0x40,  0x98,  0x40,  0x94,  0x00,  0x82,  0xfe,  0x80,
01024     0x7e,  0xfd,  0xbe,  0x01,  0xda,  0x01,  0xe2,  0x01,
01025     0xe2,  0x01,  0xc2,  0x01,  0xfe,  0x01,  0x00,  0x00,
01026 };
01027 
01028 static char swap_smsk[]={
01029     0xc0,  0xff,  0xc0,  0xff,  0xc0,  0xff,  0xc0,  0xff,
01030     0xc0,  0xff,  0xc0,  0xff,  0xff,  0xff,  0xff,  0xff,
01031     0xff,  0xff,  0xff,  0x03,  0xff,  0x03,  0xff,  0x03,
01032     0xff,  0x03,  0xff,  0x03,  0xff,  0x03,  0xff,  0x03,
01033 };
01034 
01035 static BCursor SwapCursor = {
01036     /*small*/
01037     swap_sbm, swap_smsk,
01038     16, 16, 
01039     8,  8,
01040     /*big*/
01041     NULL, NULL,
01042     32,32, 
01043     15, 15,
01044     /*color*/
01045     BC_YELLOW, BC_BLUE
01046 };
01047 
01048 BlenderCursor[BC_SWAPAREA_CURSOR]=&SwapCursor;
01049 
01050 END_CURSOR_BLOCK
01051 /********************** Put the cursors in the array ***********************/
01052     
01053 
01054 
01055 }
01056 
01057 
01058