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