aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/qr/common.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2025-01-10 15:58:57 +0100
committerPřemysl Eric Janouch <p@janouch.name>2025-01-10 16:02:45 +0100
commit9319d14566e5d1bfec617c479b8543a9ee3ad4ea (patch)
treeb0130ae9e5ac2932c88ff99b83c83d23126d91bc /lpg/libqr/qr/common.h
parent147b8805247ca23fb96e51694f78439ab24f93a2 (diff)
parentab64314222aca47dd7e52eca2d54d2fad0a58f6c (diff)
downloadpdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.tar.gz
pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.tar.xz
pdf-simple-sign-9319d14566e5d1bfec617c479b8543a9ee3ad4ea.zip
Merge remote-tracking branch 'libqr/master'
Diffstat (limited to 'lpg/libqr/qr/common.h')
-rw-r--r--lpg/libqr/qr/common.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lpg/libqr/qr/common.h b/lpg/libqr/qr/common.h
new file mode 100644
index 0000000..b7052ad
--- /dev/null
+++ b/lpg/libqr/qr/common.h
@@ -0,0 +1,32 @@
+#ifndef QR_COMMON_H
+#define QR_COMMON_H
+
+#include <qr/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void qr_mask_apply(struct qr_bitmap * bmp, int mask);
+
+size_t qr_code_total_capacity(int version);
+
+int qr_code_width(const struct qr_code *);
+
+/* See table 19 of the spec for the layout of EC data. There are at
+ * most two different block lengths, so the total number of data+ec
+ * blocks is the sum of block_count[]. The total number of 8-bit
+ * words in each kind of block is data_length + ec_length.
+ */
+void qr_get_rs_block_sizes(int version,
+ enum qr_ec_level ec,
+ int block_count[2],
+ int data_length[2],
+ int ec_length[2]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+