Two in one:
[blender.git] / source / blender / src / eventdebug.c
1 /**
2  * $Id$
3  *
4  * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version. The Blender
10  * Foundation also sells licenses for use in proprietary software under
11  * the Blender License.  See http://www.blender.org/BL/ for information
12  * about this.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22  *
23  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24  * All rights reserved.
25  *
26  * The Original Code is: all of this file.
27  *
28  * Contributor(s): none yet.
29  *
30  * ***** END GPL/BL DUAL LICENSE BLOCK *****
31  */
32 #include "mydevice.h"
33 #include "blendef.h"
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 char *event_to_string(short);
40
41 char *event_to_string(short evt) {
42 #define smap(evt)       case evt: return #evt
43         switch (evt) {
44         default: return "<unknown>";
45         smap(CHANGED);
46         smap(DRAWEDGES);
47         smap(BACKBUFDRAW);
48         smap(EXECUTE);
49         smap(LOAD_FILE);
50         smap(RESHAPE);
51         smap(UI_BUT_EVENT);
52         smap(REDRAWVIEW3D);
53         smap(REDRAWVIEWCAM);
54         smap(REDRAWHEADERS);
55         smap(REDRAWVIEW3D_Z);
56         smap(REDRAWALL);
57         smap(REDRAWINFO);
58         smap(RENDERPREVIEW);
59         smap(REDRAWIPO);
60         smap(REDRAWDATASELECT);
61         smap(REDRAWSEQ);
62         smap(REDRAWIMAGE);
63         smap(REDRAWOOPS);
64         smap(REDRAWIMASEL);
65         smap(AFTERIMASELIMA);
66         smap(AFTERIMASELGET);
67         smap(AFTERIMAWRITE);
68         smap(IMALEFTMOUSE);
69         smap(AFTERPIBREAD);
70         smap(REDRAWTEXT);
71         smap(REDRAWSCRIPT);
72         smap(REDRAWACTION);
73         smap(LEFTMOUSE);
74         smap(MIDDLEMOUSE);
75         smap(RIGHTMOUSE);
76         smap(MOUSEX);
77         smap(MOUSEY);
78         smap(TIMER0);
79         smap(TIMER1);
80         smap(TIMER2);
81         smap(TIMER3);
82         smap(KEYBD);
83         smap(RAWKEYBD);
84         smap(REDRAW);
85         smap(INPUTCHANGE);
86         smap(QFULL);
87         smap(WINFREEZE);
88         smap(WINTHAW);
89         smap(WINCLOSE);
90         smap(WINQUIT);
91         smap(Q_FIRSTTIME);
92         smap(AKEY);
93         smap(BKEY);
94         smap(CKEY);
95         smap(DKEY);
96         smap(EKEY);
97         smap(FKEY);
98         smap(GKEY);
99         smap(HKEY);
100         smap(IKEY);
101         smap(JKEY);
102         smap(KKEY);
103         smap(LKEY);
104         smap(MKEY);
105         smap(NKEY);
106         smap(OKEY);
107         smap(PKEY);
108         smap(QKEY);
109         smap(RKEY);
110         smap(SKEY);
111         smap(TKEY);
112         smap(UKEY);
113         smap(VKEY);
114         smap(WKEY);
115         smap(XKEY);
116         smap(YKEY);
117         smap(ZKEY);
118         smap(ZEROKEY);
119         smap(ONEKEY);
120         smap(TWOKEY);
121         smap(THREEKEY);
122         smap(FOURKEY);
123         smap(FIVEKEY);
124         smap(SIXKEY);
125         smap(SEVENKEY);
126         smap(EIGHTKEY);
127         smap(NINEKEY);
128         smap(CAPSLOCKKEY);
129         smap(LEFTCTRLKEY);
130         smap(LEFTALTKEY);
131         smap(RIGHTALTKEY);
132         smap(RIGHTCTRLKEY);
133         smap(RIGHTSHIFTKEY);
134         smap(LEFTSHIFTKEY);
135         smap(ESCKEY);
136         smap(TABKEY);
137         smap(RETKEY);
138         smap(SPACEKEY);
139         smap(LINEFEEDKEY);
140         smap(BACKSPACEKEY);
141         smap(DELKEY);
142         smap(SEMICOLONKEY);
143         smap(PERIODKEY);
144         smap(COMMAKEY);
145         smap(QUOTEKEY);
146         smap(ACCENTGRAVEKEY);
147         smap(MINUSKEY);
148         smap(SLASHKEY);
149         smap(BACKSLASHKEY);
150         smap(EQUALKEY);
151         smap(LEFTBRACKETKEY);
152         smap(RIGHTBRACKETKEY);
153         smap(LEFTARROWKEY);
154         smap(DOWNARROWKEY);
155         smap(RIGHTARROWKEY);
156         smap(UPARROWKEY);
157         smap(PAD0);
158         smap(PAD1);
159         smap(PAD2);
160         smap(PAD3);
161         smap(PAD4);
162         smap(PAD5);
163         smap(PAD6);
164         smap(PAD7);
165         smap(PAD8);
166         smap(PAD9);
167         smap(PADPERIOD);
168         smap(PADSLASHKEY);
169         smap(PADASTERKEY);
170         smap(PADMINUS);
171         smap(PADENTER);
172         smap(PADPLUSKEY);
173         smap(F1KEY);
174         smap(F2KEY);
175         smap(F3KEY);
176         smap(F4KEY);
177         smap(F5KEY);
178         smap(F6KEY);
179         smap(F7KEY);
180         smap(F8KEY);
181         smap(F9KEY);
182         smap(F10KEY);
183         smap(F11KEY);
184         smap(F12KEY);
185         smap(PAUSEKEY);
186         smap(INSERTKEY);
187         smap(HOMEKEY);
188         smap(PAGEUPKEY);
189         smap(PAGEDOWNKEY);
190         smap(ENDKEY);
191         smap(REDRAWNLA);
192         smap(ONLOAD_SCRIPT);
193         }
194         #undef smap
195 }