diff options
| author | Jussi Pakkanen <jussi.pakkanen@canonical.com> | 2011-04-28 14:44:56 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-04-28 15:19:03 +0200 |
| commit | b2a967eea554fce9fdec21f5e19c9608406f530c (patch) | |
| tree | 03a5eb588b0fc1941c8f0ac5fcabaf6eb531068e | |
| parent | e4dc498c906998eb24f6e612c1922db392780ef4 (diff) | |
Make headers work with C++
Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| -rw-r--r-- | include/grail-bits.h | 8 | ||||
| -rw-r--r-- | include/grail.h | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/grail-bits.h b/include/grail-bits.h index 5d940eb..c151c11 100644 --- a/include/grail-bits.h +++ b/include/grail-bits.h | |||
| @@ -23,6 +23,10 @@ | |||
| 23 | #ifndef _GRAIL_BITS_H | 23 | #ifndef _GRAIL_BITS_H |
| 24 | #define _GRAIL_BITS_H | 24 | #define _GRAIL_BITS_H |
| 25 | 25 | ||
| 26 | #ifdef __cplusplus | ||
| 27 | extern "C" { | ||
| 28 | #endif | ||
| 29 | |||
| 26 | typedef unsigned char grail_mask_t; | 30 | typedef unsigned char grail_mask_t; |
| 27 | 31 | ||
| 28 | static inline void grail_mask_set(grail_mask_t *mask, int i) | 32 | static inline void grail_mask_set(grail_mask_t *mask, int i) |
| @@ -60,4 +64,8 @@ int grail_mask_get_next(int i, const grail_mask_t *mask, int bytes); | |||
| 60 | i >= 0; \ | 64 | i >= 0; \ |
| 61 | i = grail_mask_get_next(i, mask, bytes)) | 65 | i = grail_mask_get_next(i, mask, bytes)) |
| 62 | 66 | ||
| 67 | #ifdef __cplusplus | ||
| 68 | } | ||
| 69 | #endif | ||
| 70 | |||
| 63 | #endif | 71 | #endif |
diff --git a/include/grail.h b/include/grail.h index e2356da..d61197d 100644 --- a/include/grail.h +++ b/include/grail.h | |||
| @@ -23,9 +23,13 @@ | |||
| 23 | #ifndef _GRAIL_H | 23 | #ifndef _GRAIL_H |
| 24 | #define _GRAIL_H | 24 | #define _GRAIL_H |
| 25 | 25 | ||
| 26 | #include <linux/input.h> | ||
| 26 | #include <grail-bits.h> | 27 | #include <grail-bits.h> |
| 27 | #include <grail-types.h> | 28 | #include <grail-types.h> |
| 28 | #include <linux/input.h> | 29 | |
| 30 | #ifdef __cplusplus | ||
| 31 | extern "C" { | ||
| 32 | #endif | ||
| 29 | 33 | ||
| 30 | #define DIM_GRAIL_TYPE 64 | 34 | #define DIM_GRAIL_TYPE 64 |
| 31 | #define DIM_GRAIL_TYPE_BYTES ((DIM_GRAIL_TYPE + 7) >> 3) | 35 | #define DIM_GRAIL_TYPE_BYTES ((DIM_GRAIL_TYPE + 7) >> 3) |
| @@ -266,4 +270,8 @@ void grail_get_units(const struct grail *ge, | |||
| 266 | int grail_get_contacts(const struct grail *ge, | 270 | int grail_get_contacts(const struct grail *ge, |
| 267 | struct grail_contact *touch, int max_touch); | 271 | struct grail_contact *touch, int max_touch); |
| 268 | 272 | ||
| 273 | #ifdef __cplusplus | ||
| 274 | } | ||
| 275 | #endif | ||
| 276 | |||
| 269 | #endif | 277 | #endif |
