From 078ff2fd51380bd2f34b065235beaa3befd8b585 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 30 Oct 2010 11:20:53 +0000 Subject: Move drag icon stuff to own file; fix warnings svn path=/trunk/netsurf/; revision=10922 --- amiga/gui.c | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'amiga/gui.c') diff --git a/amiga/gui.c b/amiga/gui.c index e44f3a73f..d0e88e905 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -27,6 +27,7 @@ #include "desktop/searchweb.h" #include "desktop/selection.h" #include "desktop/textinput.h" +#include "image/ico.h" #include "render/form.h" #include "utils/messages.h" #include "utils/utf8.h" @@ -40,6 +41,7 @@ #include "amiga/context_menu.h" #include "amiga/cookies.h" #include "amiga/download.h" +#include "amiga/drag.h" #include "amiga/fetch_mailto.h" #include "amiga/font.h" #include "amiga/gui.h" @@ -72,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -3887,40 +3888,3 @@ struct box *ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y) } return text_box; } - -struct gui_window_2 *ami_find_gwin_by_id(struct Window *win) -{ - struct nsObject *node, *nnode; - struct gui_window_2 *gwin; - - if(!IsMinListEmpty(window_list)) - { - node = (struct nsObject *)GetHead((struct List *)window_list); - - do - { - nnode=(struct nsObject *)GetSucc((struct Node *)node); - - if(node->Type == AMINS_WINDOW) // or frame? - { - gwin = node->objstruct; - if(win == gwin->win) return gwin; - } - } while(node = nnode); - } - return NULL; -} - -struct gui_window_2 *ami_window_at_pointer(void) -{ - struct Layer *layer; - - LockLayerInfo(&scrn->LayerInfo); - - layer = WhichLayer(&scrn->LayerInfo, scrn->MouseX, scrn->MouseY); - - UnlockLayerInfo(&scrn->LayerInfo); - - if(layer) return ami_find_gwin_by_id(layer->Window); - else return NULL; -} -- cgit v1.2.3