2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
7 #include <utility/utility.h> /* this must be before icon_intern.h */
9 #include <aros/symbolsets.h>
11 #define __ICON_NOLIBBASE__
13 #include "icon_intern.h"
16 #include LC_LIBDEFS_FILE
18 LONG IFFParseBase_version
= -39,
19 GfxBase_version
= -39,
20 CyberGfxBase_version
= -39;
22 LIBBASETYPE
*IconBase
;
24 /****************************************************************************************/
26 static int Init(LIBBASETYPEPTR lh
)
32 /* Initialize memory pool ----------------------------------------------*/
33 if (!(LB(lh
)->ib_MemoryPool
= CreatePool(MEMF_ANY
| MEMF_SEM_PROTECTED
, 8194, 8194)))
38 LB(lh
)->dsh
.h_Entry
= (void *)AROS_ASMSYMNAME(dosstreamhook
);
39 LB(lh
)->dsh
.h_Data
= lh
;
41 InitSemaphore(&LB(lh
)->iconlistlock
);
42 for(i
= 0; i
< ICONLIST_HASHSIZE
; i
++)
44 NewList((struct List
*)&LB(lh
)->iconlists
[i
]);
47 /* Setup default global settings ---------------------------------------*/
48 LB(lh
)->ib_Screen
= NULL
; // FIXME: better default
49 LB(lh
)->ib_Precision
= PRECISION_ICON
;
50 LB(lh
)->ib_EmbossRectangle
.MinX
= 0; // FIXME: better default
51 LB(lh
)->ib_EmbossRectangle
.MaxX
= 0;
52 LB(lh
)->ib_EmbossRectangle
.MinY
= 0;
53 LB(lh
)->ib_EmbossRectangle
.MaxY
= 0;
54 LB(lh
)->ib_Frameless
= TRUE
;
55 LB(lh
)->ib_IdentifyHook
= NULL
;
56 LB(lh
)->ib_MaxNameLength
= 25;
57 LB(lh
)->ib_NewIconsSupport
= TRUE
;
58 LB(lh
)->ib_ColorIconSupport
= TRUE
;
63 static int Expunge(LIBBASETYPEPTR lh
)
65 DeletePool(LB(lh
)->ib_MemoryPool
);
67 if (PNGBase
) CloseLibrary(PNGBase
);
74 ADD2EXPUNGELIB(Expunge
, 0);