summaryrefslogtreecommitdiff
path: root/pico/pico.h
diff options
context:
space:
mode:
Diffstat (limited to 'pico/pico.h')
-rw-r--r--pico/pico.h99
1 files changed, 54 insertions, 45 deletions
diff --git a/pico/pico.h b/pico/pico.h
index 907efe36..69cd8ba3 100644
--- a/pico/pico.h
+++ b/pico/pico.h
@@ -68,6 +68,24 @@ struct hdr_line {
/* must be the same as HelpType in pith/helptext.h */
#define HELP_T char **
+/*
+ * Structure to pass as arg to builders.
+ *
+ * me -- A pointer to the bldr_private data for the entry currently
+ * being edited.
+ * tptr -- A malloc'd copy of the displayed text for the affected_entry
+ * pointed to by the aff argument.
+ * aff -- A pointer to the bldr_private data for the affected_entry (the
+ * entry that this entry affects).
+ * next -- The next affected_entry in the list. For example, the Lcc entry
+ * affects the To entry which affects the Fcc entry.
+ */
+typedef struct bld_arg {
+ void **me;
+ char *tptr;
+ void **aff;
+ struct bld_arg *next;
+} BUILDER_ARG;
/*
* This structure controls the header line items on the screen. An
@@ -83,13 +101,16 @@ struct headerentry {
int prwid; /* prompt width on screen */
int maxlen;
char **realaddr;
- int (*builder)(); /* Function to verify/canonicalize val */
+ /* Function to verify/canonicalize val */
+ int (*builder)(char *, char **, char **, BUILDER_ARG *, int *);
struct headerentry *affected_entry, *next_affected;
/* entry builder's 4th arg affects */
- char *(*selector)(); /* Browser for possible values */
+ /* Browser for possible values */
+ char *(*selector)(char **);
char *key_label; /* Key label for key to call browser */
- char *(*fileedit)(); /* Editor for file named in header */
- int (*nickcmpl)(); /* routine that helps with nickname completion */
+ char *(*fileedit)(char *); /* Editor for file named in header */
+ /* routine that helps with nickname completion */
+ int (*nickcmpl)(char *, char **, int, unsigned int);
unsigned display_it:1; /* field is to be displayed by default */
unsigned break_on_comma:1; /* Field breaks on commas */
unsigned is_attach:1; /* Special case field for attachments */
@@ -108,27 +129,6 @@ struct headerentry {
struct hdr_line *hd_text;
};
-
-/*
- * Structure to pass as arg to builders.
- *
- * me -- A pointer to the bldr_private data for the entry currently
- * being edited.
- * tptr -- A malloc'd copy of the displayed text for the affected_entry
- * pointed to by the aff argument.
- * aff -- A pointer to the bldr_private data for the affected_entry (the
- * entry that this entry affects).
- * next -- The next affected_entry in the list. For example, the Lcc entry
- * affects the To entry which affects the Fcc entry.
- */
-typedef struct bld_arg {
- void **me;
- char *tptr;
- void **aff;
- struct bld_arg *next;
-} BUILDER_ARG;
-
-
/*
* structure to keep track of header display
*/
@@ -213,24 +213,33 @@ typedef struct pico_struct {
/* If we had this to do over, it would probably be one giant bitmap */
unsigned always_spell_check:1; /* always spell-checking upon quit */
unsigned strip_ws_before_send:1; /* don't default strip bc of flowed */
- unsigned allow_flowed_text:1; /* clean text when done to keep flowed */
- int (*helper)(); /* Pine's help function */
- int (*showmsg)(); /* Pine's display_message */
- UCS (*suspend)(); /* Pine's suspend */
- void (*keybinput)(); /* Pine's keyboard input indicator */
- int (*tty_fix)(); /* Let Pine fix tty state */
- long (*newmail)(); /* Pine's report_new_mail */
- long (*msgntext)(); /* callback to get msg n's text */
- int (*upload)(); /* callback to rcv uploaded text */
- char *(*ckptdir)(); /* callback for checkpoint file dir */
- int (*exittest)(); /* callback to verify exit request */
- char *(*canceltest)(); /* callback to verify cancel request */
- int (*mimetype)(); /* callback to display mime type */
- int (*expander)(); /* callback to expand address lists */
- int (*user_says_noflow)(); /* callback to tell us we're not flowing */
- void (*resize)(); /* callback handling screen resize */
- void (*winch_cleanup)(); /* callback handling screen resize */
- void (*newthread)(); /* callback to create new thread */
+ unsigned allow_flowed_text:1; /* clean text when done to keep flowed */
+ /* Pine's help function */
+ int (*helper)(HELP_T, char *, int);
+ int (*showmsg)(UCS); /* Pine's display_message */
+ UCS (*suspend)(void); /* Pine's suspend */
+ void (*keybinput)(void); /* Pine's keyboard input indicator */
+ int (*tty_fix)(int); /* Let Pine fix tty state */
+ long (*newmail)(int, int); /* Pine's report_new_mail */
+ /* callback to get msg n's text */
+ long (*msgntext)(long, int (*)(int));
+ /* callback to rcv uploaded text */
+ int (*upload)(char *, size_t, long *);
+ /* callback for checkpoint file dir */
+ char *(*ckptdir)(char *, size_t);
+ /* callback to verify exit request */
+ int (*exittest)(struct headerentry *, void (*)(void), int, char **);
+ /* callback to verify cancel request */
+ char *(*canceltest)(void(*)(void));
+ int (*mimetype)(char *); /* callback to display mime type */
+ /* callback to expand address lists */
+ int (*expander)(struct headerentry *, char ***);
+ int (*user_says_noflow)(void); /* callback to tell us we're not flowing */
+ /* callback handling screen resize */
+ void (*resize)(void);
+ /* callback handling screen resize */
+ void (*winch_cleanup)(void);
+ void (*newthread)(void); /* callback to create new thread */
int arm_winch_cleanup; /* do the winch_cleanup if resized */
HELP_T search_help;
HELP_T ins_help;
@@ -336,7 +345,7 @@ typedef struct menuitem {
MPOINT br; /* bottom-right corner of active area */
MPOINT lbl; /* where the label starts */
char *label;
- void (*label_hiliter)();
+ void (*label_hiliter)(int, struct menuitem *);
COLOR_PAIR *kncp; /* key name color pair */
COLOR_PAIR *klcp; /* key label color pair */
struct menuitem *next;
@@ -453,7 +462,7 @@ void clear_mfunc(mousehandler_t);
unsigned long mouse_in_content(unsigned long, int, int, int, int);
unsigned long mouse_in_pico(unsigned long, int, int, int, int);
void mouse_get_last(mousehandler_t *, MOUSEPRESS *);
-void register_key(int, unsigned, char *, void (*)(),
+void register_key(int, unsigned, char *, void (*)(int, MENUITEM *),
int, int, int, COLOR_PAIR *, COLOR_PAIR *);
int mouse_on_key(int, int);
#endif /* MOUSE */