lmtnodelib.h /size: 3845 b    last modification: 2025-02-21 11:03
1/*
2    See license.txt in the root of this project.
3*/
4
5# ifndef LNODELIB_H
6# define LNODELIB_H
7
8extern void     lmt_push_node             (lua_State *L);
9extern void     lmt_push_node_fast        (lua_State *L, halfword n);
10extern void     lmt_push_directornode     (lua_State *L, halfword n, int isdirect);
11extern void     lmt_node_list_to_lua      (lua_State *L, halfword n);
12extern halfword lmt_node_list_from_lua    (lua_State *L, int n);
13extern int      lmt_get_math_style        (lua_State *L, int n, int dflt);
14extern int      lmt_get_math_parameter    (lua_State *L, int n, int dflt);
15extern halfword lmt_optional_isnode       (lua_State *L, int i);
16extern halfword lmt_check_isnode          (lua_State *L, int i);
17extern halfword lmt_check_isdirect        (lua_State *L, int i);
18extern halfword lmt_check_isdirectornode  (lua_State *L, int i, int *isdirect);
19extern void     lmt_initialize_properties (int set_size);
20
21extern halfword lmt_hpack_filter_callback(
22    halfword head,
23    scaled   size,
24    int      packtype,
25    int      extrainfo,
26    int      direction,
27    halfword a
28);
29
30extern halfword lmt_vpack_filter_callback(
31    halfword head,
32    scaled   size,
33    int      packtype,
34    scaled   depth,
35    int      extrainfo,
36    int      direction,
37    halfword a
38);
39
40extern halfword lmt_packed_vbox_filter_callback(
41    halfword box,
42    int      extrainfo
43);
44
45extern void lmt_node_filter_callback(
46    int       filterid,
47    int       extrainfo,
48    halfword  head,
49    halfword *tail
50);
51
52extern int lmt_linebreak_callback(
53    halfword  head,
54    int       isbroken, /* display_math */
55    halfword *newhead
56);
57
58extern void lmt_alignment_callback(
59    halfword head,
60    halfword context,
61    halfword callback, 
62    halfword attrlist,
63    halfword preamble
64);
65
66extern void lmt_local_box_callback(
67    halfword linebox,
68    halfword leftbox,
69    halfword rightbox,
70    halfword middlebox,
71    halfword linenumber,
72    scaled   leftskip,
73    scaled   rightskip,
74    scaled   lefthang,
75    scaled   righthang,
76    scaled   indentation,
77    scaled   parinitleftskip,
78    scaled   parinitrightskip,
79    scaled   parfillleftskip,
80    scaled   parfillrightskip,
81    scaled   overshoot
82);
83
84extern int lmt_append_to_vlist_callback(
85    halfword  box,
86    int       location,
87    halfword  prevdepth,
88    halfword *result,
89    int      *nextdepth,
90    int      *prevset,
91    int      *checkdepth
92);
93
94extern void lmt_begin_paragraph_callback(
95    int invmode,
96    int *indented,
97    int context
98);
99
100extern void lmt_paragraph_context_callback(
101    int context,
102    int *ignore
103);
104
105
106extern void lmt_page_filter_callback(
107    int      context,
108    halfword boundary
109);
110
111extern void lmt_append_line_filter_callback(
112    halfword context,
113    halfword index
114);
115
116extern int lmt_par_pass_callback(
117    halfword               head,
118    line_break_properties *properties, 
119    halfword               identifier, 
120    halfword               subpass, 
121    halfword               callback, 
122    halfword               features, 
123    scaled                 overfull, 
124    scaled                 underfull, 
125    halfword               verdict, 
126    halfword               classified,
127    scaled                 threshold, 
128    halfword               badness, 
129    halfword               classes,
130    int                   *repeat
131);
132
133extern void lmt_insert_par_callback(
134    halfword node,
135    halfword mode
136);
137
138extern halfword lmt_uleader_callback(
139    halfword head,
140    halfword index, 
141    int      context,
142    halfword box,
143    int      location
144);
145
146extern halfword lmt_uinsert_callback(
147    halfword callback, 
148    halfword index,
149    halfword order,
150    halfword packed,
151    scaled   height, 
152    scaled   amount
153);
154
155extern scaled lmt_italic_correction_callback(
156    halfword glyph,
157    scaled   kern,
158    halfword subtype
159);
160
161# endif
162