Initial revision
[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 char *event_to_string(short evt) {
36 #define smap(evt)       case evt: return #evt
37         switch (evt) {
38         default: return "<unknown>";
39         smap(CHANGED);
40         smap(DRAWEDGES);
41         smap(BACKBUFDRAW);
42         smap(EXECUTE);
43         smap(LOAD_FILE);
44         smap(RESHAPE);
45         smap(UI_BUT_EVENT);
46         smap(REDRAWVIEW3D);
47         smap(REDRAWBUTSHEAD);
48         smap(REDRAWBUTSALL);
49         smap(REDRAWBUTSVIEW);
50         smap(REDRAWBUTSLAMP);
51         smap(REDRAWBUTSMAT);
52         smap(REDRAWBUTSTEX);
53         smap(REDRAWBUTSANIM);
54         smap(REDRAWBUTSWORLD);
55         smap(REDRAWBUTSRENDER);
56         smap(REDRAWBUTSEDIT);
57         smap(REDRAWVIEWCAM);
58         smap(REDRAWHEADERS);
59         smap(REDRAWBUTSGAME);
60         smap(REDRAWBUTSRADIO);
61         smap(REDRAWVIEW3D_Z);
62         smap(REDRAWALL);
63         smap(REDRAWINFO);
64         smap(RENDERPREVIEW);
65         smap(REDRAWIPO);
66         smap(REDRAWDATASELECT);
67         smap(REDRAWSEQ);
68         smap(REDRAWIMAGE);
69         smap(REDRAWOOPS);
70         smap(REDRAWIMASEL);
71         smap(AFTERIMASELIMA);
72         smap(AFTERIMASELGET);
73         smap(AFTERIMAWRITE);
74         smap(IMALEFTMOUSE);
75         smap(AFTERPIBREAD);
76         smap(REDRAWTEXT);
77         smap(REDRAWBUTSSCRIPT);
78         smap(REDRAWSOUND);
79         smap(REDRAWBUTSSOUND);
80         smap(REDRAWACTION);
81         smap(LEFTMOUSE);
82         smap(MIDDLEMOUSE);
83         smap(RIGHTMOUSE);
84         smap(MOUSEX);
85         smap(MOUSEY);
86         smap(TIMER0);
87         smap(TIMER1);
88         smap(TIMER2);
89         smap(TIMER3);
90         smap(KEYBD);
91         smap(RAWKEYBD);
92         smap(REDRAW);
93         smap(INPUTCHANGE);
94         smap(QFULL);
95         smap(WINFREEZE);
96         smap(WINTHAW);
97         smap(WINCLOSE);
98         smap(WINQUIT);
99         smap(Q_FIRSTTIME);
100         smap(AKEY);
101         smap(BKEY);
102         smap(CKEY);
103         smap(DKEY);
104         smap(EKEY);
105         smap(FKEY);
106         smap(GKEY);
107         smap(HKEY);
108         smap(IKEY);
109         smap(JKEY);
110         smap(KKEY);
111         smap(LKEY);
112         smap(MKEY);
113         smap(NKEY);
114         smap(OKEY);
115         smap(PKEY);
116         smap(QKEY);
117         smap(RKEY);
118         smap(SKEY);
119         smap(TKEY);
120         smap(UKEY);
121         smap(VKEY);
122         smap(WKEY);
123         smap(XKEY);
124         smap(YKEY);
125         smap(ZKEY);
126         smap(ZEROKEY);
127         smap(ONEKEY);
128         smap(TWOKEY);
129         smap(THREEKEY);
130         smap(FOURKEY);
131         smap(FIVEKEY);
132         smap(SIXKEY);
133         smap(SEVENKEY);
134         smap(EIGHTKEY);
135         smap(NINEKEY);
136         smap(CAPSLOCKKEY);
137         smap(LEFTCTRLKEY);
138         smap(LEFTALTKEY);
139         smap(RIGHTALTKEY);
140         smap(RIGHTCTRLKEY);
141         smap(RIGHTSHIFTKEY);
142         smap(LEFTSHIFTKEY);
143         smap(ESCKEY);
144         smap(TABKEY);
145         smap(RETKEY);
146         smap(SPACEKEY);
147         smap(LINEFEEDKEY);
148         smap(BACKSPACEKEY);
149         smap(DELKEY);
150         smap(SEMICOLONKEY);
151         smap(PERIODKEY);
152         smap(COMMAKEY);
153         smap(QUOTEKEY);
154         smap(ACCENTGRAVEKEY);
155         smap(MINUSKEY);
156         smap(SLASHKEY);
157         smap(BACKSLASHKEY);
158         smap(EQUALKEY);
159         smap(LEFTBRACKETKEY);
160         smap(RIGHTBRACKETKEY);
161         smap(LEFTARROWKEY);
162         smap(DOWNARROWKEY);
163         smap(RIGHTARROWKEY);
164         smap(UPARROWKEY);
165         smap(PAD0);
166         smap(PAD1);
167         smap(PAD2);
168         smap(PAD3);
169         smap(PAD4);
170         smap(PAD5);
171         smap(PAD6);
172         smap(PAD7);
173         smap(PAD8);
174         smap(PAD9);
175         smap(PADPERIOD);
176         smap(PADSLASHKEY);
177         smap(PADASTERKEY);
178         smap(PADMINUS);
179         smap(PADENTER);
180         smap(PADPLUSKEY);
181         smap(F1KEY);
182         smap(F2KEY);
183         smap(F3KEY);
184         smap(F4KEY);
185         smap(F5KEY);
186         smap(F6KEY);
187         smap(F7KEY);
188         smap(F8KEY);
189         smap(F9KEY);
190         smap(F10KEY);
191         smap(F11KEY);
192         smap(F12KEY);
193         smap(PAUSEKEY);
194         smap(INSERTKEY);
195         smap(HOMEKEY);
196         smap(PAGEUPKEY);
197         smap(PAGEDOWNKEY);
198         smap(ENDKEY);
199         smap(REDRAWBUTSCONSTRAINT);
200         smap(REDRAWNLA);
201         }
202         #undef smap
203 }