1 /* pdfdest.h 2 3 Copyright 2009 Taco Hoekwater <taco@luatex.org> 4 5 This file is part of LuaTeX. 6 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. 11 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. 16 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/>. */ 19 20 21 #ifndef PDFDEST_H 22 # define PDFDEST_H 23 24 /* types of destinations */ 25 26 typedef enum { 27 pdf_dest_xyz = 0, 28 pdf_dest_fit = 1, 29 pdf_dest_fith = 2, 30 pdf_dest_fitv = 3, 31 pdf_dest_fitb = 4, 32 pdf_dest_fitbh = 5, 33 pdf_dest_fitbv = 6, 34 pdf_dest_fitr = 7 35 } pdf_destination_types; 36 37 /* max number of kids for balanced trees */ 38 # define name_tree_kids_max 32 /* max number of kids of node of name tree for name destinations */ 39 40 /* data structure of destinations */ 41 42 # define obj_dest_ptr obj_aux /* pointer to |pdf_dest_node| */ 43 # define set_obj_dest_ptr(pdf,A,B) obj_dest_ptr(pdf,A)=B 44 45 # define set_pdf_dest_id(A,B) pdf_dest_id(A)=B 46 # define set_pdf_dest_named_id(A,B) pdf_dest_named_id(A)=B 47 # define set_pdf_dest_type(A,B) pdf_dest_type(A)=B 48 # define set_pdf_dest_xyz_zoom(A,B) pdf_dest_xyz_zoom(A)=B 49 50 # define inf_dest_names_size 1000 /* min size of the destination names table for PDF output */ 51 # define sup_dest_names_size 131072 /* max size of the destination names table for PDF output */ 52 53 extern void append_dest_name(PDF, char *, int); 54 extern void do_dest(PDF pdf, halfword p, halfword parent_box, scaledpos cur); 55 extern void warn_dest_dup(int id, small_number byname, const char *s1, 56 const char *s2); 57 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); 63 64 65 #endif 66