diff options
| -rw-r--r-- | include/utouch/frame.h | 14 | ||||
| -rw-r--r-- | src/frame.c | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/utouch/frame.h b/include/utouch/frame.h index 60195ef..318ce4b 100644 --- a/include/utouch/frame.h +++ b/include/utouch/frame.h | |||
| @@ -189,6 +189,20 @@ struct utouch_frame { | |||
| 189 | */ | 189 | */ |
| 190 | unsigned int utouch_frame_get_version(void); | 190 | unsigned int utouch_frame_get_version(void); |
| 191 | 191 | ||
| 192 | /** | ||
| 193 | * utouch_frame_get_num_frames - get number of supported frames | ||
| 194 | * | ||
| 195 | * Returns the number of frames supported by this engine. | ||
| 196 | */ | ||
| 197 | unsigned int utouch_frame_get_num_frames(utouch_frame_handle fh); | ||
| 198 | |||
| 199 | /** | ||
| 200 | * utouch_frame_get_num_slots - get number of supported slots | ||
| 201 | * | ||
| 202 | * Returns the number of simultaneous contacts supported by this engine. | ||
| 203 | */ | ||
| 204 | unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh); | ||
| 205 | |||
| 192 | utouch_frame_handle utouch_frame_new_engine_raw(unsigned int num_frames, | 206 | utouch_frame_handle utouch_frame_new_engine_raw(unsigned int num_frames, |
| 193 | unsigned int num_slots, | 207 | unsigned int num_slots, |
| 194 | unsigned int frame_rate, | 208 | unsigned int frame_rate, |
diff --git a/src/frame.c b/src/frame.c index f1c8aa4..b2ef401 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -33,6 +33,16 @@ unsigned int utouch_frame_get_version(void) | |||
| 33 | return UTOUCH_FRAME_VERSION; | 33 | return UTOUCH_FRAME_VERSION; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | unsigned int utouch_frame_get_num_frames(utouch_frame_handle fh) | ||
| 37 | { | ||
| 38 | return fh->num_frames; | ||
| 39 | } | ||
| 40 | |||
| 41 | unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh) | ||
| 42 | { | ||
| 43 | return fh->num_slots; | ||
| 44 | } | ||
| 45 | |||
| 36 | static void destroy_slots(struct utouch_contact **slots, int nslot) | 46 | static void destroy_slots(struct utouch_contact **slots, int nslot) |
| 37 | { | 47 | { |
| 38 | int i; | 48 | int i; |
