summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/css_enums2
-rw-r--r--desktop/browser.c25
-rw-r--r--desktop/gui.h9
-rw-r--r--gtk/gtk_window.c40
-rw-r--r--riscos/window.c9
5 files changed, 71 insertions, 14 deletions
diff --git a/css/css_enums b/css/css_enums
index 757550b7c..ff41f08b1 100644
--- a/css/css_enums
+++ b/css/css_enums
@@ -5,7 +5,7 @@ css_border_collapse inherit collapse separate
css_border_style inherit none hidden dotted dashed solid double groove ridge inset outset
css_caption_side inherit top bottom
css_clear inherit none both left right
-css_cursor inherit auto crosshair default pointer move e-resize ne-resize nw-resize n-resize se-resize sw-resize s-resize w-resize text wait help
+css_cursor inherit auto crosshair default pointer move e-resize ne-resize nw-resize n-resize se-resize sw-resize s-resize w-resize text wait help no-drop not-allowed progress
css_direction inherit ltr rtl
css_display inherit inline block list-item run-in inline-block table inline-table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption none
css_empty_cells inherit show hide
diff --git a/desktop/browser.c b/desktop/browser.c
index 3ac90c1c2..54473940a 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1803,24 +1803,43 @@ gui_pointer_shape get_pointer_shape(css_cursor cursor)
pointer = GUI_POINTER_MOVE;
break;
case CSS_CURSOR_E_RESIZE:
+ pointer = GUI_POINTER_RIGHT;
+ break;
case CSS_CURSOR_W_RESIZE:
- pointer = GUI_POINTER_LR;
+ pointer = GUI_POINTER_LEFT;
break;
case CSS_CURSOR_N_RESIZE:
+ pointer = GUI_POINTER_UP;
+ break;
case CSS_CURSOR_S_RESIZE:
- pointer = GUI_POINTER_UD;
+ pointer = GUI_POINTER_DOWN;
break;
case CSS_CURSOR_NE_RESIZE:
+ pointer = GUI_POINTER_RU;
+ break;
case CSS_CURSOR_SW_RESIZE:
pointer = GUI_POINTER_LD;
break;
case CSS_CURSOR_SE_RESIZE:
- case CSS_CURSOR_NW_RESIZE:
pointer = GUI_POINTER_RD;
break;
+ case CSS_CURSOR_NW_RESIZE:
+ pointer = GUI_POINTER_LU;
+ break;
case CSS_CURSOR_TEXT:
pointer = GUI_POINTER_CARET;
break;
+ case CSS_CURSOR_WAIT:
+ pointer = GUI_POINTER_WAIT;
+ break;
+ case CSS_CURSOR_PROGRESS:
+ pointer = GUI_POINTER_PROGRESS;
+ case CSS_CURSOR_NO_DROP:
+ pointer = GUI_POINTER_NO_DROP;
+ case CSS_CURSOR_NOT_ALLOWED:
+ pointer = GUI_POINTER_NOT_ALLOWED;
+ case CSS_CURSOR_HELP:
+ pointer = GUI_POINTER_HELP;
default:
pointer = GUI_POINTER_DEFAULT;
break;
diff --git a/desktop/gui.h b/desktop/gui.h
index 578e95c0a..bdc103c7c 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -33,9 +33,12 @@ struct gui_window;
struct gui_download_window;
typedef enum { GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET,
- GUI_POINTER_MENU, GUI_POINTER_UD, GUI_POINTER_LR,
- GUI_POINTER_LD, GUI_POINTER_RD, GUI_POINTER_CROSS,
- GUI_POINTER_MOVE } gui_pointer_shape;
+ GUI_POINTER_MENU, GUI_POINTER_UP, GUI_POINTER_DOWN,
+ GUI_POINTER_LEFT, GUI_POINTER_RIGHT, GUI_POINTER_RU,
+ GUI_POINTER_LD, GUI_POINTER_LU, GUI_POINTER_RD,
+ GUI_POINTER_CROSS, GUI_POINTER_MOVE, GUI_POINTER_WAIT,
+ GUI_POINTER_HELP, GUI_POINTER_NO_DROP, GUI_POINTER_NOT_ALLOWED,
+ GUI_POINTER_PROGRESS } gui_pointer_shape;
#include <stdbool.h>
#include "netsurf/utils/config.h"
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c
index b0a242580..a3c247f18 100644
--- a/gtk/gtk_window.c
+++ b/gtk/gtk_window.c
@@ -374,17 +374,29 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
case GUI_POINTER_CARET:
cursortype = GDK_XTERM;
break;
- case GUI_POINTER_UD:
- cursortype = GDK_SB_V_DOUBLE_ARROW;
+ case GUI_POINTER_UP:
+ cursortype = GDK_TOP_SIDE;
break;
- case GUI_POINTER_LR:
- cursortype = GDK_SB_H_DOUBLE_ARROW;
+ case GUI_POINTER_DOWN:
+ cursortype = GDK_BOTTOM_SIDE;
+ break;
+ case GUI_POINTER_LEFT:
+ cursortype = GDK_LEFT_SIDE;
+ break;
+ case GUI_POINTER_RIGHT:
+ cursortype = GDK_RIGHT_SIDE;
break;
case GUI_POINTER_LD:
- cursortype = GDK_SIZING; /* XXX */
+ cursortype = GDK_BOTTOM_LEFT_CORNER;
break;
case GUI_POINTER_RD:
- cursortype = GDK_SIZING; /* XXX */
+ cursortype = GDK_BOTTOM_RIGHT_CORNER;
+ break;
+ case GUI_POINTER_LU:
+ cursortype = GDK_TOP_LEFT_CORNER;
+ break;
+ case GUI_POINTER_RU:
+ cursortype = GDK_TOP_RIGHT_CORNER;
break;
case GUI_POINTER_CROSS:
cursortype = GDK_CROSS;
@@ -392,8 +404,22 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
case GUI_POINTER_MOVE:
cursortype = GDK_FLEUR;
break;
+ case GUI_POINTER_WAIT:
+ cursortype = GDK_WATCH;
+ break;
+ case GUI_POINTER_HELP:
+ cursortype = GDK_QUESTION_ARROW;
+ break;
case GUI_POINTER_MENU:
- /* Cannot think of a good cursor for 'menu' yet */
+ cursortype = GDK_RIGHTBUTTON;
+ break;
+ case GUI_POINTER_PROGRESS:
+ /* In reality, this needs to be the funky left_ptr_watch which we can't do easily yet */
+ cursortype = GDK_WATCH;
+ break;
+ /* The following we're not sure about */
+ case GUI_POINTER_NO_DROP:
+ case GUI_POINTER_NOT_ALLOWED:
case GUI_POINTER_DEFAULT:
default:
nullcursor = true;
diff --git a/riscos/window.c b/riscos/window.c
index ca7c8840a..02983cfee 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -2506,11 +2506,20 @@ struct ro_gui_pointer_entry ro_gui_pointer_table[] = {
{ false, "ptr_caret", 4, 9 },
{ false, "ptr_menu", 6, 4 },
{ false, "ptr_ud", 6, 7 },
+ { false, "ptr_ud", 6, 7 },
+ { false, "ptr_lr", 7, 6 },
{ false, "ptr_lr", 7, 6 },
{ false, "ptr_ld", 7, 7 },
+ { false, "ptr_ld", 7, 7 },
{ false, "ptr_rd", 7, 7 },
+ { false, "ptr_rd", 6, 7 },
{ false, "ptr_cross", 7, 7 },
{ false, "ptr_move", 8, 0 },
+ { true, "ptr_default", 0, 0 }, /* WAIT */
+ { true, "ptr_default", 0, 0 }, /* HELP */
+ { true, "ptr_default", 0, 0 }, /* NO DROP */
+ { true, "ptr_default", 0, 0 }, /* NOT ALLOWED */
+ { true, "ptr_default", 0, 0 }, /* PROGRESS */
};
/**