1 /***************************************************************************
3 NBalance.mcc - New Balance MUI Custom Class
4 Copyright (C) 2008-2013 by NList Open Source Team
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 NList classes Support Site: http://www.sf.net/projects/nlist-classes
20 ***************************************************************************/
23 #include <proto/exec.h>
24 #include <proto/intuition.h>
25 #include <proto/layers.h>
27 /******************************************************************************/
29 /* MCC/MCP name and version */
31 /* ATTENTION: The FIRST LETTER of NAME MUST be UPPERCASE */
33 /******************************************************************************/
39 /******************************************************************************/
40 /* include the minimal startup code to be able to start the class from a */
41 /* shell without crashing the system */
42 /******************************************************************************/
43 #include "shellstart.c"
45 #define VERSION LIB_VERSION
46 #define REVISION LIB_REVISION
48 #define CLASS MUIC_NBalance
49 #define SUPERCLASS MUIC_Balance
51 #define INSTDATA InstData
53 #define USERLIBID CLASS " " LIB_REV_STRING " [" SYSTEMSHORT "/" CPU "] (" LIB_DATE ") " LIB_COPYRIGHT
54 #define MASTERVERSION 19
58 #define MIN_STACKSIZE 16384
60 struct Library
*LayersBase
= NULL
;
62 #if defined(__amigaos4__)
63 struct LayersIFace
*ILayers
= NULL
;
66 /******************************************************************************/
67 /* define the functions used by the startup code ahead of including mccinit.c */
68 /******************************************************************************/
69 static BOOL
ClassInit(UNUSED
struct Library
*base
);
70 static VOID
ClassExpunge(UNUSED
struct Library
*base
);
72 /******************************************************************************/
73 /* include the lib startup code for the mcc/mcp (and muimaster inlines) */
74 /******************************************************************************/
77 /******************************************************************************/
78 /* define all implementations of our user functions */
79 /******************************************************************************/
80 static BOOL
ClassInit(UNUSED
struct Library
*base
)
82 if((LayersBase
= OpenLibrary("layers.library", 39L)) &&
83 GETINTERFACE(ILayers
, struct LayersIFace
*, LayersBase
))
92 static VOID
ClassExpunge(UNUSED
struct Library
*base
)
94 if(LayersBase
!= NULL
)
96 DROPINTERFACE(ILayers
);
97 CloseLibrary(LayersBase
);