case eCursor_sizeNE:
case eCursor_ne_resize:
get_gtk_cursor(nsCursor aCursor){    GdkPixmap *cursor;    GdkPixmap *mask;    GdkColor fg, bg;    GdkCursor *gdkcursor = nsnull;    PRUint8 newType = 0xff;    if ((gdkcursor = gCursorCache[aCursor])) {        return gdkcursor;    }    switch (aCursor) {    case eCursor_standard:        gdkcursor = gdk_cursor_new(GDK_LEFT_PTR);        break;    case eCursor_wait:        gdkcursor = gdk_cursor_new(GDK_WATCH);        break;    case eCursor_select:        gdkcursor = gdk_cursor_new(GDK_XTERM);        break;    case eCursor_hyperlink:        gdkcursor = gdk_cursor_new(GDK_HAND2);        break;    case eCursor_sizeWE:        /* GDK_SB_H_DOUBLE_ARROW <==>.  The ideal choice is: =>||<= */        gdkcursor = gdk_cursor_new(GDK_SB_H_DOUBLE_ARROW);        break;    case eCursor_sizeNS:        /* Again, should be =>||<= rotated 90 degrees. */        gdkcursor = gdk_cursor_new(GDK_SB_V_DOUBLE_ARROW);        break;    case eCursor_sizeNW:        gdkcursor = gdk_cursor_new(GDK_TOP_LEFT_CORNER);        break;    case eCursor_sizeSE:        gdkcursor = gdk_cursor_new(GDK_BOTTOM_RIGHT_CORNER);        break;    case eCursor_sizeNE:        gdkcursor = gdk_cursor_new(GDK_TOP_RIGHT_CORNER);        break;    case eCursor_sizeSW:        gdkcursor = gdk_cursor_new(GDK_BOTTOM_LEFT_CORNER);        break;    case eCursor_arrow_north:    case eCursor_arrow_north_plus:        gdkcursor = gdk_cursor_new(GDK_TOP_SIDE);        break;    case eCursor_arrow_south:    case eCursor_arrow_south_plus:        gdkcursor = gdk_cursor_new(GDK_BOTTOM_SIDE);        break;    case eCursor_arrow_west:    case eCursor_arrow_west_plus:        gdkcursor = gdk_cursor_new(GDK_LEFT_SIDE);        break;    case eCursor_arrow_east:    case eCursor_arrow_east_plus:        gdkcursor = gdk_cursor_new(GDK_RIGHT_SIDE);        break;    case eCursor_crosshair:        gdkcursor = gdk_cursor_new(GDK_CROSSHAIR);        break;    case eCursor_move:        gdkcursor = gdk_cursor_new(GDK_FLEUR);        break;    case eCursor_help:        newType = MOZ_CURSOR_QUESTION_ARROW;        break;    case eCursor_copy: // CSS3        newType = MOZ_CURSOR_COPY;        break;    case eCursor_alias:        newType = MOZ_CURSOR_ALIAS;        break;    case eCursor_context_menu:        newType = MOZ_CURSOR_CONTEXT_MENU;        break;    case eCursor_cell:        gdkcursor = gdk_cursor_new(GDK_PLUS);        break;    case eCursor_grab:        newType = MOZ_CURSOR_HAND_GRAB;        break;    case eCursor_grabbing:        newType = MOZ_CURSOR_HAND_GRABBING;        break;    case eCursor_spinning:        newType = MOZ_CURSOR_SPINNING;        break;    case eCursor_count_up:    case eCursor_count_down:    case eCursor_count_up_down:        // XXX: these CSS3 cursors need to be implemented        gdkcursor = gdk_cursor_new(GDK_LEFT_PTR);        break;    case eCursor_zoom_in:        newType = MOZ_CURSOR_ZOOM_IN;        break;    case eCursor_zoom_out:        newType = MOZ_CURSOR_ZOOM_OUT;        break;    default:        NS_ASSERTION(aCursor, "Invalid cursor type");        break;    }    // if by now we dont have a xcursor, this means we have to make a    // custom one    if (!gdkcursor) {        NS_ASSERTION(newType != 0xff,                     "Unknown cursor type and no standard cursor");        gdk_color_parse("#000000", &fg);        gdk_color_parse("#ffffff", &bg);        cursor = gdk_bitmap_create_from_data(NULL,                                             (char *)GtkCursors[newType].bits,                                             32, 32);        mask =            gdk_bitmap_create_from_data(NULL,                                        (char *)GtkCursors[newType].mask_bits,                                        32, 32);        gdkcursor = gdk_cursor_new_from_pixmap(cursor, mask, &fg, &bg,                                               GtkCursors[newType].hot_x,                                               GtkCursors[newType].hot_y);        gdk_bitmap_unref(mask);        gdk_bitmap_unref(cursor);    }    gCursorCache[aCursor] = gdkcursor;    return gdkcursor;}