summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2011-02-17 11:05:48 +0100
committerHenrik Rydberg <rydberg@euromail.se>2011-02-17 11:05:48 +0100
commitdca27172b0f27fd121ee43a7cc62176a84b44fc5 (patch)
tree8f5952a3d3d903df09ffb57f777177552de47b7d
parentd619da633517175ffa6977a80760673628f91583 (diff)
Add functions to extract number of frames and slots
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r--include/utouch/frame.h14
-rw-r--r--src/frame.c10
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 */
190unsigned int utouch_frame_get_version(void); 190unsigned 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 */
197unsigned 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 */
204unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh);
205
192utouch_frame_handle utouch_frame_new_engine_raw(unsigned int num_frames, 206utouch_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
36unsigned int utouch_frame_get_num_frames(utouch_frame_handle fh)
37{
38 return fh->num_frames;
39}
40
41unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh)
42{
43 return fh->num_slots;
44}
45
36static void destroy_slots(struct utouch_contact **slots, int nslot) 46static void destroy_slots(struct utouch_contact **slots, int nslot)
37{ 47{
38 int i; 48 int i;