annotate touchTest/touchSimp.c~ @ 4679:5ee96ba0c01e

Fixed various type and print format issues
author Sam Lantinga <slouken@libsdl.org>
date Sat, 31 Jul 2010 20:38:37 -0700
parents f5cd4b6231ba
children
rev   line source
4639
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
1 #include <stdio.h>
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
2 #include <SDL.h>
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
3 #include <math.h>
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
4 #include <linux/input.h>
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
5 #include <fcntl.h>
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
6
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
7
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
8 #define PI 3.1415926535897
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
9 #define WIDTH 640
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
10 #define HEIGHT 480
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
11 #define BPP 4
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
12 #define DEPTH 32
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
13
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
14
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
15 #define MAX_FINGERS 2
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
16
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
17 int mousx,mousy;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
18 int keystat[512];
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
19 int bstatus;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
20
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
21
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
22
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
23 typedef struct {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
24 int x,y;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
25 } Point;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
26
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
27 Point finger[MAX_FINGERS];
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
28
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
29 void handler (int sig)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
30 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
31 printf ("\nexiting...(%d)\n", sig);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
32 exit (0);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
33 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
34
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
35 void perror_exit (char *error)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
36 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
37 perror (error);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
38 handler (9);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
39 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
40
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
41
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
42 void setpix(SDL_Surface *screen, int x, int y, int col)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
43 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
44 Uint32 *pixmem32;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
45 Uint32 colour;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
46
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
47 if((unsigned)x > screen->w) return;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
48 if((unsigned)y > screen->h) return;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
49
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
50 colour = SDL_MapRGB( screen->format, (col>>16)&0xFF, (col>>8)&0xFF, col&0xFF);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
51
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
52 pixmem32 = (Uint32*) screen->pixels + y*screen->pitch/BPP + x;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
53 *pixmem32 = colour;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
54 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
55
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
56 void drawCircle(SDL_Surface* screen,int x,int y,int r,int c)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
57 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
58
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
59 float a;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
60 for(a=0;a<2*PI;a+=1.f/(float)r)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
61 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
62 setpix(screen,(int)(x+r*cos(a)),(int)(y+r*sin(a)),c);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
63 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
64 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
65
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
66 void DrawScreen(SDL_Surface* screen, int h)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
67 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
68 int x, y, xm,ym,c;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
69 if(SDL_MUSTLOCK(screen))
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
70 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
71 if(SDL_LockSurface(screen) < 0) return;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
72 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
73 for(y = 0; y < screen->h; y++ )
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
74 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
75 for( x = 0; x < screen->w; x++ )
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
76 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
77 //setpixel(screen, x, y, (x*x)/256+3*y+h, (y*y)/256+x+h, h);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
78 //xm = (x+h)%screen->w;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
79 //ym = (y+h)%screen->w;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
80 //c = sin(h/256*2*PI)*x*y/screen->w/screen->h;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
81 //setpix(screen,x,y,255*sin(xm/screen->w*2*PI),sin(h/255*2*PI)*255*y/screen->h,c);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
82 setpix(screen,x,y,((x%255)<<16) + ((y%255)<<8) + (x+y)%255);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
83 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
84 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
85 drawCircle(screen,mousx,mousy,30,0xFFFFFF);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
86 int i;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
87 for(i=0;i<MAX_FINGERS;i++)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
88 drawCircle(screen,finger[i].x,finger[i].y,30,0xFFFFFF);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
89
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
90 if(SDL_MUSTLOCK(screen)) SDL_UnlockSurface(screen);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
91
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
92 SDL_Flip(screen);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
93 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
94
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
95 SDL_Surface* initScreen(int width,int height)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
96 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
97 return SDL_SetVideoMode(width, height, DEPTH,
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
98 SDL_HWSURFACE | SDL_RESIZABLE);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
99 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
100
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
101 int main(int argc, char* argv[])
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
102 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
103 struct input_event ev[64];
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
104 int fd, rd, value, size = sizeof (struct input_event);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
105 char name[256] = "Unknown";
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
106 char *device = NULL;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
107
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
108
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
109
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
110 //Setup check
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
111 if (argv[1] == NULL){
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
112 printf("Please specify (on the command line) the path to the dev event interface device\n");
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
113 exit (0);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
114 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
115
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
116 if ((getuid ()) != 0)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
117 printf ("You are not root! This may not work...\n");
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
118
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
119 if (argc > 1)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
120 device = argv[1];
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
121
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
122 //Open Device
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
123 if ((fd = open (device, O_RDONLY)) == -1)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
124 printf ("%s is not a vaild device.\n", device);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
125
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
126 //Print Device Name
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
127 ioctl (fd, EVIOCGNAME (sizeof (name)), name);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
128 printf ("Reading From : %s (%s)\n", device, name);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
129
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
130
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
131
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
132
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
133
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
134 SDL_Surface *screen;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
135 SDL_Event event;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
136
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
137 int keypress = 0;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
138 int h=0,s=1,i,j;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
139 int tx,ty,curf=0;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
140
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
141 Point ball,ballv;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
142
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
143 memset(keystat,0,512*sizeof(keystat[0]));
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
144 if (SDL_Init(SDL_INIT_VIDEO) < 0 ) return 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
145
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
146 if (!(screen = initScreen(WIDTH,HEIGHT)))
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
147 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
148 SDL_Quit();
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
149 return 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
150 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
151 ball.x = screen->width()/2;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
152 ball.y = screen->height()/2;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
153 while(!keystat[27])
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
154 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
155 //Poll SDL
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
156 while(SDL_PollEvent(&event))
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
157 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
158 switch (event.type)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
159 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
160 case SDL_QUIT:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
161 keystat[27] = 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
162 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
163 case SDL_KEYDOWN:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
164 //printf("%i\n",event.key.keysym.sym);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
165 keystat[event.key.keysym.sym] = 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
166 //keypress = 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
167 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
168 case SDL_KEYUP:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
169 //printf("%i\n",event.key.keysym.sym);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
170 keystat[event.key.keysym.sym] = 0;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
171 //keypress = 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
172 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
173 case SDL_VIDEORESIZE:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
174 if (!(screen = initScreen(event.resize.w,
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
175 event.resize.h)))
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
176 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
177 SDL_Quit();
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
178 return 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
179 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
180 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
181 case SDL_MOUSEMOTION:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
182 mousx = event.motion.x;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
183 mousy = event.motion.y;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
184 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
185 case SDL_MOUSEBUTTONDOWN:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
186 bstatus |= (1<<(event.button.button-1));
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
187 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
188 case SDL_MOUSEBUTTONUP:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
189 bstatus &= ~(1<<(event.button.button-1));
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
190 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
191 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
192 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
193
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
194 //poll for Touch <- Goal: make this a case:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
195 if ((rd = read (fd, ev, size * 64)) < size)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
196 perror_exit ("read()");
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
197 //printf("time: %i\n type: %X\n code: %X\n value: %i\n ",
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
198 // ev->time,ev->type,ev->code,ev->value);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
199 for (i = 0; i < rd / sizeof(struct input_event); i++)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
200 switch (ev[i].type)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
201 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
202 case EV_ABS:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
203 if(ev[i].code == ABS_X)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
204 tx = ev[i].value;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
205 else if (ev[i].code == ABS_Y)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
206 ty = ev[i].value;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
207 else if (ev[i].code == ABS_MISC)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
208 {
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
209 //printf("Misc:type: %X\n code: %X\n value: %i\n ",
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
210 // ev[i].type,ev[i].code,ev[i].value);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
211 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
212 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
213 case EV_MSC:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
214 if(ev[i].code == MSC_SERIAL)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
215 curf = ev[i].value;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
216 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
217 case EV_SYN:
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
218 curf -= 1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
219 if(tx >= 0)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
220 finger[curf].x = tx;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
221 if(ty >= 0)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
222 finger[curf].y = ty;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
223
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
224 //printf("Synched: %i tx: %i, ty: %i\n",curf,finger[curf].x,finger[curf].y);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
225 tx = -1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
226 ty = -1;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
227 break;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
228
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
229 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
230 //And draw
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
231 DrawScreen(screen,h);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
232 /*
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
233 for(i=0;i<512;i++)
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
234 if(keystat[i]) printf("%i\n",i);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
235 printf("Buttons:%i\n",bstatus);
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
236 */
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
237 }
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
238 SDL_Quit();
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
239
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
240 return 0;
f5cd4b6231ba Added Test Directory. Touch input works in touchSimp for wacom bamboo fun on Ubuntu linux. Not yet integrated into library. Should support other touch devices and other linux distros, but not tested on anything else.
Jim Grandpre <jim.tla@gmail.com>
parents:
diff changeset
241 }