Blob Blame History Raw
From 6d99612cd0144b7a39451f840a77257d2113ba8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Tue, 17 Dec 2019 18:15:12 +0100
Subject: [PATCH 154/181] fp-print: Add aliases for First and Last finger in
 our order

We might want to iterate through the supported fingers values, to do that we
were hardcoding FP_FINGER_LEFT_THUMB and FP_FINGER_RIGHT_LITTLE as first and
last fingers.

Not that we'd ever get more fingers (unless some weird radiation would do
the job), but it's logically nicer to read than random hardcoded values.
---
 libfprint/fp-print.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libfprint/fp-print.h b/libfprint/fp-print.h
index fcb9532..94034ce 100644
--- a/libfprint/fp-print.h
+++ b/libfprint/fp-print.h
@@ -43,6 +43,8 @@ G_DECLARE_FINAL_TYPE (FpPrint, fp_print, FP, PRINT, GInitiallyUnowned)
  * @FP_FINGER_RIGHT_MIDDLE: Right middle finger
  * @FP_FINGER_RIGHT_RING: Right ring finger
  * @FP_FINGER_RIGHT_LITTLE: Right little finger
+ * @FP_FINGER_FIRST: The first finger in the fp-print order
+ * @FP_FINGER_LAST: The last finger in the fp-print order
  */
 typedef enum {
   FP_FINGER_UNKNOWN = 0,
@@ -56,6 +58,9 @@ typedef enum {
   FP_FINGER_RIGHT_MIDDLE,
   FP_FINGER_RIGHT_RING,
   FP_FINGER_RIGHT_LITTLE,
+
+  FP_FINGER_FIRST = FP_FINGER_LEFT_THUMB,
+  FP_FINGER_LAST = FP_FINGER_RIGHT_LITTLE,
 } FpFinger;
 
 FpPrint *fp_print_new (FpDevice *device);
-- 
2.24.1