mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
[project @ 2006-03-19 17:49:32 by dsilvers]
Add support for a few more CSS cursors and tidy the GUI_POINTER_* stuff to support what we already had svn path=/import/netsurf/; revision=2135
This commit is contained in:
parent
63c65c6808
commit
35bb5f96d5
@ -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_border_style inherit none hidden dotted dashed solid double groove ridge inset outset
|
||||||
css_caption_side inherit top bottom
|
css_caption_side inherit top bottom
|
||||||
css_clear inherit none both left right
|
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_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_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
|
css_empty_cells inherit show hide
|
||||||
|
@ -1803,24 +1803,43 @@ gui_pointer_shape get_pointer_shape(css_cursor cursor)
|
|||||||
pointer = GUI_POINTER_MOVE;
|
pointer = GUI_POINTER_MOVE;
|
||||||
break;
|
break;
|
||||||
case CSS_CURSOR_E_RESIZE:
|
case CSS_CURSOR_E_RESIZE:
|
||||||
|
pointer = GUI_POINTER_RIGHT;
|
||||||
|
break;
|
||||||
case CSS_CURSOR_W_RESIZE:
|
case CSS_CURSOR_W_RESIZE:
|
||||||
pointer = GUI_POINTER_LR;
|
pointer = GUI_POINTER_LEFT;
|
||||||
break;
|
break;
|
||||||
case CSS_CURSOR_N_RESIZE:
|
case CSS_CURSOR_N_RESIZE:
|
||||||
|
pointer = GUI_POINTER_UP;
|
||||||
|
break;
|
||||||
case CSS_CURSOR_S_RESIZE:
|
case CSS_CURSOR_S_RESIZE:
|
||||||
pointer = GUI_POINTER_UD;
|
pointer = GUI_POINTER_DOWN;
|
||||||
break;
|
break;
|
||||||
case CSS_CURSOR_NE_RESIZE:
|
case CSS_CURSOR_NE_RESIZE:
|
||||||
|
pointer = GUI_POINTER_RU;
|
||||||
|
break;
|
||||||
case CSS_CURSOR_SW_RESIZE:
|
case CSS_CURSOR_SW_RESIZE:
|
||||||
pointer = GUI_POINTER_LD;
|
pointer = GUI_POINTER_LD;
|
||||||
break;
|
break;
|
||||||
case CSS_CURSOR_SE_RESIZE:
|
case CSS_CURSOR_SE_RESIZE:
|
||||||
case CSS_CURSOR_NW_RESIZE:
|
|
||||||
pointer = GUI_POINTER_RD;
|
pointer = GUI_POINTER_RD;
|
||||||
break;
|
break;
|
||||||
|
case CSS_CURSOR_NW_RESIZE:
|
||||||
|
pointer = GUI_POINTER_LU;
|
||||||
|
break;
|
||||||
case CSS_CURSOR_TEXT:
|
case CSS_CURSOR_TEXT:
|
||||||
pointer = GUI_POINTER_CARET;
|
pointer = GUI_POINTER_CARET;
|
||||||
break;
|
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:
|
default:
|
||||||
pointer = GUI_POINTER_DEFAULT;
|
pointer = GUI_POINTER_DEFAULT;
|
||||||
break;
|
break;
|
||||||
|
@ -33,9 +33,12 @@ struct gui_window;
|
|||||||
struct gui_download_window;
|
struct gui_download_window;
|
||||||
|
|
||||||
typedef enum { GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET,
|
typedef enum { GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET,
|
||||||
GUI_POINTER_MENU, GUI_POINTER_UD, GUI_POINTER_LR,
|
GUI_POINTER_MENU, GUI_POINTER_UP, GUI_POINTER_DOWN,
|
||||||
GUI_POINTER_LD, GUI_POINTER_RD, GUI_POINTER_CROSS,
|
GUI_POINTER_LEFT, GUI_POINTER_RIGHT, GUI_POINTER_RU,
|
||||||
GUI_POINTER_MOVE } gui_pointer_shape;
|
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 <stdbool.h>
|
||||||
#include "netsurf/utils/config.h"
|
#include "netsurf/utils/config.h"
|
||||||
|
@ -374,17 +374,29 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
|
|||||||
case GUI_POINTER_CARET:
|
case GUI_POINTER_CARET:
|
||||||
cursortype = GDK_XTERM;
|
cursortype = GDK_XTERM;
|
||||||
break;
|
break;
|
||||||
case GUI_POINTER_UD:
|
case GUI_POINTER_UP:
|
||||||
cursortype = GDK_SB_V_DOUBLE_ARROW;
|
cursortype = GDK_TOP_SIDE;
|
||||||
break;
|
break;
|
||||||
case GUI_POINTER_LR:
|
case GUI_POINTER_DOWN:
|
||||||
cursortype = GDK_SB_H_DOUBLE_ARROW;
|
cursortype = GDK_BOTTOM_SIDE;
|
||||||
|
break;
|
||||||
|
case GUI_POINTER_LEFT:
|
||||||
|
cursortype = GDK_LEFT_SIDE;
|
||||||
|
break;
|
||||||
|
case GUI_POINTER_RIGHT:
|
||||||
|
cursortype = GDK_RIGHT_SIDE;
|
||||||
break;
|
break;
|
||||||
case GUI_POINTER_LD:
|
case GUI_POINTER_LD:
|
||||||
cursortype = GDK_SIZING; /* XXX */
|
cursortype = GDK_BOTTOM_LEFT_CORNER;
|
||||||
break;
|
break;
|
||||||
case GUI_POINTER_RD:
|
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;
|
break;
|
||||||
case GUI_POINTER_CROSS:
|
case GUI_POINTER_CROSS:
|
||||||
cursortype = GDK_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:
|
case GUI_POINTER_MOVE:
|
||||||
cursortype = GDK_FLEUR;
|
cursortype = GDK_FLEUR;
|
||||||
break;
|
break;
|
||||||
|
case GUI_POINTER_WAIT:
|
||||||
|
cursortype = GDK_WATCH;
|
||||||
|
break;
|
||||||
|
case GUI_POINTER_HELP:
|
||||||
|
cursortype = GDK_QUESTION_ARROW;
|
||||||
|
break;
|
||||||
case GUI_POINTER_MENU:
|
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:
|
case GUI_POINTER_DEFAULT:
|
||||||
default:
|
default:
|
||||||
nullcursor = true;
|
nullcursor = true;
|
||||||
|
@ -2506,11 +2506,20 @@ struct ro_gui_pointer_entry ro_gui_pointer_table[] = {
|
|||||||
{ false, "ptr_caret", 4, 9 },
|
{ false, "ptr_caret", 4, 9 },
|
||||||
{ false, "ptr_menu", 6, 4 },
|
{ false, "ptr_menu", 6, 4 },
|
||||||
{ false, "ptr_ud", 6, 7 },
|
{ false, "ptr_ud", 6, 7 },
|
||||||
|
{ false, "ptr_ud", 6, 7 },
|
||||||
|
{ false, "ptr_lr", 7, 6 },
|
||||||
{ false, "ptr_lr", 7, 6 },
|
{ false, "ptr_lr", 7, 6 },
|
||||||
{ false, "ptr_ld", 7, 7 },
|
{ false, "ptr_ld", 7, 7 },
|
||||||
|
{ false, "ptr_ld", 7, 7 },
|
||||||
{ false, "ptr_rd", 7, 7 },
|
{ false, "ptr_rd", 7, 7 },
|
||||||
|
{ false, "ptr_rd", 6, 7 },
|
||||||
{ false, "ptr_cross", 7, 7 },
|
{ false, "ptr_cross", 7, 7 },
|
||||||
{ false, "ptr_move", 8, 0 },
|
{ 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 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user