6
#endif /* LYSTRUCTS_H */
10
/* change_form_link calls change_form_link_ex with all its args and FALSE as
12
extern int change_form_link PARAMS((int cur,
14
BOOLEAN *refresh_screen,
15
BOOLEAN use_last_tfpos,
16
BOOLEAN immediate_submit));
18
extern int change_form_link_ex PARAMS((int cur,
20
BOOLEAN *refresh_screen,
21
BOOLEAN use_last_tfpos,
22
BOOLEAN immediate_submit,
25
/* InputFieldData is used to pass the info between
26
* HTML.c and Gridtext.c in HText_beginInput()
28
typedef struct _InputFieldData {
39
CONST char *maxlength;
48
int name_cs; /* charset handle for name */
49
int value_cs; /* charset handle for value */
50
CONST char *accept_cs;
53
/* The OptionType structure is for a linked list of option entries
55
typedef struct _OptionType {
56
char * name; /* the name of the entry */
57
char * cp_submit_value; /* the value to submit */
58
int value_cs; /* charset value is in */
59
struct _OptionType * next; /* the next entry */
62
/* the FormInfo structure is used to contain the form field
63
* data within each anchor
64
* A pointer to this structure is in the TextAnchor struct.
66
typedef struct _FormInfo {
67
char * name; /* the name of the link */
68
int number; /* which form is the link within */
69
int type; /* string, int, etc. */
70
char * value; /* user entered string data */
71
char * orig_value;/* the original value */
72
int size; /* width on the screen */
73
unsigned maxlength; /* max width of data */
74
int group; /* a group associated with the link
75
* this is used for select's
77
int num_value; /* value of the numerical fields */
78
int hrange; /* high numerical range */
79
int lrange; /* low numerical range */
80
OptionType * select_list; /* array of option choices */
81
char * submit_action; /* form's action */
82
int submit_method; /* form's method */
83
char * submit_enctype; /* form's entype */
84
char * submit_title; /* form's title */
85
BOOL no_cache; /* Always resubmit? */
86
char * cp_submit_value; /* option value to submit */
87
char * orig_submit_value; /* original submit value */
88
int size_l; /* The length of the option list */
89
int disabled; /* If YES, can't change values */
96
* As structure for info associated with a form.
97
* There is some redundancy here, this shouldn't waste too much memory
98
* since the total number of forms (as opposed to form fields) per doc
99
* is expected to be rather small.
100
* More things which are per form rather than per field could be moved
103
typedef struct _PerFormInfo
105
int number; /* form number, see GridText.c */
106
/* except for the last two, the following fields aren't actually used.. */
107
int disabled; /* If YES, can't change values */
108
struct _PerFormInfo * next; /* pointer to next form in doc */
109
int nfields; /* number of fields */
110
FormInfo * first_field;
111
FormInfo * last_field; /* pointer to last field in form */
113
char * thisacceptcs; /* used during submit */
116
#define HYPERTEXT_ANCHOR 1
117
#define INPUT_ANCHOR 2 /* forms mode input fields */
118
#define INTERNAL_LINK_ANCHOR 5 /* 1+4, can be used as bitflag... - kw */
120
#define F_TEXT_TYPE 1
121
#define F_PASSWORD_TYPE 2
122
#define F_CHECKBOX_TYPE 3
123
#define F_RADIO_TYPE 4
124
#define F_SUBMIT_TYPE 5
125
#define F_RESET_TYPE 6
126
#define F_OPTION_LIST_TYPE 7
127
#define F_HIDDEN_TYPE 8
128
#define F_TEXTAREA_TYPE 9
129
#define F_RANGE_TYPE 10
130
#define F_FILE_TYPE 11
131
#define F_TEXT_SUBMIT_TYPE 12
132
#define F_IMAGE_SUBMIT_TYPE 13
133
#define F_KEYGEN_TYPE 14
135
#define F_TEXTLIKE(type) ((type)==F_TEXT_TYPE ||\
136
(type)==F_TEXT_SUBMIT_TYPE ||\
137
(type)==F_PASSWORD_TYPE ||\
138
(type)==F_FILE_TYPE ||\
139
(type)==F_TEXTAREA_TYPE)
141
#define WWW_FORM_LINK_TYPE 1
142
#define WWW_LINK_TYPE 2
143
#define WWW_INTERN_LINK_TYPE 6 /* can be used as a bitflag... - kw */
144
#define LINK_LINE_FOUND 8 /* used in follow_link_number, others - kw */
145
#define LINK_DO_ARROWUP 16 /* returned by HTGetLinkOrFieldStart - kw */
147
/* #define different lynx modes */
148
#define NORMAL_LYNX_MODE 1
149
#define FORMS_LYNX_MODE 2
151
#define FIRST_ORDER 1
152
#define MIDDLE_ORDER 2
156
extern void show_formlink_statusline PARAMS((CONST FormInfo * form,
159
#endif /* HTFORMS_H */