NetSurf
object.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008,2009 Chris Young <chris@unsatisfactorysoftware.co.uk>
3  *
4  * This file is part of NetSurf, http://www.netsurf-browser.org/
5  *
6  * NetSurf is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * NetSurf is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef AMIGA_OBJECT_H
20 #define AMIGA_OBJECT_H
21 
22 #include <exec/lists.h>
23 
24 enum
25 {
40 };
41 
42 struct nsObject
43 {
44  struct Node dtz_Node;
45  ULONG Type;
46  void *objstruct;
48  void (*callback)(void *nso);
49 };
50 
51 
52 struct MinList *NewObjList(void);
53 struct nsObject *AddObject(struct MinList *objlist, ULONG otype);
54 void ObjectCallback(struct nsObject *dtzo, void (*callback)(void *nso));
55 void DelObject(struct nsObject *dtzo);
56 void DelObjectNoFree(struct nsObject *dtzo);
57 void FreeObjList(struct MinList *objlist);
58 
59 /** List abstraction as OS3 appears to have problems with NewMinList() **/
60 struct MinList *ami_AllocMinList(void);
61 
62 /** Initialisation for itempool **/
63 bool ami_object_init(void);
64 void ami_object_fini(void);
65 #endif
66 
ULONG objstruct_size
Definition: object.h:47
void ObjectCallback(struct nsObject *dtzo, void(*callback)(void *nso))
Definition: object.c:92
void(* callback)(void *nso)
Definition: object.h:48
void FreeObjList(struct MinList *objlist)
Definition: object.c:117
ULONG Type
Definition: object.h:45
struct MinList * ami_AllocMinList(void)
List abstraction as OS3 appears to have problems with NewMinList()
Definition: object.c:63
struct Node dtz_Node
Definition: object.h:44
void DelObjectNoFree(struct nsObject *dtzo)
Definition: object.c:112
void ami_object_fini(void)
Definition: object.c:50
void DelObject(struct nsObject *dtzo)
Definition: object.c:107
void * objstruct
Definition: object.h:46
bool ami_object_init(void)
Initialisation for itempool.
Definition: object.c:42
struct MinList * NewObjList(void)
Definition: object.c:71
struct nsObject * AddObject(struct MinList *objlist, ULONG otype)
Definition: object.c:77