-
Notifications
You must be signed in to change notification settings - Fork 1
/
objmacro.h
85 lines (65 loc) · 3.84 KB
/
objmacro.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
* COPS (c) 1995 - 2003 Sven & Wilfried Behne
* 2004 F.Naumann & O.Skancke
*
* A XCONTROL compatible CPX manager.
*
* This file is part of COPS.
*
* COPS is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* COPS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XaAES; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _objmacro_h
#define _objmacro_h
/*----------------------------------------------------------------------------------------*/
/* Objektmanipulation */
/*----------------------------------------------------------------------------------------*/
#define obj_NORMAL(tree, obj) (tree[obj].ob_state &= 0xff00)
#define obj_SELECTED(tree, obj) (tree[obj].ob_state |= OS_SELECTED)
#define obj_DESELECTED(tree, obj) (tree[obj].ob_state &= ~OS_SELECTED)
#define obj_DISABLED(tree, obj) (tree[obj].ob_state |= OS_DISABLED)
#define obj_ENABLED(tree, obj) (tree[obj].ob_state &= ~OS_DISABLED)
#define obj_SELECTABLE(tree, obj) (tree[obj].ob_flags |= OF_SELECTABLE)
#define obj_NOT_SELECTABLE(tree, obj) (tree[obj].ob_flags &= ~OF_SELECTABLE)
#define obj_DEFAULT(tree, obj) (tree[obj].ob_flags |= OF_DEFAULT)
#define obj_NOT_DEFAULT(tree, obj) (tree[obj].ob_flags &= ~OF_DEFAULT)
#define obj_EXIT(tree, obj) (tree[obj].ob_flags |= OF_EXIT)
#define obj_NOT_EXIT(tree, obj) (tree[obj].ob_flags &= ~OF_EXIT)
#define obj_EDITABLE(tree, obj) (tree[obj].ob_flags |= OF_EDITABLE)
#define obj_NOT_EDITABLE(tree, obj) (tree[obj].ob_flags &= ~OF_EDITABLE)
#define obj_TOUCHEXIT(tree, obj) (tree[obj].ob_flags |= OF_TOUCHEXIT)
#define obj_NOT_TOUCHEXIT(tree, obj) (tree[obj].ob_flags &= ~OF_TOUCHEXIT)
#define obj_HIDDEN(tree, obj) (tree[obj].ob_flags |= OF_HIDETREE)
#define obj_VISIBLE(tree, obj) (tree[obj].ob_flags &= ~OF_HIDETREE)
/*----------------------------------------------------------------------------------------*/
/* Objektstatus */
/*----------------------------------------------------------------------------------------*/
#define is_obj_NORMAL(tree, obj) (tree[obj].ob_state & 0xff)
#define is_obj_SELECTED(tree, obj) (tree[obj].ob_state & OS_SELECTED)
#define is_obj_DESELECTED(tree, obj) !(tree[obj].ob_state & OS_SELECTED)
#define is_obj_DISABLED(tree, obj) (tree[obj].ob_state & OS_DISABLED)
#define is_obj_ENABLED(tree, obj) !(tree[obj].ob_state & OS_DISABLED)
#define is_obj_SELECTABLE(tree, obj) (tree[obj].ob_flags & OF_SELECTABLE)
#define is_obj_NOT_SELECTABLE(tree, obj) !(tree[obj].ob_flags & OF_SELECTABLE)
#define is_obj_DEFAULT(tree, obj) (tree[obj].ob_flags & OF_DEFAULT)
#define is_obj_NOT_DEFAULT(tree, obj) !(tree[obj].ob_flags & OF_DEFAULT)
#define is_obj_EXIT(tree, obj) (tree[obj].ob_flags & OF_EXIT)
#define is_obj_NOT_EXIT(tree, obj) !(tree[obj].ob_flags & OF_EXIT)
#define is_obj_EDITABLE(tree, obj) (tree[obj].ob_flags & OF_EDITABLE)
#define is_obj_NOT_EDITABLE(tree, obj) !(tree[obj].ob_flags & OF_EDITABLE)
#define is_obj_TOUCHEXIT(tree, obj) (tree[obj].ob_flags & OF_TOUCHEXIT)
#define is_obj_NOT_TOUCHEXIT(tree, obj) !(tree[obj].ob_flags & OF_TOUCHEXIT)
#define is_obj_HIDDEN(tree, obj) (tree[obj].ob_flags & OF_HIDETREE)
#define is_obj_VISIBLE(tree, obj) !(tree[obj].ob_flags & OF_HIDETREE)
#endif /* _objmacro_h */