beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / pdf / pdfdest.h
blob576baea04342b7c8052710ac72cbb6b8ea04f371
1 /* pdfdest.h
3 Copyright 2009 Taco Hoekwater <taco@luatex.org>
5 This file is part of LuaTeX.
7 LuaTeX is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2 of the License, or (at your
10 option) any later version.
12 LuaTeX is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License along
18 with LuaTeX; if not, see <http://www.gnu.org/licenses/>.
22 #ifndef PDFDEST_H
23 # define PDFDEST_H
25 /* types of destinations */
27 typedef enum {
28 pdf_dest_xyz = 0,
29 pdf_dest_fit = 1,
30 pdf_dest_fith = 2,
31 pdf_dest_fitv = 3,
32 pdf_dest_fitb = 4,
33 pdf_dest_fitbh = 5,
34 pdf_dest_fitbv = 6,
35 pdf_dest_fitr = 7
36 } pdf_destination_types;
38 /* max number of kids for balanced trees */
40 # define name_tree_kids_max 32 /* max number of kids of node of name tree for name destinations */
42 /* data structure of destinations */
44 # define obj_dest_ptr obj_aux /* pointer to |pdf_dest_node| */
45 # define set_obj_dest_ptr(pdf,A,B) obj_dest_ptr(pdf,A)=B
47 # define set_pdf_dest_id(A,B) pdf_dest_id(A)=B
48 # define set_pdf_dest_named_id(A,B) pdf_dest_named_id(A)=B
49 # define set_pdf_dest_type(A,B) pdf_dest_type(A)=B
50 # define set_pdf_dest_xyz_zoom(A,B) pdf_dest_xyz_zoom(A)=B
52 # define inf_dest_names_size 1000 /* min size of the destination names table for PDF output */
53 # define sup_dest_names_size 131072 /* max size of the destination names table for PDF output */
55 extern void append_dest_name(PDF, char *, int);
56 extern void do_dest(PDF pdf, halfword p, halfword parent_box, scaledpos cur);
58 extern void write_out_pdf_mark_destinations(PDF);
59 extern void scan_pdfdest(PDF);
60 extern void init_dest_names(PDF);
61 extern void sort_dest_names(PDF);
62 extern int output_name_tree(PDF);
64 #endif