annotate touchTest/touchPong.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 //Pong Code
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 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
24
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 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
26 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
27 } 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
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 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
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 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
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
33 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
34 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
35 }
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 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
38 {
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 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
40 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
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
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 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
45 {
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 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
47 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
48
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 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
50 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
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 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
53
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 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
55 *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
56 }
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 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
59 {
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
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 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
62 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
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 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
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 }
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 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
69 {
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 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
71 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
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 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
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(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
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 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
78 {
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 //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
80 //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
81 //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
82 //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
83 //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
84 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
85 }
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 }
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 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
88 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
89 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
90 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
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 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
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 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
95 }
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 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
98 {
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 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
100 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
101 }
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 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
104 {
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 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
106 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
107 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
108 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
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
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
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 //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
113 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
114 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
115 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
116 }
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
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 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
119 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
120
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 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
122 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
123
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 //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
125 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
126 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
127
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 //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
129 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
130 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
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
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
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 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
137 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
138
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 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
140 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
141 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
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
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
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 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
146 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
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 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
149 {
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 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
151 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
152 }
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 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
154 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
155 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
156 {
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 //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
158 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
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 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
161 {
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 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
163 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
164 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
165 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
166 //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
167 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
168 //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
169 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
170 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
171 //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
172 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
173 //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
174 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
175 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
176 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
177 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
178 {
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 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
180 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
181 }
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 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
183 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
184 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
185 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
186 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
187 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
188 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
189 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
190 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
191 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
192 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
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 }
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
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 //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
197 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
198 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
199 //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
200 // 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
201 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
202 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
203 {
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 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
205 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
206 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
207 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
208 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
209 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
210 {
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 //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
212 // 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
213 }
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 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
215 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
216 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
217 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
218 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
219 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
220 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
221 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
222 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
223 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
224 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
225
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 //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
227 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
228 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
229 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
230
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 }
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 //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
233 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
234 /*
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 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
236 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
237 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
238 */
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 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
241
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
242 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
243 }