Import into DevLib.
[bertos.git] / dt / dtag.h
1 /*!
2  * \file
3  * <!--
4  * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
5  * -->
6  *
7  * \version $Id$
8  *
9  * \brief Tags interface.
10  * This module contains the base message definitions and the list of all available tags.
11  *
12  * \version $Id$
13  * \author Bernardo Innocenti <bernie@develer.com>
14  * \author Francesco Sacchi <batt@develer.com>
15  */
16
17 /*#*
18  *#* $Log$
19  *#* Revision 1.1  2005/11/04 18:26:38  bernie
20  *#* Import into DevLib.
21  *#*
22  *#* Revision 1.8  2005/06/07 15:22:29  batt
23  *#* Add const_dval_t.
24  *#*
25  *#* Revision 1.7  2005/06/06 17:42:23  batt
26  *#* Add error tag TAG_ERROR.
27  *#*
28  *#* Revision 1.6  2005/06/06 12:45:33  batt
29  *#* Add TAG_NONE tag.
30  *#*
31  *#* Revision 1.5  2005/06/06 11:04:12  batt
32  *#* Add some comments.
33  *#*
34  *#* Revision 1.4  2005/05/31 11:09:52  batt
35  *#* Add some tags.
36  *#*
37  *#* Revision 1.3  2005/05/26 14:55:12  batt
38  *#* Add form_processTime; change form_kbdProcess to form_processKey.
39  *#*
40  *#* Revision 1.2  2005/05/26 14:43:33  batt
41  *#* Add new message filter interface.
42  *#*
43  *#* Revision 1.1  2005/05/26 08:32:53  batt
44  *#* Add new Develer widget system :)
45  *#*
46  *#*/
47
48 #ifndef DT_DTAG_H
49 #define DT_DTAG_H
50
51 #include <cfg/macros.h>
52
53 /*! Type for values associated with tags. */
54 typedef iptr_t dval_t;
55
56 /*! Type for constant values associated with tags. */
57 typedef const_iptr_t const_dval_t;
58
59 /*! Type for tag */
60 typedef enum dtag_t
61 {
62         TAG_END = 0,
63         TAG_NONE,
64         TAG_ANY,
65         TAG_SETVALUE,
66         TAG_UP,
67         TAG_DOWN,
68         TAG_START,
69         TAG_STOP,
70         TAG_TOGGLE,
71         TAG_KEY,
72         TAG_TIME,
73         TAG_ERROR,
74 } dtag_t;
75
76 /*! This is the basic message structure used by all dnotifiers. */
77 typedef struct DTagItem
78 {
79         dtag_t tag;
80         dval_t val;
81 } DTagItem;
82
83 /*! Marker to indicate the end of a map for message filtering/translating */
84 #define TAG_END_MARKER {{TAG_END, 0}, {TAG_END, 0}}
85 #endif