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