summaryrefslogtreecommitdiff
path: root/src/grail-api.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2011-04-28 15:41:49 +0200
committerHenrik Rydberg <rydberg@euromail.se>2011-04-28 16:58:51 +0200
commitb605a93a85d8ead753d87a2da5a0e40571d6f275 (patch)
treed67a4dcae7176e065da7e302503abf0934c07bc4 /src/grail-api.c
parentc3fdf90535e9e4a29d6d846071a50679d9646bcf (diff)
Expose utouch-frame through grail API
Start a gentle API change by exposing utouch-frame through grail, and deprecating the grail_contact struct. Old programs compile and run fine. To only use the new api, compile with -DGRAIL_NO_LEGACY_API. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/grail-api.c')
-rw-r--r--src/grail-api.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/grail-api.c b/src/grail-api.c
index 1236205..6ef4b7d 100644
--- a/src/grail-api.c
+++ b/src/grail-api.c
@@ -20,9 +20,9 @@
20 * 20 *
21 ****************************************************************************/ 21 ****************************************************************************/
22 22
23#include "grail-impl.h"
23#include "grail-inserter.h" 24#include "grail-inserter.h"
24#include "grail-recognizer.h" 25#include "grail-recognizer.h"
25#include "grail-impl.h"
26#include <string.h> 26#include <string.h>
27#include <stdio.h> 27#include <stdio.h>
28#include <unistd.h> 28#include <unistd.h>
@@ -35,10 +35,9 @@
35#define DIM_FRAMES 100 35#define DIM_FRAMES 100
36#define FRAME_RATE 100 36#define FRAME_RATE 100
37 37
38void GRAIL_PUBLIC grail_filter_abs_events(struct grail *ge, int usage) 38unsigned int GRAIL_PUBLIC grail_get_version(void)
39{ 39{
40 struct grail_impl *x = ge->impl; 40 return GRAIL_VERSION;
41 x->filter_abs = usage;
42} 41}
43 42
44int GRAIL_PUBLIC grail_open(struct grail *ge, int fd) 43int GRAIL_PUBLIC grail_open(struct grail *ge, int fd)
@@ -152,6 +151,12 @@ void GRAIL_PUBLIC grail_get_units(const struct grail *ge,
152 max->y = s->max_y; 151 max->y = s->max_y;
153} 152}
154 153
154const struct utouch_frame GRAIL_PUBLIC *
155grail_get_contact_frame(const struct grail *ge)
156{
157 return ge->impl->frame;
158}
159
155static void flush_events(struct grail *ge) 160static void flush_events(struct grail *ge)
156{ 161{
157 struct grail_impl *impl = ge->impl; 162 struct grail_impl *impl = ge->impl;