1 /*$
2  Copyright (C) 2013-2020 Azel.
3 
4  This file is part of AzPainter.
5 
6  AzPainter 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, either version 3 of the License, or
9  (at your option) any later version.
10 
11  AzPainter 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
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 $*/
19 
20 #ifndef MLIB_TREE_DEF_H
21 #define MLIB_TREE_DEF_H
22 
23 typedef struct _mTreeItem mTreeItem;
24 
25 struct _mTreeItem
26 {
27 	mTreeItem *prev,*next,*first,*last,*parent;
28 	void (*destroy)(mTreeItem *);
29 };
30 
31 typedef struct _mTree
32 {
33 	mTreeItem *top,*bottom;
34 }mTree;
35 
36 
37 #define M_TREE(p)      ((mTree *)(p))
38 #define M_TREEITEM(p)  ((mTreeItem *)(p))
39 #define MTREE_INIT {0,0}
40 
41 #endif
42