|
21
|
1 |
// |
|
|
2 |
// Copyright (C) 2009 Fajran Iman Rusadi |
|
|
3 |
// |
|
|
4 |
// This program is free software: you can redistribute it and/or modify |
|
|
5 |
// it under the terms of the GNU General Public License as published by |
|
|
6 |
// the Free Software Foundation, either version 3 of the License, or |
|
|
7 |
// (at your option) any later version. |
|
|
8 |
// |
|
|
9 |
// This program is distributed in the hope that it will be useful, |
|
|
10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
12 |
// GNU General Public License for more details. |
|
|
13 |
// |
|
|
14 |
// You should have received a copy of the GNU General Public License |
|
|
15 |
// along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
16 |
// |
|
|
17 |
|
|
28
|
18 |
/* |
|
|
19 |
Modified by alexandre.bastien@iri.centrepompidou.fr to manage TUIO strings. |
|
|
20 |
*/ |
|
|
21 |
|
|
21
|
22 |
#ifndef CLIENT_H_ |
|
|
23 |
#define CLIENT_H_ |
|
|
24 |
|
|
27
|
25 |
#include <string> |
|
|
26 |
|
|
21
|
27 |
enum TuioEvent { |
|
28
|
28 |
TE_OBJECT_ADD = 0, |
|
|
29 |
TE_OBJECT_UPDATE = 1, |
|
|
30 |
TE_OBJECT_REMOVE = 2, |
|
|
31 |
TE_CURSOR_ADD = 3, |
|
|
32 |
TE_CURSOR_UPDATE = 4, |
|
|
33 |
TE_CURSOR_REMOVE = 5, |
|
|
34 |
/* |
|
|
35 |
* Ajouté par alexandre.bastien@iri.centrepompidou.fr |
|
|
36 |
*/ |
|
|
37 |
TE_STRING_ADD = 6, |
|
|
38 |
TE_STRING_UPDATE = 7, |
|
|
39 |
TE_STRING_REMOVE = 8, |
|
21
|
40 |
}; |
|
|
41 |
|
|
|
42 |
typedef struct { |
|
28
|
43 |
TuioEvent type; |
|
|
44 |
long fid; |
|
|
45 |
int sid; |
|
|
46 |
float x; |
|
|
47 |
float y; |
|
|
48 |
float z; |
|
|
49 |
float a; |
|
|
50 |
//Ajouté par alexandre.bastien@iri.centrepompidou.fr |
|
|
51 |
const char* code; |
|
21
|
52 |
} TuioEventData; |
|
|
53 |
|
|
27
|
54 |
/*void tuio_start(int); |
|
|
55 |
void tuio_stop();*/ |
|
21
|
56 |
|
|
|
57 |
extern void tuio_callback(TuioEventData); |
|
|
58 |
|
|
28
|
59 |
extern "C" |
|
|
60 |
{ |
|
|
61 |
__declspec(dllexport) void tuio_start(int); |
|
|
62 |
__declspec(dllexport) void tuio_stop(void); |
|
|
63 |
__declspec(dllexport) void t(void); |
|
27
|
64 |
} |
|
|
65 |
|
|
21
|
66 |
#endif |
|
|
67 |
|