2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 #include <exec/types.h>
10 #include <graphics/gfxnodes.h>
11 #include <graphics/monitor.h>
12 #include <graphics/view.h>
13 #include <graphics/gfxbase.h>
14 #include <proto/exec.h>
15 #include <proto/graphics.h>
16 #include "graphics_intern.h"
18 /*****************************************************************************
22 AROS_LH1( struct ExtendedNode
*, GfxLookUp
,
26 AROS_LHA( void *, pointer
, A0
),
30 struct GfxBase
*, GfxBase
, 117, Graphics
)
33 Finds a special graphics extended data structure (if an) associated
34 with the pointer to a data structure (e.g.: ViewExtra associated with
38 pointer = a pointer to a data structure which may have an
39 ExtendedNode associated with it (typically a View)
42 result = a pointer to the ExtendedNode that has previously been
43 associated with the pointer
52 graphics/gfxnodes.h GfxNew(), GfxAssociate(), GfxFree()
58 ******************************************************************************/
62 LONG
* Hash
= GfxBase
-> hash_table
;
63 ULONG Index
= CalcHashIndex((ULONG
)pointer
);
65 /* Whatever structure we get as node we put the pointer in the space
66 following immediately after the ExtendedNode structure.
68 ViewPortExtra -> ViewPort
71 struct ExtendedNode
* node
= (struct ExtendedNode
*)(Hash
[Index
]);
74 if (pointer
== (void *) ((struct ViewExtra
*)node
)->View
)
77 /* examine the next element */
78 node
= (struct ExtendedNode
*)node
-> xln_Succ
;
80 /* no associated pointer was found! */