Blob Blame Raw
#ifndef TOUCH_H
#define TOUCH_H


#include "common.h"

#ifdef DIRECT_TOUCH
#include <mtdev.h>
#endif


#define TOUCH_FIELDS 3


typedef struct Touch {
  App *app;
  int fd;
  #ifdef DIRECT_TOUCH
  struct mtdev dev;
  #endif

  int slot, id, pressed;
  int fields[TOUCH_FIELDS][3];
} Touch;


int touchInit(Touch *touch, App *app, const char *dev);
void touchDeinit(Touch *touch);
int touchGet(Touch *touch, int *x, int *y, int *p);


#endif