Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / icon / icon_init.c
blobcbaceb9a0f9e409c6bf67aeec818dec0dc3beefe
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 */
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"
14 #include "identify.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)
28 LONG i;
30 IconBase = lh;
32 /* Initialize memory pool ----------------------------------------------*/
33 if (!(LB(lh)->ib_MemoryPool = CreatePool(MEMF_ANY | MEMF_SEM_PROTECTED, 8194, 8194)))
35 return FALSE;
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;
60 return TRUE;
63 static int Expunge(LIBBASETYPEPTR lh)
65 DeletePool(LB(lh)->ib_MemoryPool);
67 if (PNGBase) CloseLibrary(PNGBase);
69 return TRUE;
73 ADD2INITLIB(Init, 0);
74 ADD2EXPUNGELIB(Expunge, 0);