* Update configure script to remove the search for a linking tcl
[alpine.git] / alpine / mailview.h
blob2cd3f643f00bce921de8492f487139b113f48ce1
1 /*
2 * $Id: mailview.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006-2008 University of Washington
6 * Copyright 2013-2018 Eduardo Chappa
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PINE_MAILVIEW_INCLUDED
18 #define PINE_MAILVIEW_INCLUDED
21 #include <general.h>
22 #include "../pith/mailview.h"
23 #include "titlebar.h"
24 #include "keymenu.h"
25 #include "../pith/handle.h"
26 #include "../pith/store.h"
27 #include "../pith/bitmap.h"
31 * display_output_file mode flags
33 #define DOF_NONE 0
34 #define DOF_EMPTY 1
35 #define DOF_BRIEF 2
38 #define STYLE_NAME(s) ((s)->text.desc ? (s)->text.desc : "text")
42 * Struct defining scrolltool operating parameters.
44 typedef struct scrolltool_s {
45 struct { /* Data and its attributes to scroll */
46 void *text; /* what to scroll */
47 SourceType src; /* it's form (char **,char *,FILE *) */
48 char *desc; /* Description of "type" of data shown */
49 HANDLE_S *handles; /* embedded data descriptions */
50 } text;
51 struct { /* titlebar state */
52 char *title; /* screen's title */
53 TitleBarType style; /* it's type */
54 COLOR_PAIR *color;
55 } bar;
56 struct { /* screen's keymenu/command bindings */
57 struct key_menu *menu;
58 bitmap_t bitmap;
59 OtherMenu what;
60 void (*each_cmd)(struct scrolltool_s *, int);
61 } keys;
62 struct { /* help for this attachment */
63 HelpType text; /* help text */
64 char *title; /* title for help screen */
65 } help;
66 struct {
67 int (*click)(struct scrolltool_s *);
68 int (*clickclick)(struct scrolltool_s *);
69 #ifdef _WINDOWS
71 * For systems that support it, allow caller to do popup menu
73 int (*popup)(struct scrolltool_s *, int);
74 #endif
75 } mouse;
76 struct { /* where to start paging from */
77 enum {FirstPage = 0, LastPage, Fragment, Offset, Handle} on;
78 union {
79 char *frag; /* fragment in html text to start on */
80 long offset;
81 } loc;
82 } start;
83 struct { /* Non-default Command Processor */
84 int (*tool)(int, MSGNO_S *, struct scrolltool_s *);
85 /* The union below is opaque as far as scrolltool itself is
86 * concerned, but is provided as a container to pass data
87 * between the scrolltool caller and the given "handler"
88 * callback (or any other callback that takes a scrolltool_s *).
90 union {
91 void *p;
92 int i;
93 } data;
94 } proc;
95 /* End of page processing */
96 int (*end_scroll)(struct scrolltool_s *);
97 /* Handler for invalid command input */
98 int (*bogus_input)(UCS);
99 unsigned resize_exit:1; /* Return from scrolltool if resized */
100 unsigned body_valid:1; /* Screen's body already displayed */
101 unsigned no_stat_msg:1; /* Don't display status messages */
102 unsigned vert_handle:1; /* hunt up and down on arrows/ctrl-[np] */
103 unsigned srch_handle:1; /* search to next handle */
104 unsigned quell_help:1; /* Don't show handle nav help message */
105 unsigned quell_newmail:1; /* Don't check for new mail */
106 unsigned quell_first_view:1; /* Don't act special first time through */
107 unsigned jump_is_debug:1;
108 unsigned use_indexline_color:1;
109 } SCROLL_S;
112 /* exported protoypes */
113 void mail_view_screen(struct pine *);
114 url_tool_t url_local_handler(char *);
115 int url_local_mailto(char *);
116 int url_local_mailto_and_atts(char *, PATMT *);
117 int url_local_fragment(char *);
118 int scrolltool(SCROLL_S *);
119 int ng_scroll_edit(CONTEXT_S *, int);
120 int folder_select_update(CONTEXT_S *, int);
121 int scroll_add_listmode(CONTEXT_S *, int);
122 void display_output_file(char *, char *, char *, int);
123 int rfc2369_editorial(long, HANDLE_S **, int, int, gf_io_t);
124 void view_writec_init(STORE_S *, HANDLE_S **, int, int);
125 void view_writec_destroy(void);
126 int view_writec(int);
129 #endif /* PINE_MAILVIEW_INCLUDED */