Update preset.
[bertos.git] / bertos / dt / dtag.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos 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 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program 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, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
30  * -->
31  *
32  *
33  * \brief Tags interface.
34  * This module contains the base message definitions and the list of all available tags.
35  *
36  * \author Bernie Innocenti <bernie@codewiz.org>
37  * \author Francesco Sacchi <batt@develer.com>
38  */
39
40 /*#*
41  *#* $Log$
42  *#* Revision 1.2  2006/07/19 12:56:26  bernie
43  *#* Convert to new Doxygen style.
44  *#*
45  *#* Revision 1.1  2005/11/04 18:26:38  bernie
46  *#* Import into DevLib.
47  *#*
48  *#* Revision 1.8  2005/06/07 15:22:29  batt
49  *#* Add const_dval_t.
50  *#*
51  *#* Revision 1.7  2005/06/06 17:42:23  batt
52  *#* Add error tag TAG_ERROR.
53  *#*
54  *#* Revision 1.6  2005/06/06 12:45:33  batt
55  *#* Add TAG_NONE tag.
56  *#*
57  *#* Revision 1.5  2005/06/06 11:04:12  batt
58  *#* Add some comments.
59  *#*
60  *#* Revision 1.4  2005/05/31 11:09:52  batt
61  *#* Add some tags.
62  *#*
63  *#* Revision 1.3  2005/05/26 14:55:12  batt
64  *#* Add form_processTime; change form_kbdProcess to form_processKey.
65  *#*
66  *#* Revision 1.2  2005/05/26 14:43:33  batt
67  *#* Add new message filter interface.
68  *#*
69  *#* Revision 1.1  2005/05/26 08:32:53  batt
70  *#* Add new Develer widget system :)
71  *#*
72  *#*/
73
74 #ifndef DT_DTAG_H
75 #define DT_DTAG_H
76
77 #include <cfg/macros.h>
78
79 /** Type for values associated with tags. */
80 typedef iptr_t dval_t;
81
82 /** Type for constant values associated with tags. */
83 typedef const_iptr_t const_dval_t;
84
85 /** Type for tag */
86 typedef enum dtag_t
87 {
88         TAG_END = 0,
89         TAG_NONE,
90         TAG_ANY,
91         TAG_SETVALUE,
92         TAG_UP,
93         TAG_DOWN,
94         TAG_START,
95         TAG_STOP,
96         TAG_TOGGLE,
97         TAG_KEY,
98         TAG_TIME,
99         TAG_ERROR,
100 } dtag_t;
101
102 /** This is the basic message structure used by all dnotifiers. */
103 typedef struct DTagItem
104 {
105         dtag_t tag;
106         dval_t val;
107 } DTagItem;
108
109 /** Marker to indicate the end of a map for message filtering/translating */
110 #define TAG_END_MARKER {{TAG_END, 0}, {TAG_END, 0}}
111 #endif