If anyone wants to know how to call GetTouchInfo() (or any other function) if it isn't part of their SDK, here's some simple example code showing how to do it:
Code:
#include <stdio.h>
#include <dlfcn.h>
#define EVT_MTSYNC 39
#define EVT_POINTERDRAG 44
typedef struct iv_mtinfo_s {
int active;
int x;
int y;
int pressure;
int rsv_1;
int rsv_2;
} iv_mtinfo;
iv_mtinfo* (*gti)(void); /* Pointer to GetTouchInfo() function. */
int main_handler(int type, int par1, int par2) {
void *handle;
iv_mtinfo *mti;
int i;
if (type == EVT_INIT) {
if ((handle = dlopen("libinkview.so", RTLD_LAZY))) {
*(void **) (>i) = dlsym(handle, "GetTouchInfo");
dlclose(handle);
} else
gti = NULL;
}
if type == EVT_MTSYNC) {
if (gti && (mti = (*gti)())) {
for (i = 0; i < par2; i++)
printf(" x = %d, y = %d\n", mti[i].x, mti[i].y);
}
}
return 0;
}
Hopefully, this will go away when a new SDK comes out.