regxpcom fails due to app_server interaction

regxpcom and the other utility functions to not create a BApplication.  The beos widget component was creating some static BCursors that were invoked when trying to be loaded by regxpcom, which caused it to fail.  The cursors are now created dynamically.

r=cls
a=asa
This commit is contained in:
arougthopher%lizardland.net 2002-03-13 01:09:29 +00:00
Родитель 0897a30aaf
Коммит b172805113
2 изменённых файлов: 33 добавлений и 78 удалений

Просмотреть файл

@ -50,8 +50,6 @@ static unsigned char cursorHyperlink[] = {16,1,2,2,
0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
15,255,63,255,127,255,127,255,63,255,15,255,3,254,1,248
};
static const BCursor bCursorHyperlink(cursorHyperlink);
#define B_CURSOR_HYPERLINK &bCursorHyperlink
static unsigned char cursorHelp[] = {16,1,2,2,
0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
@ -59,8 +57,6 @@ static unsigned char cursorHelp[] = {16,1,2,2,
0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
15,255,63,255,127,255,127,255,63,255,15,255,3,254,1,248
};
static const BCursor bCursorHelp(cursorHelp);
#define B_CURSOR_HELP &bCursorHelp
static unsigned char cursorCrosshair[] = {16,1,8,8,
0,0,0,128,0,128,0,128,0,128,0,128,0,128,0,128,
@ -68,8 +64,6 @@ static unsigned char cursorCrosshair[] = {16,1,8,8,
0,0,0,128,0,128,0,128,0,128,0,128,0,128,0,128,
127,255,0,128,0,128,0,128,0,128,0,128,0,128,0,128
};
static const BCursor bCursorCross(cursorCrosshair);
#define B_CURSOR_CROSS &bCursorCross
static unsigned char cursorCopy[] = {16,1,2,2,
0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
@ -77,8 +71,6 @@ static unsigned char cursorCopy[] = {16,1,2,2,
0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
15,255,63,255,127,255,127,255,63,255,15,255,3,255,1,248
};
static const BCursor bCursorCopy(cursorCopy);
#define B_CURSOR_COPY &bCursorCopy
static unsigned char cursorAlias[] = {16,1,2,2,
0,0,0,0,56,0,36,0,36,0,19,224,18,92,9,42,
@ -86,8 +78,6 @@ static unsigned char cursorAlias[] = {16,1,2,2,
0,0,0,0,56,0,60,0,60,0,31,224,31,252,15,254,
15,255,63,255,127,255,127,255,63,255,15,255,3,255,1,248
};
static const BCursor bCursorAlias(cursorAlias);
#define B_CURSOR_ALIAS &bCursorAlias
static unsigned char cursorGrabbing[] = {16,1,8,2,
0,0,0,0,0,0,0,0,15,224,18,92,33,42,40,1,
@ -95,8 +85,6 @@ static unsigned char cursorGrabbing[] = {16,1,8,2,
0,0,0,0,0,0,0,0,15,224,31,252,63,254,63,255,
63,255,31,255,31,255,15,255,7,255,3,255,1,254,0,248
};
static const BCursor bCursorGrabbing(cursorGrabbing);
#define B_CURSOR_GRABBING &bCursorGrabbing
static unsigned char cursorGrab[] = {16,1,2,2,
0,0,0,0,59,64,36,168,36,148,18,74,18,74,9,37,
@ -104,8 +92,6 @@ static unsigned char cursorGrab[] = {16,1,2,2,
0,0,0,0,59,64,63,232,63,252,31,254,31,254,15,255,
15,255,63,255,127,255,127,255,63,255,15,255,3,254,1,248
};
static const BCursor bCursorGrab(cursorGrab);
#define B_CURSOR_GRAB &bCursorGrab
static unsigned char cursorLowerRight[] = {16,1,13,13,
0,0,0,0,0,0,0,0,0,0,4,6,2,38,1,38,
@ -113,8 +99,6 @@ static unsigned char cursorLowerRight[] = {16,1,13,13,
0,0,0,0,0,0,0,0,4,15,14,127,7,127,3,255,
1,255,7,255,7,255,7,255,15,255,15,255,15,255,15,255
};
static const BCursor bCursorSouthEast(cursorLowerRight);
#define B_CURSOR_SOUTHEAST &bCursorSouthEast
static unsigned char cursorLowerLeft[] = {16,1,13,2,
0,0,0,0,0,0,0,0,0,0,96,32,100,64,100,128,
@ -122,8 +106,6 @@ static unsigned char cursorLowerLeft[] = {16,1,13,2,
0,0,0,0,0,0,0,0,240,32,254,112,254,224,255,192,
255,128,255,224,255,224,255,224,255,240,255,240,255,240,255,240
};
static const BCursor bCursorSouthWest(cursorLowerLeft);
#define B_CURSOR_SOUTHWEST &bCursorSouthWest
static unsigned char cursorUpperLeft[] = {16,1,2,2,
0,0,127,224,127,224,96,0,96,0,103,192,102,0,101,0,
@ -131,8 +113,6 @@ static unsigned char cursorUpperLeft[] = {16,1,2,2,
255,240,255,240,255,240,255,240,255,224,255,224,255,224,255,128,
255,192,254,224,254,112,240,32,0,0,0,0,0,0,0,0
};
static const BCursor bCursorNorthWest(cursorUpperLeft);
#define B_CURSOR_NORTHWEST &bCursorNorthWest
static unsigned char cursorUpperRight[] = {16,1,2,13,
0,0,7,254,7,254,0,6,0,6,3,230,0,102,0,166,
@ -140,8 +120,6 @@ static unsigned char cursorUpperRight[] = {16,1,2,13,
15,255,15,255,15,255,15,255,7,255,7,255,7,255,1,255,
3,255,7,127,14,127,4,15,0,0,0,0,0,0,0,0
};
static const BCursor bCursorNorthEast(cursorUpperRight);
#define B_CURSOR_NORTHEAST &bCursorNorthEast
static unsigned char cursorRight[] = {16,1,6,13,
0,0,0,6,0,6,1,6,0,134,0,70,15,230,0,70,
@ -149,8 +127,6 @@ static unsigned char cursorRight[] = {16,1,6,13,
0,15,0,15,1,15,3,143,1,207,31,239,31,255,31,239,
1,207,3,143,1,15,0,15,0,15,0,0,0,0,0,0
};
static const BCursor bCursorEast(cursorRight);
#define B_CURSOR_EAST &bCursorEast
static unsigned char cursorLeft[] = {16,1,6,2,
0,0,96,0,96,0,96,128,97,0,98,0,103,224,98,0,
@ -158,8 +134,6 @@ static unsigned char cursorLeft[] = {16,1,6,2,
240,0,240,0,240,128,241,192,243,128,247,240,255,240,247,240,
243,128,241,192,240,128,240,0,240,0,0,0,0,0,0,0
};
static const BCursor bCursorWest(cursorLeft);
#define B_CURSOR_WEST &bCursorWest
static unsigned char cursorTop[] = {16,1,2,7,
0,0,63,248,63,248,0,0,0,0,1,0,3,128,5,64,
@ -167,8 +141,6 @@ static unsigned char cursorTop[] = {16,1,2,7,
127,252,127,252,127,252,127,252,1,0,3,128,7,192,15,224,
31,240,11,160,3,128,3,128,0,0,0,0,0,0,0,0
};
static const BCursor bCursorNorth(cursorTop);
#define B_CURSOR_NORTH &bCursorNorth
static unsigned char cursorBottom[] = {16,1,13,7,
0,0,0,0,0,0,0,0,0,0,1,0,1,0,9,32,
@ -176,8 +148,6 @@ static unsigned char cursorBottom[] = {16,1,13,7,
0,0,0,0,0,0,0,0,3,128,3,128,11,160,31,240,
15,224,7,192,3,128,1,0,127,252,127,252,127,252,127,252
};
static const BCursor bCursorSouth(cursorBottom);
#define B_CURSOR_SOUTH &bCursorSouth
static unsigned char cursorHorizontalDrag[] = {16,1,7,7,
1,128,1,128,1,128,1,128,1,128,17,136,49,140,125,190,
@ -185,8 +155,6 @@ static unsigned char cursorHorizontalDrag[] = {16,1,7,7,
3,192,3,192,3,192,3,192,27,216,59,220,127,254,255,255,
255,255,127,254,59,220,27,216,3,192,3,192,3,192,3,192
};
static const BCursor bCursorWestEast(cursorHorizontalDrag);
#define B_CURSOR_WESTEAST &bCursorWestEast
static unsigned char cursorVerticalDrag[] = {16,1,7,7,
0,0,1,128,3,192,7,224,1,128,1,128,0,0,255,255,
@ -194,16 +162,7 @@ static unsigned char cursorVerticalDrag[] = {16,1,7,7,
1,128,3,192,7,224,15,240,15,240,3,192,255,255,255,255,
255,255,255,255,3,192,15,240,15,240,7,224,3,192,1,128
};
static const BCursor bCursorNorthSouth(cursorVerticalDrag);
#define B_CURSOR_NORTHSOUTH &bCursorNorthSouth
static unsigned char cursorWatch1[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
152,2,132,2,96,58,24,86,4,146,2,146,1,130,0,197,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning1(cursorWatch1);
static unsigned char cursorWatch2[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
@ -211,8 +170,15 @@ static unsigned char cursorWatch2[] = {16,1,0,1,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning2(cursorWatch2);
#define B_CURSOR_SPINNING &bCursorSpinning2
#if 0
// keeping these in case we want to animate the spinner at some point
static unsigned char cursorWatch1[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
152,2,132,2,96,58,24,86,4,146,2,146,1,130,0,197,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static unsigned char cursorWatch3[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
@ -220,7 +186,6 @@ static unsigned char cursorWatch3[] = {16,1,0,1,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning3(cursorWatch3);
static unsigned char cursorWatch4[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
@ -228,7 +193,6 @@ static unsigned char cursorWatch4[] = {16,1,0,1,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning4(cursorWatch4);
static unsigned char cursorWatch5[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
@ -236,7 +200,6 @@ static unsigned char cursorWatch5[] = {16,1,0,1,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning5(cursorWatch5);
static unsigned char cursorWatch6[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
@ -244,7 +207,6 @@ static unsigned char cursorWatch6[] = {16,1,0,1,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning6(cursorWatch6);
static unsigned char cursorWatch7[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
@ -252,7 +214,6 @@ static unsigned char cursorWatch7[] = {16,1,0,1,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning7(cursorWatch7);
static unsigned char cursorWatch8[] = {16,1,0,1,
112,0,72,0,72,0,39,192,36,184,18,84,16,2,120,2,
@ -260,18 +221,7 @@ static unsigned char cursorWatch8[] = {16,1,0,1,
112,0,120,0,120,0,63,192,63,248,31,252,31,254,127,254,
255,254,255,254,127,254,31,254,7,254,3,254,1,254,0,255
};
static const BCursor bCursorSpinning8(cursorWatch8);
static const BCursor bCursorsSpinning[] = {
bCursorSpinning1,
bCursorSpinning2,
bCursorSpinning3,
bCursorSpinning4,
bCursorSpinning5,
bCursorSpinning6,
bCursorSpinning7,
bCursorSpinning8
};
#endif
#endif // nsBeOSCursors_h__

Просмотреть файл

@ -1324,96 +1324,100 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor)
// Only change cursor if it's changing
if (aCursor != mCursor) {
BCursor const *newCursor = B_CURSOR_SYSTEM_DEFAULT;
bool doDelete = true;
switch (aCursor) {
case eCursor_standard:
case eCursor_wait:
case eCursor_move:
newCursor = B_CURSOR_SYSTEM_DEFAULT;
doDelete = false;
break;
case eCursor_select:
newCursor = B_CURSOR_I_BEAM;
doDelete = false;
break;
case eCursor_hyperlink:
newCursor = B_CURSOR_HYPERLINK;
newCursor = new BCursor(cursorHyperlink);
break;
case eCursor_sizeWE:
newCursor = B_CURSOR_WESTEAST;
newCursor = new BCursor(cursorHorizontalDrag);
break;
case eCursor_sizeNS:
newCursor = B_CURSOR_NORTHSOUTH;
newCursor = new BCursor(cursorVerticalDrag);
break;
case eCursor_sizeNW:
newCursor = B_CURSOR_NORTHWEST;
newCursor = new BCursor(cursorUpperRight);
break;
case eCursor_sizeSE:
newCursor = B_CURSOR_SOUTHEAST;
newCursor = new BCursor(cursorLowerLeft);
break;
case eCursor_sizeNE:
newCursor = B_CURSOR_NORTHEAST;
newCursor = new BCursor(cursorUpperLeft);
break;
case eCursor_sizeSW:
newCursor = B_CURSOR_SOUTHWEST;
newCursor = new BCursor(cursorLowerRight);
break;
case eCursor_arrow_north:
case eCursor_arrow_north_plus:
newCursor = B_CURSOR_NORTH;
newCursor = new BCursor(cursorTop);
break;
case eCursor_arrow_south:
case eCursor_arrow_south_plus:
newCursor = B_CURSOR_SOUTH;
newCursor = new BCursor(cursorBottom);
break;
case eCursor_arrow_east:
case eCursor_arrow_east_plus:
newCursor = B_CURSOR_EAST;
newCursor = new BCursor(cursorLeft);
break;
case eCursor_arrow_west:
case eCursor_arrow_west_plus:
newCursor = B_CURSOR_WEST;
newCursor = new BCursor(cursorRight);
break;
case eCursor_crosshair:
newCursor = B_CURSOR_CROSS;
newCursor = new BCursor(cursorCrosshair);
break;
case eCursor_help:
newCursor = B_CURSOR_HELP;
newCursor = new BCursor(cursorHelp);
break;
case eCursor_grab:
newCursor = B_CURSOR_GRAB;
newCursor = new BCursor(cursorGrab);
break;
case eCursor_grabbing:
newCursor = B_CURSOR_GRABBING;
newCursor = new BCursor(cursorGrabbing);
break;
case eCursor_copy:
newCursor = B_CURSOR_COPY;
newCursor = new BCursor(cursorCopy);
break;
case eCursor_alias:
newCursor = B_CURSOR_ALIAS;
newCursor = new BCursor(cursorAlias);
break;
case eCursor_spinning:
newCursor = B_CURSOR_SPINNING;
newCursor = new BCursor(cursorWatch2);
break;
default:
NS_ASSERTION(0, "Invalid cursor type");
doDelete = false;
break;
}
@ -1422,6 +1426,7 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor)
mView->SetViewCursor(newCursor, true);
mView->UnlockLooper();
}
if (doDelete) delete newCursor;
}
return NS_OK;
}