2
* $Id: conftype.h 245 2006-11-18 02:46:41Z hubert@u.washington.edu $
4
* ========================================================================
5
* Copyright 2006 University of Washington
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
11
* http://www.apache.org/licenses/LICENSE-2.0
13
* ========================================================================
16
#ifndef PINE_CONFTYPE_INCLUDED
17
#define PINE_CONFTYPE_INCLUDED
22
#include "flagmaint.h"
25
#include "../pith/pattern.h"
26
#include "../pith/conf.h"
27
#include "../pith/ldap.h"
30
typedef enum {ListMode, SingleMode} ScreenMode;
33
typedef struct edit_arb {
36
struct edit_arb *next;
40
typedef struct conf_line {
41
char *varname, /* alloc'd var name string */
42
*value; /* alloc'd var value string */
43
short varoffset; /* offset from screen left */
44
short valoffset; /* offset from screen left */
45
short val2offset; /* offset from screen left */
46
struct variable *var; /* pointer to pinerc var */
47
long varmem; /* value's index, if list */
48
/* tool to manipulate values */
49
int (*tool)(struct pine *, int, struct conf_line **, unsigned);
50
struct key_menu *keymenu; /* tool-specific keymenu */
51
HelpType help; /* variable's help text */
54
struct conf_line *varnamep; /* pointer to varname */
55
struct conf_line *headingp; /* pointer to heading */
56
struct conf_line *next, *prev;
57
union flag_or_context_data {
59
struct flag_table **ftbl; /* address of start of table */
60
struct flag_table *fp; /* pointer into table for each row */
62
struct context_and_screen {
81
struct entry_and_screen {
84
LDAP_SERV_S *info_used;
89
struct take_export_val {
99
* Valid for flags argument of config screen tools or flags field in CONF_S
101
#define CF_CHANGES 0x0001 /* Have been earlier changes */
102
#define CF_NOSELECT 0x0002 /* This line is unselectable */
103
#define CF_NOHILITE 0x0004 /* Don't highlight varname */
104
#define CF_NUMBER 0x0008 /* Input should be numeric */
105
#define CF_INVISIBLEVAR 0x0010 /* Don't show the varname */
106
#define CF_PRINTER 0x0020 /* Printer config line */
107
#define CF_H_LINE 0x0040 /* Horizontal line */
108
#define CF_B_LINE 0x0080 /* Blank line */
109
#define CF_CENTERED 0x0100 /* Centered text */
110
#define CF_STARTITEM 0x0200 /* Start of an "item" */
111
#define CF_PRIVATE 0x0400 /* Private flag for tool */
112
#define CF_DOUBLEVAR 0x0800 /* Line has 2 settable vars */
113
#define CF_VAR2 0x1000 /* Cursor on 2nd of 2 vars */
114
#define CF_COLORSAMPLE 0x2000 /* Show color sample here */
115
#define CF_POT_SLCTBL 0x4000 /* Potentially selectable */
116
#define CF_INHERIT 0x8000 /* Inherit Defaults line */
119
typedef struct save_config {
127
typedef struct conf_screen {
136
/* exported protoypes */
139
#endif /* PINE_CONFTYPE_INCLUDED */