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