summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am5
-rw-r--r--src/grail-api.c14
-rw-r--r--src/grail-bits.c12
-rw-r--r--src/grail-event.c4
-rw-r--r--src/grail-inserter.c6
5 files changed, 22 insertions, 19 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index da1a46e..c344342 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,6 @@ lib_LTLIBRARIES = libutouch-grail.la
2 2
3libutouch_grail_la_LDFLAGS = \ 3libutouch_grail_la_LDFLAGS = \
4 -version-info @LIB_VERSION@ \ 4 -version-info @LIB_VERSION@ \
5 -export-symbols ../utouch-grail.sym \
6 -lm \ 5 -lm \
7 $(MTDEV_LIBS) \ 6 $(MTDEV_LIBS) \
8 $(EVEMU_LIBS) \ 7 $(EVEMU_LIBS) \
@@ -28,7 +27,9 @@ libutouch_grail_la_SOURCES = \
28 grail-impl.h \ 27 grail-impl.h \
29 grail-api.c 28 grail-api.c
30 29
31AM_CFLAGS = $(CWARNFLAGS) 30# These are flags required to properly set up
31# the build. -fvisibility requires GCC > 4 (or clang)
32AM_CFLAGS = $(CWARNFLAGS) -DBUILDING_GRAIL -fvisibility=hidden
32 33
33INCLUDES = -I$(top_srcdir)/include/ 34INCLUDES = -I$(top_srcdir)/include/
34 35
diff --git a/src/grail-api.c b/src/grail-api.c
index 5a0beb4..259f5a0 100644
--- a/src/grail-api.c
+++ b/src/grail-api.c
@@ -34,13 +34,13 @@
34#define DIM_FRAMES 100 34#define DIM_FRAMES 100
35#define FRAME_RATE 100 35#define FRAME_RATE 100
36 36
37void grail_filter_abs_events(struct grail *ge, int usage) 37void GRAIL_PUBLIC grail_filter_abs_events(struct grail *ge, int usage)
38{ 38{
39 struct grail_impl *x = ge->impl; 39 struct grail_impl *x = ge->impl;
40 x->filter_abs = usage; 40 x->filter_abs = usage;
41} 41}
42 42
43int grail_open(struct grail *ge, int fd) 43int GRAIL_PUBLIC grail_open(struct grail *ge, int fd)
44{ 44{
45 struct grail_impl *x; 45 struct grail_impl *x;
46 struct stat fs; 46 struct stat fs;
@@ -116,7 +116,7 @@ int grail_open(struct grail *ge, int fd)
116 return ret; 116 return ret;
117} 117}
118 118
119void grail_close(struct grail *ge, int fd) 119void GRAIL_PUBLIC grail_close(struct grail *ge, int fd)
120{ 120{
121 struct grail_impl *x = ge->impl; 121 struct grail_impl *x = ge->impl;
122 gru_destroy(ge); 122 gru_destroy(ge);
@@ -131,7 +131,7 @@ void grail_close(struct grail *ge, int fd)
131 ge->impl = 0; 131 ge->impl = 0;
132} 132}
133 133
134int grail_idle(struct grail *ge, int fd, int ms) 134int GRAIL_PUBLIC grail_idle(struct grail *ge, int fd, int ms)
135{ 135{
136 struct grail_impl *x = ge->impl; 136 struct grail_impl *x = ge->impl;
137 if (x->fptest) 137 if (x->fptest)
@@ -141,8 +141,8 @@ int grail_idle(struct grail *ge, int fd, int ms)
141 return 1; 141 return 1;
142} 142}
143 143
144void grail_get_units(const struct grail *ge, 144void GRAIL_PUBLIC grail_get_units(const struct grail *ge,
145 struct grail_coord *min, struct grail_coord *max) 145 struct grail_coord *min, struct grail_coord *max)
146{ 146{
147 struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh); 147 struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh);
148 min->x = s->min_x; 148 min->x = s->min_x;
@@ -287,7 +287,7 @@ static int grail_pull_fstest(struct grail *ge, int fd)
287 return count > 0 ? count : -1; 287 return count > 0 ? count : -1;
288} 288}
289 289
290int grail_pull(struct grail *ge, int fd) 290int GRAIL_PUBLIC grail_pull(struct grail *ge, int fd)
291{ 291{
292 struct grail_impl *impl = ge->impl; 292 struct grail_impl *impl = ge->impl;
293 struct input_event ev; 293 struct input_event ev;
diff --git a/src/grail-bits.c b/src/grail-bits.c
index 4c8b941..8ebfb18 100644
--- a/src/grail-bits.c
+++ b/src/grail-bits.c
@@ -46,19 +46,21 @@ static const int grail_first_set_bit[256] =
46 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, 46 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
47}; 47};
48 48
49void grail_mask_set_mask(grail_mask_t *a, const grail_mask_t *b, int bytes) 49void GRAIL_PUBLIC grail_mask_set_mask(grail_mask_t *a, const grail_mask_t *b,
50 int bytes)
50{ 51{
51 while (bytes--) 52 while (bytes--)
52 *a++ |= *b++; 53 *a++ |= *b++;
53} 54}
54 55
55void grail_mask_clear_mask(grail_mask_t *a, const grail_mask_t *b, int bytes) 56void GRAIL_PUBLIC grail_mask_clear_mask(grail_mask_t *a, const grail_mask_t *b,
57 int bytes)
56{ 58{
57 while (bytes--) 59 while (bytes--)
58 *a++ &= ~*b++; 60 *a++ &= ~*b++;
59} 61}
60 62
61int grail_mask_count(const grail_mask_t *mask, int bytes) 63int GRAIL_PUBLIC grail_mask_count(const grail_mask_t *mask, int bytes)
62{ 64{
63 int count = 0; 65 int count = 0;
64 while (bytes--) 66 while (bytes--)
@@ -66,7 +68,7 @@ int grail_mask_count(const grail_mask_t *mask, int bytes)
66 return count; 68 return count;
67} 69}
68 70
69int grail_mask_get_first(const grail_mask_t *mask, int bytes) 71int GRAIL_PUBLIC grail_mask_get_first(const grail_mask_t *mask, int bytes)
70{ 72{
71 int k; 73 int k;
72 for (k = 0; k < bytes; k++) 74 for (k = 0; k < bytes; k++)
@@ -75,7 +77,7 @@ int grail_mask_get_first(const grail_mask_t *mask, int bytes)
75 return -1; 77 return -1;
76} 78}
77 79
78int grail_mask_get_next(int i, const grail_mask_t *mask, int bytes) 80int GRAIL_PUBLIC grail_mask_get_next(int i, const grail_mask_t *mask, int bytes)
79{ 81{
80 int k = ++i >> 3; 82 int k = ++i >> 3;
81 if (k < bytes) { 83 if (k < bytes) {
diff --git a/src/grail-event.c b/src/grail-event.c
index 504ed10..bb75a06 100644
--- a/src/grail-event.c
+++ b/src/grail-event.c
@@ -118,8 +118,8 @@ void gin_send_event(struct grail *ge, struct slot_state *s,
118 } 118 }
119} 119}
120 120
121int grail_get_contacts(const struct grail *ge, 121int GRAIL_PUBLIC grail_get_contacts(const struct grail *ge,
122 struct grail_contact *touch, int max_touch) 122 struct grail_contact *touch, int max_touch)
123{ 123{
124 const struct gesture_inserter *gin = ge->gin; 124 const struct gesture_inserter *gin = ge->gin;
125 const struct utouch_frame *frame = ge->impl->frame; 125 const struct utouch_frame *frame = ge->impl->frame;
diff --git a/src/grail-inserter.c b/src/grail-inserter.c
index ab81ece..8a10b2e 100644
--- a/src/grail-inserter.c
+++ b/src/grail-inserter.c
@@ -288,9 +288,9 @@ void gin_gid_end(struct grail *ge, int gid,
288 s->status = GRAIL_STATUS_END; 288 s->status = GRAIL_STATUS_END;
289} 289}
290 290
291void grail_set_bbox(struct grail *ge, 291void GRAIL_PUBLIC grail_set_bbox(struct grail *ge,
292 const struct grail_coord *tmin, 292 const struct grail_coord *tmin,
293 const struct grail_coord *tmax) 293 const struct grail_coord *tmax)
294{ 294{
295 struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh); 295 struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh);
296 296