2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
5 Desc: GadTools initialization code.
8 #include <exec/libraries.h>
9 #include <exec/types.h>
11 #include <aros/symbolsets.h>
12 #include <utility/tagitem.h>
13 #include <utility/utility.h>
14 #include <intuition/classes.h>
15 #include <intuition/imageclass.h>
16 #include <proto/exec.h>
18 #include "gadtools_intern.h"
19 #include LC_LIBDEFS_FILE
22 #define INTUITIONNAME "intuition.library"
24 /****************************************************************************************/
27 static int Init(LIBBASETYPEPTR LIBBASE
)
29 /* This function is single-threaded by exec by calling Forbid. */
31 InitSemaphore(&LIBBASE
->bevelsema
);
32 LIBBASE
->bevel
= NULL
;
34 /* You would return NULL here if the init failed. */
38 /****************************************************************************************/
40 Object
*makebevelobj(struct GadToolsBase_intern
*GadToolsBase
)
43 struct TagItem tags
[4];
45 tags
[0].ti_Tag
= IA_EdgesOnly
;
46 tags
[0].ti_Data
= TRUE
;
47 tags
[1].ti_Tag
= IA_Left
;
48 tags
[1].ti_Data
= 0UL;
49 tags
[2].ti_Tag
= IA_Top
;
50 tags
[2].ti_Data
= 0UL;
51 tags
[3].ti_Tag
= TAG_DONE
;
52 obj
= NewObjectA(NULL
, FRAMEICLASS
, tags
);
57 /****************************************************************************************/
59 static int Open(LIBBASETYPEPTR LIBBASE
)
62 This function is single-threaded by exec by calling Forbid.
63 If you break the Forbid() another task may enter this function
64 at the same time. Take care.
68 LIBBASE
->bevel
= (struct Image
*)makebevelobj(GadToolsBase
);
75 /****************************************************************************************/
77 static int Expunge(LIBBASETYPEPTR LIBBASE
)
80 This function is single-threaded by exec by calling Forbid.
81 If you break the Forbid() another task may enter this function
82 at the same time. Take care.
86 DisposeObject(LIBBASE
->bevel
);
87 LIBBASE
->bevel
= NULL
;
92 /****************************************************************************************/
96 ADD2EXPUNGELIB(Expunge
, 0);