2 * $Id: confscroll.h 812 2007-11-10 01:00:15Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006-2007 University of Washington
6 * Copyright 2013-2022 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_CONFSCROLL_INCLUDED
18 #define PINE_CONFSCROLL_INCLUDED
22 #include "../pith/conf.h"
23 #include "../pith/state.h"
26 #define BODY_LINES(X) ((X)->ttyo->screen_rows -HEADER_ROWS(X)-FOOTER_ROWS(X))
30 #define EXIT_PMT "Commit changes (\"Yes\" replaces settings, \"No\" abandons changes)"
33 /* another in a long line of hacks in this stuff */
34 #define DSTRING "default ("
35 #define VSTRING "value from fcc-name-rule"
38 #define next_confline(p) ((p) ? (p)->next : NULL)
39 #define prev_confline(p) ((p) ? (p)->prev : NULL)
41 /* for xoaut2conf.h */
42 #define XNAME "/NAME="
44 #define XSECRET "/SECRET="
45 #define XTENANT "/TENANT="
46 #define XUSER "/USER="
47 #define XFLOW "/Flow="
49 #define XOAUTH2_CLIENT_ID "Client-Id"
50 #define XOAUTH2_CLIENT_SECRET "Client-Secret"
51 #define XOAUTH2_TENANT "Tenant"
52 #define XOAUTH2_USERS "Username"
53 #define XOAUTH2_FLOW "Auth Flow"
56 extern char *empty_val
;
57 extern char *empty_val2
;
60 extern struct variable
*score_act_global_ptr
,
61 *scorei_pat_global_ptr
,
88 extern OPT_SCREEN_S
*opt_screen
;
94 /* exported prototypes */
95 int conf_scroll_screen(struct pine
*, OPT_SCREEN_S
*, CONF_S
*, char *, char *, int, int *);
96 void standard_radio_setup(struct pine
*, CONF_S
**, struct variable
*, CONF_S
**);
97 int standard_radio_var(struct pine
*, struct variable
*);
98 int delete_user_vals(struct variable
*);
99 int get_confline_number(CONF_S
*);
100 CONF_S
*set_confline_number(CONF_S
*, int);
101 CONF_S
*new_confline(CONF_S
**);
102 void free_conflines(CONF_S
**);
103 CONF_S
*first_confline(CONF_S
*);
104 CONF_S
*first_sel_confline(CONF_S
*);
105 void snip_confline(CONF_S
**);
106 char *pretty_value(struct pine
*, CONF_S
*);
107 int feature_indent(void);
108 SAVED_CONFIG_S
*save_config_vars(struct pine
*, int);
109 int text_tool(struct pine
*, int, CONF_S
**, unsigned);
110 int checkbox_tool(struct pine
*, int, CONF_S
**, unsigned);
111 int radiobutton_tool(struct pine
*, int, CONF_S
**, unsigned);
112 int yesno_tool(struct pine
*, int, CONF_S
**, unsigned);
113 int text_toolit(struct pine
*, int, CONF_S
**, unsigned, int);
114 char *generalized_sort_pretty_value(struct pine
*, CONF_S
*, int);
115 int exclude_config_var(struct pine
*, struct variable
*, int);
116 int config_exit_cmd(unsigned);
117 int simple_exit_cmd(unsigned);
118 int screen_exit_cmd(unsigned, char *);
119 void config_add_list(struct pine
*, CONF_S
**, char **, char ***, int);
120 void config_del_list_item(CONF_S
**, char ***);
121 void toggle_feature_bit(struct pine
*, int, struct variable
*, CONF_S
*, int);
122 int fixed_var(struct variable
*, char *, char *);
123 void exception_override_warning(struct variable
*);
124 void offer_to_fix_pinerc(struct pine
*);
125 void fix_side_effects(struct pine
*, struct variable
*, int);
126 void revert_to_saved_config(struct pine
*, SAVED_CONFIG_S
*, int);
127 void free_saved_config(struct pine
*, SAVED_CONFIG_S
**, int);
130 #endif /* PINE_CONFSCROLL_INCLUDED */