forked from projectM-visualizer/projectm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lvtoprojectM.h
executable file
·156 lines (150 loc) · 3.89 KB
/
lvtoprojectM.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/**
* projectM -- Milkdrop-esque visualisation SDK
* Copyright (C)2003-2007 projectM Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* See 'LICENSE.txt' included within this release
*
*/
/**
* $Id: sdltoprojectM.hpp,v 1.1 2004/10/08 00:35:28 cvs Exp $
*
* Translates SDL -> projectM variables
*
* $Log: sdltoprojectM.hpp,v $
* Revision 1.1 2004/10/08 00:35:28 cvs
* Moved and imported
*
* Revision 1.1.1.1 2004/10/04 12:56:00 cvs
* Imported
*
*/
#include <libvisual/libvisual.h>
projectMEvent lv2pmEvent( VisEventType event ) {
switch ( event ) {
case VISUAL_EVENT_RESIZE:
return PROJECTM_VIDEORESIZE;
case VISUAL_EVENT_KEYUP:
return PROJECTM_KEYUP;
case VISUAL_EVENT_KEYDOWN:
return PROJECTM_KEYDOWN;
default:
return PROJECTM_KEYUP;
}
}
projectMKeycode lv2pmKeycode( VisKey keysym )
{
switch ( keysym )
{
case VKEY_F1:
return PROJECTM_K_F1;
case VKEY_F2:
return PROJECTM_K_F2;
case VKEY_F3:
return PROJECTM_K_F3;
case VKEY_F4:
return PROJECTM_K_F4;
case VKEY_F5:
return PROJECTM_K_F5;
case VKEY_F6:
return PROJECTM_K_F6;
case VKEY_F7:
return PROJECTM_K_F7;
case VKEY_F8:
return PROJECTM_K_F8;
case VKEY_F9:
return PROJECTM_K_F9;
case VKEY_F10:
return PROJECTM_K_F10;
case VKEY_F11:
return PROJECTM_K_F11;
case VKEY_F12:
return PROJECTM_K_F12;
case VKEY_ESCAPE:
return PROJECTM_K_ESCAPE;
case VKEY_a:
return PROJECTM_K_a;
case VKEY_b:
return PROJECTM_K_b;
case VKEY_c:
return PROJECTM_K_c;
case VKEY_d:
return PROJECTM_K_d;
case VKEY_e:
return PROJECTM_K_e;
case VKEY_f:
return PROJECTM_K_f;
case VKEY_g:
return PROJECTM_K_g;
case VKEY_h:
return PROJECTM_K_h;
case VKEY_i:
return PROJECTM_K_i;
case VKEY_j:
return PROJECTM_K_j;
case VKEY_k:
return PROJECTM_K_k;
case VKEY_l:
return PROJECTM_K_l;
case VKEY_m:
return PROJECTM_K_m;
case VKEY_n:
return PROJECTM_K_n;
case VKEY_o:
return PROJECTM_K_o;
case VKEY_p:
return PROJECTM_K_p;
case VKEY_q:
return PROJECTM_K_q;
case VKEY_r:
return PROJECTM_K_r;
case VKEY_s:
return PROJECTM_K_s;
case VKEY_t:
return PROJECTM_K_t;
case VKEY_u:
return PROJECTM_K_u;
case VKEY_v:
return PROJECTM_K_v;
case VKEY_w:
return PROJECTM_K_w;
case VKEY_x:
return PROJECTM_K_x;
case VKEY_y:
return PROJECTM_K_y;
case VKEY_z:
return PROJECTM_K_z;
case VKEY_UP:
return PROJECTM_K_UP;
case VKEY_RETURN:
return PROJECTM_K_RETURN;
case VKEY_RIGHT:
return PROJECTM_K_RIGHT;
case VKEY_LEFT:
return PROJECTM_K_LEFT;
case VKEY_DOWN:
return PROJECTM_K_DOWN;
case VKEY_PAGEUP:
return PROJECTM_K_PAGEUP;
case VKEY_PAGEDOWN:
return PROJECTM_K_PAGEDOWN;
default:
return PROJECTM_K_NONE;
break;
}
}
projectMModifier lv2pmModifier( int mod ) {
return mod && VKMOD_LSHIFT;
}