Use all the built-in mouse pointers on OS4.1

This commit is contained in:
Chris Young 2013-10-12 11:26:34 +01:00
parent af2c37167b
commit 5d2f4b0b98
1 changed files with 29 additions and 5 deletions

View File

@ -95,6 +95,31 @@ char *ptrs32[AMI_LASTPOINTER+1] = {
"ptr32_blank", "ptr32_blank",
"ptr32_drag"}; "ptr32_drag"};
/* Mapping from NetSurf to AmigaOS mouse pointers */
int osmouseptr[AMI_LASTPOINTER+1] = {
POINTERTYPE_NORMAL,
POINTERTYPE_LINK,
POINTERTYPE_TEXT,
POINTERTYPE_CONTEXTMENU,
POINTERTYPE_NORTHRESIZE,
POINTERTYPE_SOUTHRESIZE,
POINTERTYPE_WESTRESIZE,
POINTERTYPE_EASTRESIZE,
POINTERTYPE_NORTHEASTRESIZE,
POINTERTYPE_SOUTHWESTRESIZE,
POINTERTYPE_NORTHWESTRESIZE,
POINTERTYPE_SOUTHEASTRESIZE,
POINTERTYPE_CROSS,
POINTERTYPE_HAND,
POINTERTYPE_BUSY,
POINTERTYPE_HELP,
POINTERTYPE_NODROP,
POINTERTYPE_NOTALLOWED,
POINTERTYPE_PROGRESS,
POINTERTYPE_NONE,
POINTERTYPE_DRAGANDDROP};
void ami_theme_init(void) void ami_theme_init(void)
{ {
char themefile[1024]; char themefile[1024];
@ -209,12 +234,11 @@ void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
break; break;
default: default:
if(mouseptrobj[shape]) if((IntuitionBase->LibNode.lib_Version >= 53) && (osmouseptr[shape] != -1)) {
{ SetWindowPointer(win, WA_PointerType, osmouseptr[shape], TAG_DONE);
} else if(mouseptrobj[shape]) {
SetWindowPointer(win, WA_Pointer, mouseptrobj[shape], TAG_DONE); SetWindowPointer(win, WA_Pointer, mouseptrobj[shape], TAG_DONE);
} } else {
else
{
SetWindowPointer(win, TAG_DONE); SetWindowPointer(win, TAG_DONE);
} }
break; break;