summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/annotation.h
blob: e7efb4cdca761b7385c554a08e9989436abe1ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef MUPDF_FITZ_ANNOTATION_H
#define MUPDF_FITZ_ANNOTATION_H

#include "mupdf/fitz/system.h"
#include "mupdf/fitz/context.h"
#include "mupdf/fitz/geometry.h"
#include "mupdf/fitz/document.h"

/*
	fz_new_annot_of_size: Create and initialize an annotation struct.
*/
fz_annot *fz_new_annot_of_size(fz_context *ctx, int size);

#define fz_new_derived_annot(CTX, TYPE) \
	((TYPE *)Memento_label(fz_new_annot_of_size(CTX,sizeof(TYPE)),#TYPE))

/*
	fz_keep_annot: Take a new reference to an annotation.
*/
fz_annot *fz_keep_annot(fz_context *ctx, fz_annot *annot);

/*
	fz_drop_annot: Drop a reference to an annotation. If the
	reference count reaches zero, annot will be destroyed.
*/
void fz_drop_annot(fz_context *ctx, fz_annot *annot);

/*
	fz_first_annot: Return a pointer to the first annotation on a page.
*/
fz_annot *fz_first_annot(fz_context *ctx, fz_page *page);

/*
	fz_next_annot: Return a pointer to the next annotation on a page.
*/
fz_annot *fz_next_annot(fz_context *ctx, fz_annot *annot);

/*
	fz_bound_annot: Return the bounding rectangle of the annotation.
*/
fz_rect fz_bound_annot(fz_context *ctx, fz_annot *annot);

#endif