/* -- INTERNAL FUNCTIONS --------------------------------------------------- */
+#if TARGET_HOST_UNIX_X11
/*
* A factory method for an empty cursor
*/
{ XC_bottom_right_corner, None }, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */
{ XC_bottom_left_corner, None } /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */
};
+#endif
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
switch( cursorID )
{
- MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW );
- MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW );
- MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP );
- MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS );
- MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP );
- MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL );
- MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS );
- MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT );
- MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_UPARROW );
- MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
- /* MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); */
- ZAP_CURSOR( GLUT_CURSOR_NONE, NULL );
+ MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW );
+ MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW );
+ MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP );
+ MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS );
+ MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP );
+ MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL );
+ MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS );
+ MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT );
+ MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_IBEAM );
+ MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
+ MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_SIZENS );
+ MAP_CURSOR( GLUT_CURSOR_LEFT_RIGHT, IDC_SIZEWE );
+ MAP_CURSOR( GLUT_CURSOR_TOP_SIDE, IDC_ARROW ); /* XXX ToDo */
+ MAP_CURSOR( GLUT_CURSOR_BOTTOM_SIDE, IDC_ARROW ); /* XXX ToDo */
+ MAP_CURSOR( GLUT_CURSOR_LEFT_SIDE, IDC_ARROW ); /* XXX ToDo */
+ MAP_CURSOR( GLUT_CURSOR_RIGHT_SIDE, IDC_ARROW ); /* XXX ToDo */
+ MAP_CURSOR( GLUT_CURSOR_TOP_LEFT_CORNER, IDC_SIZENWSE );
+ MAP_CURSOR( GLUT_CURSOR_TOP_RIGHT_CORNER, IDC_SIZENESW );
+ MAP_CURSOR( GLUT_CURSOR_BOTTOM_RIGHT_CORNER, IDC_SIZENWSE );
+ MAP_CURSOR( GLUT_CURSOR_BOTTOM_LEFT_CORNER, IDC_SIZENESW );
+ MAP_CURSOR( GLUT_CURSOR_INHERIT, IDC_ARROW ); /* XXX ToDo */
+ ZAP_CURSOR( GLUT_CURSOR_NONE, NULL );
+ MAP_CURSOR( GLUT_CURSOR_FULL_CROSSHAIR, IDC_CROSS ); /* XXX ToDo */
default:
- MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW );
+ fgError( "Unknown cursor type: %d", cursorID );
+ break;
}
#endif
case WM_ACTIVATE:
if (LOWORD(wParam) != WA_INACTIVE)
{
- /* glutSetCursor( fgStructure.Window->State.Cursor ); */
/* printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window,
window->State.Cursor ); */
glutSetCursor( window->State.Cursor );
* XXX and implementing a nested case in-line.
*/
case WM_SETCURSOR:
- /* Set the cursor AND change it for this window class. */
-#define MAP_CURSOR(a,b) \
- case a: \
- SetCursor( LoadCursor( NULL, b ) ); \
- break;
-
- /* Nuke the cursor AND change it for this window class. */
-#define ZAP_CURSOR(a,b) \
- case a: \
- SetCursor( NULL ); \
- break;
-
/* printf ( "Cursor event %x %x %x %x\n", window, window->State.Cursor, lParam, wParam ) ; */
if( LOWORD( lParam ) == HTCLIENT )
- switch( window->State.Cursor )
- {
- MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW );
- MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW );
- MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP );
- MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS );
- MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP );
- MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL );
- MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS );
- MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT );
- MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_UPARROW );
- MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
- /* MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); */
- ZAP_CURSOR( GLUT_CURSOR_NONE, NULL );
-
- default:
- MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW );
- }
+ glutSetCursor ( window->State.Cursor ) ;
else
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
break;