2 * $Id: conftype.h 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006-2008 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_CONFTYPE_INCLUDED
18 #define PINE_CONFTYPE_INCLUDED
23 #include "flagmaint.h"
26 #include "../pith/pattern.h"
27 #include "../pith/conf.h"
28 #include "../pith/ldap.h"
31 typedef enum {ListMode
, SingleMode
} ScreenMode
;
34 typedef struct edit_arb
{
37 struct edit_arb
*next
;
41 typedef struct conf_line
{
42 char *varname
, /* alloc'd var name string */
43 *value
; /* alloc'd var value string */
44 short varoffset
; /* offset from screen left */
45 short valoffset
; /* offset from screen left */
46 short val2offset
; /* offset from screen left */
47 struct variable
*var
; /* pointer to pinerc var */
48 long varmem
; /* value's index, if list */
49 /* tool to manipulate values */
50 int (*tool
)(struct pine
*, int, struct conf_line
**, unsigned);
51 struct key_menu
*keymenu
; /* tool-specific keymenu */
52 HelpType help
; /* variable's help text */
55 struct conf_line
*varnamep
; /* pointer to varname */
56 struct conf_line
*headingp
; /* pointer to heading */
57 struct conf_line
*next
, *prev
;
58 union flag_or_context_data
{
60 struct flag_table
**ftbl
; /* address of start of table */
61 struct flag_table
*fp
; /* pointer into table for each row */
67 char address
[MAILTMPLEN
];
70 struct context_and_screen
{
90 struct entry_and_screen
{
93 LDAP_SERV_S
*info_used
;
98 struct take_export_val
{
101 ScreenMode
*listmode
;
103 struct xoauth2_conf
{
105 XOAUTH2_INFO_S
**selected
;
107 struct xoauth2_flow
{
109 OAUTH2_S
**selected
; /* of type XOAUTH2_S */
116 * Valid for flags argument of config screen tools or flags field in CONF_S
118 #define CF_CHANGES 0x0001 /* Have been earlier changes */
119 #define CF_NOSELECT 0x0002 /* This line is unselectable */
120 #define CF_NOHILITE 0x0004 /* Don't highlight varname */
121 #define CF_NUMBER 0x0008 /* Input should be numeric */
122 #define CF_INVISIBLEVAR 0x0010 /* Don't show the varname */
123 #define CF_PRINTER 0x0020 /* Printer config line */
124 #define CF_H_LINE 0x0040 /* Horizontal line */
125 #define CF_B_LINE 0x0080 /* Blank line */
126 #define CF_CENTERED 0x0100 /* Centered text */
127 #define CF_STARTITEM 0x0200 /* Start of an "item" */
128 #define CF_PRIVATE 0x0400 /* Private flag for tool */
129 #define CF_DOUBLEVAR 0x0800 /* Line has 2 settable vars */
130 #define CF_VAR2 0x1000 /* Cursor on 2nd of 2 vars */
131 #define CF_COLORSAMPLE 0x2000 /* Show color sample here */
132 #define CF_POT_SLCTBL 0x4000 /* Potentially selectable */
133 #define CF_INHERIT 0x8000 /* Inherit Defaults line */
136 typedef struct save_config
{
144 typedef struct conf_screen
{
153 /* exported prototypes */
156 #endif /* PINE_CONFTYPE_INCLUDED */