hardcopy.h
Go to the documentation of this file.
1 #ifndef NVIM_HARDCOPY_H
2 #define NVIM_HARDCOPY_H
3 
4 #include <stdint.h>
5 #include <stdlib.h> // for size_t
6 
7 #include "nvim/globals.h" // for TriState
8 #include "nvim/types.h" // for char_u
9 #include "nvim/ex_cmds_defs.h" // for exarg_T
10 
11 /*
12  * Structure to hold printing color and font attributes.
13  */
14 typedef struct {
15  uint32_t fg_color;
16  uint32_t bg_color;
20  int undercurl;
22 
23 /*
24  * Structure passed back to the generic printer code.
25  */
26 typedef struct {
29  int duplex;
32  int has_color;
34  int modec;
35  int do_syntax;
41 
42 /*
43  * Generic option table item, only used for printer at the moment.
44  */
45 typedef struct {
46  const char *name;
47  int hasnum;
48  int number;
49  char_u *string; /* points into option string */
50  int strlen;
51  int present;
53 
54 #define OPT_PRINT_TOP 0
55 #define OPT_PRINT_BOT 1
56 #define OPT_PRINT_LEFT 2
57 #define OPT_PRINT_RIGHT 3
58 #define OPT_PRINT_HEADERHEIGHT 4
59 #define OPT_PRINT_SYNTAX 5
60 #define OPT_PRINT_NUMBER 6
61 #define OPT_PRINT_WRAP 7
62 #define OPT_PRINT_DUPLEX 8
63 #define OPT_PRINT_PORTRAIT 9
64 #define OPT_PRINT_PAPER 10
65 #define OPT_PRINT_COLLATE 11
66 #define OPT_PRINT_JOBSPLIT 12
67 #define OPT_PRINT_FORMFEED 13
68 #define OPT_PRINT_NUM_OPTIONS 14
69 
70 /* For prt_get_unit(). */
71 #define PRT_UNIT_NONE -1
72 #define PRT_UNIT_PERC 0
73 #define PRT_UNIT_INCH 1
74 #define PRT_UNIT_MM 2
75 #define PRT_UNIT_POINT 3
76 #define PRT_UNIT_NAMES {"pc", "in", "mm", "pt"}
77 
78 #define PRINT_NUMBER_WIDTH 8
79 
80 
81 #ifdef INCLUDE_GENERATED_DECLARATIONS
82 # include "hardcopy.h.generated.h"
83 #endif
84 #endif // NVIM_HARDCOPY_H
char_u * arguments
Definition: hardcopy.h:39
int chars_per_line
Definition: hardcopy.h:30
TriState underline
Definition: hardcopy.h:19
int present
Definition: hardcopy.h:51
char_u * outfile
Definition: hardcopy.h:38
TriState
Definition: globals.h:75
int has_color
Definition: hardcopy.h:32
char_u * string
Definition: hardcopy.h:49
int duplex
Definition: hardcopy.h:29
int do_syntax
Definition: hardcopy.h:35
TriState italic
Definition: hardcopy.h:18
Definition: hardcopy.h:45
Definition: hardcopy.h:14
const char * name
Definition: hardcopy.h:46
int n_collated_copies
Definition: hardcopy.h:27
char_u * jobname
Definition: hardcopy.h:37
int number
Definition: hardcopy.h:48
int modec
Definition: hardcopy.h:34
int lines_per_page
Definition: hardcopy.h:31
int hasnum
Definition: hardcopy.h:47
uint32_t bg_color
Definition: hardcopy.h:16
int undercurl
Definition: hardcopy.h:20
int strlen
Definition: hardcopy.h:50
unsigned char char_u
Definition: types.h:11
int user_abort
Definition: hardcopy.h:36
Definition: hardcopy.h:26
int n_uncollated_copies
Definition: hardcopy.h:28
TriState bold
Definition: hardcopy.h:17
prt_text_attr_T number
Definition: hardcopy.h:33
uint32_t fg_color
Definition: hardcopy.h:15