Debian Codegraph @

texk/web2c/luatexdir/pdf/pdfaction.h

raw
1 /* pdfaction.h
2
3 Copyright 2009 Taco Hoekwater <[email protected]>
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 PDFACTION_H
22 # define PDFACTION_H
23
24 /*
25 Increase count of references to this action. this is used to speed up
26 copy_node().
27 */
28
29 # define add_action_ref(a) pdf_action_refcount((a))++
30
31 /*
32 Decrease count of references to this action; free it if there is no reference
33 to this action.
34 */
35
36 # define delete_action_ref(a) { \
37 if (pdf_action_refcount(a) == null) { \
38 flush_node(a); \
39 } else { \
40 pdf_action_refcount(a)--; \
41 } \
42 }
43
44 # define set_pdf_action_type(A,B) pdf_action_type(A)=B
45 # define set_pdf_action_tokens(A,B) pdf_action_tokens(A)=B
46 # define set_pdf_action_file(A,B) pdf_action_file(A)=B
47 # define set_pdf_action_id(A,B) pdf_action_id(A)=B
48 # define set_pdf_action_named_id(A,B) pdf_action_named_id(A)=B
49 # define set_pdf_action_new_window(A,B) pdf_action_new_window(A)=B
50
51 extern halfword scan_action(PDF pdf);
52 extern void write_action(PDF pdf, halfword p);
53
54 #endif