grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / classes / zune / nlist / nlistview_mcc / library.c
blob6c3852d9e69a5d5c877052f9d718e4ccefc7b8a1
1 /***************************************************************************
3 NListview.mcc - New Listview MUI Custom Class
4 Registered MUI class, Serial Number: 1d51 (0x9d510020 to 0x9d51002F)
6 Copyright (C) 1996-2001 by Gilles Masson
7 Copyright (C) 2001-2014 NList Open Source Team
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 NList classes Support Site: http://www.sf.net/projects/nlist-classes
21 $Id$
23 ***************************************************************************/
25 /******************************************************************************/
26 /* */
27 /* includes */
28 /* */
29 /******************************************************************************/
31 #include <proto/exec.h>
32 #include <proto/intuition.h>
34 /******************************************************************************/
35 /* */
36 /* MCC/MCP name and version */
37 /* */
38 /* ATTENTION: The FIRST LETTER of NAME MUST be UPPERCASE */
39 /* */
40 /******************************************************************************/
42 #include "private.h"
43 #include "version.h"
45 /******************************************************************************/
46 /* include the minimal startup code to be able to start the class from a */
47 /* shell without crashing the system */
48 /******************************************************************************/
49 #include "shellstart.c"
51 #define VERSION LIB_VERSION
52 #define REVISION LIB_REVISION
54 #define CLASS MUIC_NListview
55 #define SUPERCLASS MUIC_Group
57 #define INSTDATA NLVData
59 #define USERLIBID CLASS " " LIB_REV_STRING " [" SYSTEMSHORT "/" CPU "] (" LIB_DATE ") " LIB_COPYRIGHT
60 #define MASTERVERSION 19
62 #define CLASSINIT
63 #define CLASSEXPUNGE
65 #define USEDCLASSESP used_mcps
66 static const char *used_mcps[] = { "NListviews.mcp", NULL };
68 #define MIN_STACKSIZE 8192
70 struct Library *KeymapBase = NULL;
71 #if defined(__amigaos4__)
72 struct KeymapIFace *IKeymap = NULL;
73 #endif
75 /******************************************************************************/
76 /* define the functions used by the startup code ahead of including mccinit.c */
77 /******************************************************************************/
78 static BOOL ClassInit(UNUSED struct Library *base);
79 static VOID ClassExpunge(UNUSED struct Library *base);
81 /******************************************************************************/
82 /* include the lib startup code for the mcc/mcp (and muimaster inlines) */
83 /******************************************************************************/
84 #include "mccinit.c"
86 /******************************************************************************/
87 /* define all implementations of our user functions */
88 /******************************************************************************/
89 static BOOL ClassInit(UNUSED struct Library *base)
91 if((KeymapBase = OpenLibrary("keymap.library", 36L)) &&
92 GETINTERFACE(IKeymap, struct KeymapIFace *, KeymapBase))
94 return TRUE;
97 return FALSE;
101 static VOID ClassExpunge(UNUSED struct Library *base)
103 if(KeymapBase != NULL)
105 DROPINTERFACE(IKeymap);
106 CloseLibrary(KeymapBase);
107 KeymapBase = NULL;