Home | History | Annotate | Line # | Download | only in libform
      1  1.23     joerg /*	$NetBSD: form.h,v 1.23 2015/09/07 15:50:49 joerg Exp $	*/
      2   1.1     blymn 
      3   1.1     blymn /*-
      4   1.1     blymn  * Copyright (c) 1998-1999 Brett Lymn
      5   1.1     blymn  *               (blymn (at) baea.com.au, brett_lymn (at) yahoo.com.au)
      6   1.1     blymn  * All rights reserved.
      7   1.1     blymn  *
      8   1.1     blymn  * This code has been donated to The NetBSD Foundation by the Author.
      9   1.1     blymn  *
     10   1.1     blymn  * Redistribution and use in source and binary forms, with or without
     11   1.1     blymn  * modification, are permitted provided that the following conditions
     12   1.1     blymn  * are met:
     13   1.1     blymn  * 1. Redistributions of source code must retain the above copyright
     14   1.1     blymn  *    notice, this list of conditions and the following disclaimer.
     15   1.1     blymn  * 2. The name of the author may not be used to endorse or promote products
     16  1.13       wiz  *    derived from this software without specific prior written permission
     17   1.1     blymn  *
     18   1.1     blymn  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     19   1.1     blymn  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     20   1.1     blymn  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     21   1.1     blymn  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     22   1.1     blymn  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     23   1.1     blymn  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     24   1.1     blymn  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     25   1.1     blymn  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     26   1.1     blymn  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     27   1.1     blymn  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     28   1.1     blymn  *
     29   1.1     blymn  *
     30   1.1     blymn  */
     31   1.1     blymn 
     32   1.1     blymn #ifndef FORM_H
     33   1.1     blymn #define FORM_H 1
     34   1.1     blymn #include <sys/queue.h>
     35   1.1     blymn #include <stdarg.h>
     36   1.1     blymn #include <curses.h>
     37   1.1     blymn #include <eti.h>
     38   1.1     blymn 
     39   1.1     blymn /* Define the types of field justification that can be used. */
     40  1.10     blymn #define NO_JUSTIFICATION  (0)
     41  1.10     blymn #define JUSTIFY_RIGHT     (1)
     42  1.10     blymn #define JUSTIFY_LEFT      (2)
     43  1.10     blymn #define JUSTIFY_CENTER    (3)
     44   1.1     blymn 
     45   1.1     blymn /* Define the max and min valid justification styles for range checking */
     46   1.1     blymn #define MIN_JUST_STYLE    NO_JUSTIFICATION
     47   1.1     blymn #define MAX_JUST_STYLE    JUSTIFY_CENTER
     48   1.1     blymn 
     49   1.1     blymn /* Options for the fields */
     50   1.1     blymn typedef unsigned int Form_Options;
     51   1.1     blymn 
     52   1.6     blymn /* form options */
     53   1.6     blymn #define O_BS_OVERLOAD (0x001)
     54   1.6     blymn #define O_NL_OVERLOAD (0x002)
     55   1.6     blymn 
     56   1.6     blymn /* field options */
     57  1.10     blymn #define O_VISIBLE  (0x001)  /* Field is visible */
     58  1.10     blymn #define O_ACTIVE   (0x002)  /* Field is active in the form */
     59  1.10     blymn #define O_PUBLIC   (0x004)  /* The contents entered into the field is echoed */
     60  1.10     blymn #define O_EDIT     (0x008)  /* Can edit the field */
     61  1.10     blymn #define O_WRAP     (0x010)  /* The field contents can line wrap */
     62  1.10     blymn #define O_BLANK    (0x020)  /* Blank the field on modification */
     63  1.10     blymn #define O_AUTOSKIP (0x040)  /* Skip to next field when current is full */
     64  1.10     blymn #define O_NULLOK   (0x080)  /* Field is allowed to contain no data */
     65  1.10     blymn #define O_STATIC   (0x100)  /* Field is not dynamic */
     66  1.10     blymn #define O_PASSOK   (0x200)  /* An umodified field is OK */
     67  1.19     blymn #define O_REFORMAT (0x400)  /* Insert newlines at linebreaks on buffer get */
     68   1.1     blymn 
     69   1.7     blymn /*
     70   1.7     blymn  * Form driver requests - be VERY careful about changing the ordering
     71   1.7     blymn  * of the requests below.  The form driver code depends on a particular
     72   1.7     blymn  * order for the requests.
     73   1.7     blymn  */
     74  1.10     blymn #define REQ_MIN_REQUEST   (KEY_MAX + 0x101) /* must equal value of the
     75  1.10     blymn                                                first request */
     76   1.1     blymn 
     77  1.10     blymn #define REQ_NEXT_PAGE     (KEY_MAX + 0x101) /* next page in form */
     78  1.10     blymn #define REQ_PREV_PAGE     (KEY_MAX + 0x102) /* previous page in form */
     79  1.10     blymn #define REQ_FIRST_PAGE    (KEY_MAX + 0x103) /* goto first page in form */
     80  1.10     blymn #define REQ_LAST_PAGE     (KEY_MAX + 0x104) /* goto last page in form */
     81  1.10     blymn 
     82  1.10     blymn #define REQ_NEXT_FIELD    (KEY_MAX + 0x105) /* move to the next field */
     83  1.10     blymn #define REQ_PREV_FIELD    (KEY_MAX + 0x106) /* move to the previous field */
     84  1.10     blymn #define REQ_FIRST_FIELD   (KEY_MAX + 0x107) /* goto the first field */
     85  1.10     blymn #define REQ_LAST_FIELD    (KEY_MAX + 0x108) /* goto the last field */
     86  1.10     blymn 
     87  1.10     blymn #define REQ_SNEXT_FIELD   (KEY_MAX + 0x109) /* move to the next field
     88  1.10     blymn                                                in sorted order */
     89  1.10     blymn #define REQ_SPREV_FIELD   (KEY_MAX + 0x10a) /* move to the prev field
     90  1.10     blymn                                                in sorted order */
     91  1.10     blymn #define REQ_SFIRST_FIELD  (KEY_MAX + 0x10b) /* move to the first
     92  1.10     blymn                                                sorted field */
     93  1.10     blymn #define REQ_SLAST_FIELD   (KEY_MAX + 0x10c) /* move to the last sorted
     94  1.10     blymn                                                field */
     95  1.10     blymn 
     96  1.10     blymn #define REQ_LEFT_FIELD    (KEY_MAX + 0x10d) /* go left one field */
     97  1.10     blymn #define REQ_RIGHT_FIELD   (KEY_MAX + 0x10e) /* go right one field */
     98  1.10     blymn #define REQ_UP_FIELD      (KEY_MAX + 0x10f) /* go up one field */
     99  1.10     blymn #define REQ_DOWN_FIELD    (KEY_MAX + 0x110) /* go down one field */
    100  1.10     blymn 
    101  1.10     blymn #define REQ_NEXT_CHAR     (KEY_MAX + 0x111) /* move to the next char
    102  1.10     blymn                                                in field */
    103  1.10     blymn #define REQ_PREV_CHAR     (KEY_MAX + 0x112) /* move to the previous
    104  1.10     blymn                                                char in field */
    105  1.10     blymn #define REQ_NEXT_LINE     (KEY_MAX + 0x113) /* go to the next line in
    106  1.10     blymn                                                the field */
    107  1.10     blymn #define REQ_PREV_LINE     (KEY_MAX + 0x114) /* go to the previous line
    108  1.10     blymn                                                in the field */
    109  1.10     blymn #define REQ_NEXT_WORD     (KEY_MAX + 0x115) /* go to the next word in
    110  1.10     blymn                                                the field */
    111  1.10     blymn #define REQ_PREV_WORD     (KEY_MAX + 0x116) /* go to the previous word
    112  1.10     blymn                                                in the field */
    113  1.10     blymn #define REQ_BEG_FIELD     (KEY_MAX + 0x117) /* go to the beginning of
    114  1.10     blymn                                                the field */
    115  1.10     blymn #define REQ_END_FIELD     (KEY_MAX + 0x118) /* go to the end of the field */
    116  1.10     blymn #define REQ_BEG_LINE      (KEY_MAX + 0x119) /* go to the beginning of
    117  1.10     blymn                                                the line */
    118  1.10     blymn #define REQ_END_LINE      (KEY_MAX + 0x11a) /* go to the end of the
    119  1.10     blymn                                                line */
    120  1.10     blymn #define REQ_LEFT_CHAR     (KEY_MAX + 0x11b) /* move left in the field */
    121  1.10     blymn #define REQ_RIGHT_CHAR    (KEY_MAX + 0x11c) /* move right in the field */
    122  1.10     blymn #define REQ_UP_CHAR       (KEY_MAX + 0x11d) /* move up in the field */
    123  1.10     blymn #define REQ_DOWN_CHAR     (KEY_MAX + 0x11e) /* move down in the field */
    124  1.10     blymn 
    125  1.10     blymn #define REQ_NEW_LINE      (KEY_MAX + 0x11f) /* insert/overlay a new line */
    126  1.10     blymn #define REQ_INS_CHAR      (KEY_MAX + 0x120) /* insert a blank char at
    127  1.10     blymn                                                the cursor */
    128  1.10     blymn #define REQ_INS_LINE      (KEY_MAX + 0x121) /* insert a blank line at
    129  1.10     blymn                                                the cursor */
    130  1.10     blymn 
    131  1.10     blymn #define REQ_DEL_CHAR      (KEY_MAX + 0x122) /* delete the current character */
    132  1.10     blymn #define REQ_DEL_PREV      (KEY_MAX + 0x123) /* delete the character
    133  1.10     blymn                                                before the current */
    134  1.10     blymn #define REQ_DEL_LINE      (KEY_MAX + 0x124) /* delete the current line */
    135  1.10     blymn #define REQ_DEL_WORD      (KEY_MAX + 0x125) /* delete the word at the cursor */
    136  1.10     blymn #define REQ_CLR_EOL       (KEY_MAX + 0x126) /* clear to the end of the line */
    137  1.10     blymn #define REQ_CLR_EOF       (KEY_MAX + 0x127) /* clear to the end of the field */
    138  1.10     blymn #define REQ_CLR_FIELD     (KEY_MAX + 0x128) /* clear the field */
    139  1.10     blymn 
    140  1.10     blymn #define REQ_OVL_MODE      (KEY_MAX + 0x129) /* overlay mode */
    141  1.10     blymn #define REQ_INS_MODE      (KEY_MAX + 0x12a) /* insert mode */
    142  1.10     blymn 
    143  1.10     blymn #define REQ_SCR_FLINE     (KEY_MAX + 0x12b) /* scroll field forward one line */
    144  1.10     blymn #define REQ_SCR_BLINE     (KEY_MAX + 0x12c) /* scroll field backward
    145  1.10     blymn                                                one line */
    146  1.10     blymn #define REQ_SCR_FPAGE     (KEY_MAX + 0x12d) /* scroll field forward one page */
    147  1.10     blymn #define REQ_SCR_BPAGE     (KEY_MAX + 0x12e) /* scroll field backward
    148  1.10     blymn                                                one page */
    149  1.10     blymn #define REQ_SCR_FHPAGE    (KEY_MAX + 0x12f) /* scroll field forward
    150  1.10     blymn                                                half a page */
    151  1.10     blymn #define REQ_SCR_BHPAGE    (KEY_MAX + 0x130) /* scroll field backward
    152  1.10     blymn                                                half a page */
    153  1.10     blymn 
    154  1.10     blymn #define REQ_SCR_FCHAR     (KEY_MAX + 0x131) /* horizontal scroll
    155  1.10     blymn                                                forward a character */
    156  1.10     blymn #define REQ_SCR_BCHAR     (KEY_MAX + 0x132) /* horizontal scroll
    157  1.10     blymn                                                backward a character */
    158  1.10     blymn #define REQ_SCR_HFLINE    (KEY_MAX + 0x133) /* horizontal scroll
    159  1.10     blymn                                                forward a line */
    160  1.10     blymn #define REQ_SCR_HBLINE    (KEY_MAX + 0x134) /* horizontal scroll
    161  1.10     blymn                                                backward a line */
    162  1.10     blymn #define REQ_SCR_HFHALF    (KEY_MAX + 0x135) /* horizontal scroll
    163  1.10     blymn                                                forward half a line */
    164  1.10     blymn #define REQ_SCR_HBHALF    (KEY_MAX + 0x136) /* horizontal scroll
    165  1.10     blymn                                                backward half a line */
    166  1.10     blymn 
    167  1.10     blymn #define REQ_VALIDATION    (KEY_MAX + 0x137) /* validate the field */
    168  1.10     blymn #define REQ_PREV_CHOICE   (KEY_MAX + 0x138) /* display previous field choice */
    169  1.10     blymn #define REQ_NEXT_CHOICE   (KEY_MAX + 0x139) /* display next field choice */
    170   1.1     blymn 
    171  1.10     blymn #define REQ_MAX_COMMAND   (KEY_MAX + 0x139) /* must match the last
    172  1.10     blymn                                                driver command */
    173   1.1     blymn 
    174  1.18     blymn /* The following defines are for ncurses compatibility */
    175  1.18     blymn #define MIN_FORM_COMMAND	REQ_MIN_REQUEST
    176  1.18     blymn #define MAX_FORM_COMMAND	REQ_MAX_COMMAND
    177  1.18     blymn 
    178  1.18     blymn 
    179   1.1     blymn typedef struct _form_string {
    180   1.1     blymn 	size_t allocated;
    181   1.1     blymn 	unsigned int length;
    182   1.1     blymn 	char *string;
    183   1.1     blymn } FORM_STR;
    184   1.1     blymn 
    185   1.1     blymn typedef struct _form_field FIELD;
    186   1.1     blymn typedef struct _form_struct FORM;
    187   1.1     blymn typedef struct _form_fieldtype FIELDTYPE;
    188   1.1     blymn 
    189   1.1     blymn typedef struct _formi_page_struct _FORMI_PAGE_START;
    190   1.1     blymn typedef struct formi_type_link_struct _FORMI_TYPE_LINK;
    191  1.12     blymn typedef struct _formi_field_lines _FORMI_FIELD_LINES;
    192  1.12     blymn 
    193   1.1     blymn 
    194   1.1     blymn typedef void (*Form_Hook)(FORM *);
    195   1.1     blymn 
    196   1.1     blymn /* definition of a field in the form */
    197   1.1     blymn struct _form_field {
    198   1.1     blymn 	unsigned int rows; /* rows in the field */
    199   1.1     blymn 	unsigned int cols; /* columns in the field */
    200   1.1     blymn 	unsigned int drows; /* dynamic rows */
    201   1.1     blymn 	unsigned int dcols; /* dynamic columns */
    202   1.1     blymn 	unsigned int max; /* maximum growth */
    203   1.1     blymn 	unsigned int form_row; /* starting row in the form subwindow */
    204   1.1     blymn 	unsigned int form_col; /* starting column in the form subwindow */
    205   1.1     blymn 	unsigned int nrows; /* number of off screen rows */
    206   1.1     blymn 	int index; /* index of this field in form fields array. */
    207   1.1     blymn 	int nbuf; /* number of buffers associated with this field */
    208   1.1     blymn 	int buf0_status; /* set to true if buffer 0 has changed. */
    209   1.1     blymn 	int justification; /* justification style of the field */
    210   1.1     blymn 	int overlay; /* set to true if field is in overlay mode */
    211  1.19     blymn 	_FORMI_FIELD_LINES *cur_line; /* pointer to the current line cursor
    212  1.19     blymn 					 is on */
    213   1.1     blymn 	unsigned int start_char; /* starting char in string (horiz scroll) */
    214  1.19     blymn 	_FORMI_FIELD_LINES *start_line; /* start line in field (vert scroll) */
    215   1.1     blymn 	unsigned int row_count; /* number of rows actually used in field */
    216  1.16     blymn 	unsigned int row_xpos; /* char offset of cursor in field, not same
    217  1.16     blymn 				  as cursor_xpos due to tab expansion */
    218   1.1     blymn 	unsigned int cursor_xpos; /* x pos of cursor in field */
    219   1.1     blymn 	unsigned int cursor_ypos; /* y pos of cursor in field */
    220   1.1     blymn 	short page_break; /* start of a new page on the form if 1 */
    221   1.1     blymn 	short page; /* number of the page this field is on */
    222   1.1     blymn 	chtype fore; /* character attributes for the foreground */
    223   1.1     blymn 	chtype back; /* character attributes for the background */
    224   1.1     blymn 	int pad; /* padding character */
    225   1.1     blymn 	Form_Options opts; /* options for the field */
    226   1.1     blymn 	FORM *parent; /* the form this field is bound to, if any */
    227   1.1     blymn 	FIELD *up; /* field above this one */
    228   1.1     blymn 	FIELD *down; /* field below this one */
    229   1.1     blymn 	FIELD *left; /* field to the left of this one */
    230   1.1     blymn 	FIELD *right; /* field to the right of this one */
    231   1.1     blymn 	void *userptr;  /* user defined pointer. */
    232   1.1     blymn 	FIELD *link; /* used if fields are linked */
    233   1.1     blymn 	FIELDTYPE *type; /* type struct for the field */
    234  1.22  christos 	TAILQ_ENTRY(_form_field) glue; /* tail queue glue for sorting fields */
    235   1.1     blymn 	char *args; /* args for field type. */
    236  1.20       roy 	_FORMI_FIELD_LINES *alines; /* array of the starts and ends of lines */
    237  1.19     blymn 	_FORMI_FIELD_LINES *free; /* list of lines available for reuse */
    238   1.1     blymn 	FORM_STR *buffers; /* array of buffers for the field */
    239   1.1     blymn };
    240   1.1     blymn 
    241   1.1     blymn /* define the types of fields we can have */
    242   1.1     blymn extern FIELDTYPE *TYPE_ALNUM;
    243   1.1     blymn extern FIELDTYPE *TYPE_ALPHA;
    244   1.1     blymn extern FIELDTYPE *TYPE_ENUM;
    245   1.1     blymn extern FIELDTYPE *TYPE_INTEGER;
    246   1.1     blymn extern FIELDTYPE *TYPE_NUMERIC;
    247   1.1     blymn extern FIELDTYPE *TYPE_REGEXP;
    248   1.8     blymn extern FIELDTYPE *TYPE_IPV4;
    249   1.8     blymn extern FIELDTYPE *TYPE_IPV6;
    250   1.1     blymn extern FIELDTYPE *TYPE_USER;
    251   1.1     blymn 
    252   1.1     blymn /* definition of a field type. */
    253   1.1     blymn struct _form_fieldtype {
    254   1.1     blymn 	unsigned flags; /* status of the type */
    255   1.1     blymn 	unsigned refcount; /* in use if > 0 */
    256   1.1     blymn 	_FORMI_TYPE_LINK *link; /* set if this type is linked */
    257   1.1     blymn 
    258   1.1     blymn 	char * (*make_args)(va_list *); /* make the args for the type */
    259   1.1     blymn 	char * (*copy_args)(char *); /* copy the args for the type */
    260   1.1     blymn 	void (*free_args)(char *); /* free storage used by the args */
    261   1.1     blymn 	int (*field_check)(FIELD *, char *); /* field validation routine */
    262   1.1     blymn 	int (*char_check)(int, char *); /* char validation routine */
    263   1.1     blymn 	int (*next_choice)(FIELD *, char *); /* function to select next
    264   1.1     blymn 						choice */
    265   1.1     blymn 	int (*prev_choice)(FIELD *, char *); /* function to select prev
    266   1.1     blymn 						choice */
    267   1.1     blymn };
    268   1.1     blymn 
    269   1.1     blymn /*definition of a form */
    270   1.1     blymn 
    271   1.1     blymn struct _form_struct {
    272   1.1     blymn 	int in_init; /* true if performing a init or term function */
    273   1.1     blymn 	int posted; /* the form is posted */
    274   1.3     blymn 	int wrap; /* wrap from last field to first field if true */
    275   1.1     blymn 	WINDOW *win; /* window for the form */
    276   1.1     blymn 	WINDOW *subwin; /* subwindow for the form */
    277  1.10     blymn 	WINDOW *scrwin; /* this is the window to use for output */
    278   1.1     blymn 	void *userptr; /* user defined pointer */
    279   1.1     blymn 	Form_Options opts; /* options for the form */
    280   1.1     blymn 	Form_Hook form_init; /* function called when form posted and
    281   1.1     blymn 				after page change */
    282   1.1     blymn 	Form_Hook form_term; /* function called when form is unposted and
    283   1.1     blymn 				before page change */
    284   1.1     blymn 	Form_Hook field_init; /* function called when form posted and after
    285   1.1     blymn 				 current field changes */
    286   1.1     blymn 	Form_Hook field_term; /* function called when form unposted and
    287   1.1     blymn 				 before current field changes */
    288   1.1     blymn 	int field_count; /* number of fields attached */
    289   1.1     blymn 	int cur_field; /* current field */
    290   1.1     blymn 	int page; /* current page of form */
    291   1.1     blymn 	int max_page; /* number of pages in the form */
    292   1.1     blymn 	_FORMI_PAGE_START *page_starts; /* dynamic array of fields that start
    293   1.1     blymn 					   the pages */
    294  1.22  christos 	TAILQ_HEAD(_formi_sort_head, _form_field) sorted_fields; /* sorted field
    295   1.1     blymn 								list */
    296   1.1     blymn 	FIELD **fields; /* array of fields attached to this form. */
    297   1.1     blymn };
    298   1.1     blymn 
    299   1.1     blymn /* Public function prototypes. */
    300   1.1     blymn __BEGIN_DECLS
    301   1.1     blymn 
    302  1.15     blymn FIELD       *current_field(FORM *);
    303  1.15     blymn int          data_ahead(FORM *);
    304  1.15     blymn int          data_behind(FORM *);
    305  1.15     blymn FIELD       *dup_field(FIELD *, int, int);
    306  1.15     blymn int          dynamic_field_info(FIELD *, int *, int *, int *);
    307  1.15     blymn char        *field_arg(FIELD *);
    308  1.15     blymn chtype       field_back(FIELD *);
    309  1.15     blymn char        *field_buffer(FIELD *, int);
    310  1.15     blymn int          field_count(FORM *);
    311  1.15     blymn chtype       field_fore(FIELD *);
    312  1.15     blymn int          field_index(FIELD *);
    313  1.15     blymn int          field_info(FIELD *, int *, int *, int *, int *, int *, int *);
    314  1.15     blymn Form_Hook    field_init(FORM *);
    315  1.15     blymn int          field_just(FIELD *);
    316   1.1     blymn Form_Options field_opts(FIELD *);
    317  1.15     blymn int          field_opts_off(FIELD *, Form_Options);
    318  1.15     blymn int          field_opts_on(FIELD *, Form_Options);
    319  1.15     blymn int          field_pad(FIELD *);
    320  1.15     blymn int          field_status(FIELD *);
    321  1.15     blymn Form_Hook    field_term(FORM *);
    322  1.15     blymn FIELDTYPE   *field_type(FIELD *);
    323  1.15     blymn void        *field_userptr(FIELD *);
    324  1.15     blymn int          form_driver(FORM *, int);
    325  1.15     blymn FIELD      **form_fields(FORM *);
    326  1.15     blymn Form_Hook    form_init(FORM *);
    327  1.15     blymn int          form_max_page(FORM *);
    328   1.1     blymn Form_Options form_opts(FORM *);
    329  1.15     blymn int          form_opts_off(FORM *, Form_Options);
    330  1.15     blymn int          form_opts_on(FORM *, Form_Options);
    331  1.15     blymn int          form_page(FORM *);
    332  1.15     blymn WINDOW      *form_sub(FORM *);
    333  1.15     blymn Form_Hook    form_term(FORM *);
    334  1.15     blymn void        *form_userptr(FORM *);
    335  1.15     blymn WINDOW      *form_win(FORM *);
    336  1.15     blymn int          free_field(FIELD *);
    337  1.15     blymn int          free_fieldtype(FIELDTYPE *);
    338  1.15     blymn int          free_form(FORM *);
    339  1.15     blymn FIELD       *link_field(FIELD *, int, int);
    340  1.15     blymn FIELDTYPE   *link_fieldtype(FIELDTYPE *, FIELDTYPE *);
    341  1.15     blymn int          move_field(FIELD *, int, int);
    342  1.15     blymn FIELD       *new_field(int, int, int, int, int, int);
    343  1.15     blymn FIELDTYPE   *new_fieldtype(int (* field_check)(FIELD *, char *),
    344  1.15     blymn 			   int (* char_check)(int, char *));
    345  1.15     blymn FORM        *new_form(FIELD **);
    346  1.15     blymn int          new_page(FIELD *);
    347  1.15     blymn int          pos_form_cursor(FORM *);
    348  1.15     blymn int          post_form(FORM *);
    349  1.15     blymn int          scale_form(FORM *, int *, int *);
    350  1.15     blymn int          set_current_field(FORM *, FIELD *);
    351  1.15     blymn int          set_field_back(FIELD *, chtype);
    352  1.23     joerg int          set_field_buffer(FIELD *, int, const char *);
    353  1.15     blymn int          set_field_fore(FIELD *, chtype);
    354  1.15     blymn int          set_field_init(FORM *, Form_Hook);
    355  1.15     blymn int          set_field_just(FIELD *, int);
    356  1.15     blymn int          set_field_opts(FIELD *, Form_Options);
    357  1.15     blymn int          set_field_pad(FIELD *, int);
    358  1.21     joerg int          set_field_printf(FIELD *, int, char *, ...) __printflike(3, 4);
    359  1.15     blymn int          set_field_status(FIELD *, int);
    360  1.15     blymn int          set_field_term(FORM *, Form_Hook);
    361  1.15     blymn int          set_field_type(FIELD *, FIELDTYPE *, ...);
    362  1.15     blymn int          set_field_userptr(FIELD *, void *);
    363  1.15     blymn int          set_fieldtype_arg(FIELDTYPE *, char *(*)(va_list *),
    364  1.15     blymn 			       char *(*)(char *),
    365  1.15     blymn 			       void (*)(char *));
    366  1.15     blymn int          set_fieldtype_choice(FIELDTYPE *, int (*)(FIELD *, char *),
    367  1.15     blymn 				  int (*)(FIELD *, char *));
    368  1.15     blymn int          set_form_fields(FORM *, FIELD **);
    369  1.15     blymn int          set_form_init(FORM *, Form_Hook);
    370  1.15     blymn int          set_form_opts(FORM *, Form_Options);
    371  1.15     blymn int          set_form_page(FORM *, int);
    372  1.15     blymn int          set_form_sub(FORM *, WINDOW *);
    373  1.15     blymn int          set_form_term(FORM *, Form_Hook);
    374  1.15     blymn int          set_form_userptr(FORM *, void *);
    375  1.15     blymn int          set_form_win(FORM *, WINDOW *);
    376  1.15     blymn int          set_max_field(FIELD *, int);
    377  1.15     blymn int          set_new_page(FIELD *, int);
    378  1.15     blymn int          unpost_form(FORM *);
    379   1.1     blymn 
    380   1.1     blymn __END_DECLS
    381   1.1     blymn 
    382   1.4       cgd #endif /* FORM_H */
    383