1*53ebe243Sjoerg /* $NetBSD: form.h,v 1.23 2015/09/07 15:50:49 joerg Exp $ */ 241859428Sblymn 341859428Sblymn /*- 441859428Sblymn * Copyright (c) 1998-1999 Brett Lymn 541859428Sblymn * (blymn@baea.com.au, brett_lymn@yahoo.com.au) 641859428Sblymn * All rights reserved. 741859428Sblymn * 841859428Sblymn * This code has been donated to The NetBSD Foundation by the Author. 941859428Sblymn * 1041859428Sblymn * Redistribution and use in source and binary forms, with or without 1141859428Sblymn * modification, are permitted provided that the following conditions 1241859428Sblymn * are met: 1341859428Sblymn * 1. Redistributions of source code must retain the above copyright 1441859428Sblymn * notice, this list of conditions and the following disclaimer. 1541859428Sblymn * 2. The name of the author may not be used to endorse or promote products 16c03a48d6Swiz * derived from this software without specific prior written permission 1741859428Sblymn * 1841859428Sblymn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1941859428Sblymn * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2041859428Sblymn * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2141859428Sblymn * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2241859428Sblymn * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2341859428Sblymn * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2441859428Sblymn * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2541859428Sblymn * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2641859428Sblymn * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2741859428Sblymn * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2841859428Sblymn * 2941859428Sblymn * 3041859428Sblymn */ 3141859428Sblymn 3241859428Sblymn #ifndef FORM_H 3341859428Sblymn #define FORM_H 1 3441859428Sblymn #include <sys/queue.h> 3541859428Sblymn #include <stdarg.h> 3641859428Sblymn #include <curses.h> 3741859428Sblymn #include <eti.h> 3841859428Sblymn 3941859428Sblymn /* Define the types of field justification that can be used. */ 40172c5642Sblymn #define NO_JUSTIFICATION (0) 41172c5642Sblymn #define JUSTIFY_RIGHT (1) 42172c5642Sblymn #define JUSTIFY_LEFT (2) 43172c5642Sblymn #define JUSTIFY_CENTER (3) 4441859428Sblymn 4541859428Sblymn /* Define the max and min valid justification styles for range checking */ 4641859428Sblymn #define MIN_JUST_STYLE NO_JUSTIFICATION 4741859428Sblymn #define MAX_JUST_STYLE JUSTIFY_CENTER 4841859428Sblymn 4941859428Sblymn /* Options for the fields */ 5041859428Sblymn typedef unsigned int Form_Options; 5141859428Sblymn 526334f191Sblymn /* form options */ 536334f191Sblymn #define O_BS_OVERLOAD (0x001) 546334f191Sblymn #define O_NL_OVERLOAD (0x002) 556334f191Sblymn 566334f191Sblymn /* field options */ 57172c5642Sblymn #define O_VISIBLE (0x001) /* Field is visible */ 58172c5642Sblymn #define O_ACTIVE (0x002) /* Field is active in the form */ 59172c5642Sblymn #define O_PUBLIC (0x004) /* The contents entered into the field is echoed */ 60172c5642Sblymn #define O_EDIT (0x008) /* Can edit the field */ 61172c5642Sblymn #define O_WRAP (0x010) /* The field contents can line wrap */ 62172c5642Sblymn #define O_BLANK (0x020) /* Blank the field on modification */ 63172c5642Sblymn #define O_AUTOSKIP (0x040) /* Skip to next field when current is full */ 64172c5642Sblymn #define O_NULLOK (0x080) /* Field is allowed to contain no data */ 65172c5642Sblymn #define O_STATIC (0x100) /* Field is not dynamic */ 66172c5642Sblymn #define O_PASSOK (0x200) /* An umodified field is OK */ 6719f07fb2Sblymn #define O_REFORMAT (0x400) /* Insert newlines at linebreaks on buffer get */ 6841859428Sblymn 6999af4c10Sblymn /* 7099af4c10Sblymn * Form driver requests - be VERY careful about changing the ordering 7199af4c10Sblymn * of the requests below. The form driver code depends on a particular 7299af4c10Sblymn * order for the requests. 7399af4c10Sblymn */ 74172c5642Sblymn #define REQ_MIN_REQUEST (KEY_MAX + 0x101) /* must equal value of the 75172c5642Sblymn first request */ 7641859428Sblymn 77172c5642Sblymn #define REQ_NEXT_PAGE (KEY_MAX + 0x101) /* next page in form */ 78172c5642Sblymn #define REQ_PREV_PAGE (KEY_MAX + 0x102) /* previous page in form */ 79172c5642Sblymn #define REQ_FIRST_PAGE (KEY_MAX + 0x103) /* goto first page in form */ 80172c5642Sblymn #define REQ_LAST_PAGE (KEY_MAX + 0x104) /* goto last page in form */ 8141859428Sblymn 82172c5642Sblymn #define REQ_NEXT_FIELD (KEY_MAX + 0x105) /* move to the next field */ 83172c5642Sblymn #define REQ_PREV_FIELD (KEY_MAX + 0x106) /* move to the previous field */ 84172c5642Sblymn #define REQ_FIRST_FIELD (KEY_MAX + 0x107) /* goto the first field */ 85172c5642Sblymn #define REQ_LAST_FIELD (KEY_MAX + 0x108) /* goto the last field */ 8641859428Sblymn 87172c5642Sblymn #define REQ_SNEXT_FIELD (KEY_MAX + 0x109) /* move to the next field 88172c5642Sblymn in sorted order */ 89172c5642Sblymn #define REQ_SPREV_FIELD (KEY_MAX + 0x10a) /* move to the prev field 90172c5642Sblymn in sorted order */ 91172c5642Sblymn #define REQ_SFIRST_FIELD (KEY_MAX + 0x10b) /* move to the first 92172c5642Sblymn sorted field */ 93172c5642Sblymn #define REQ_SLAST_FIELD (KEY_MAX + 0x10c) /* move to the last sorted 94172c5642Sblymn field */ 9541859428Sblymn 96172c5642Sblymn #define REQ_LEFT_FIELD (KEY_MAX + 0x10d) /* go left one field */ 97172c5642Sblymn #define REQ_RIGHT_FIELD (KEY_MAX + 0x10e) /* go right one field */ 98172c5642Sblymn #define REQ_UP_FIELD (KEY_MAX + 0x10f) /* go up one field */ 99172c5642Sblymn #define REQ_DOWN_FIELD (KEY_MAX + 0x110) /* go down one field */ 10041859428Sblymn 101172c5642Sblymn #define REQ_NEXT_CHAR (KEY_MAX + 0x111) /* move to the next char 102172c5642Sblymn in field */ 103172c5642Sblymn #define REQ_PREV_CHAR (KEY_MAX + 0x112) /* move to the previous 104172c5642Sblymn char in field */ 105172c5642Sblymn #define REQ_NEXT_LINE (KEY_MAX + 0x113) /* go to the next line in 106172c5642Sblymn the field */ 107172c5642Sblymn #define REQ_PREV_LINE (KEY_MAX + 0x114) /* go to the previous line 108172c5642Sblymn in the field */ 109172c5642Sblymn #define REQ_NEXT_WORD (KEY_MAX + 0x115) /* go to the next word in 110172c5642Sblymn the field */ 111172c5642Sblymn #define REQ_PREV_WORD (KEY_MAX + 0x116) /* go to the previous word 112172c5642Sblymn in the field */ 113172c5642Sblymn #define REQ_BEG_FIELD (KEY_MAX + 0x117) /* go to the beginning of 114172c5642Sblymn the field */ 115172c5642Sblymn #define REQ_END_FIELD (KEY_MAX + 0x118) /* go to the end of the field */ 116172c5642Sblymn #define REQ_BEG_LINE (KEY_MAX + 0x119) /* go to the beginning of 117172c5642Sblymn the line */ 118172c5642Sblymn #define REQ_END_LINE (KEY_MAX + 0x11a) /* go to the end of the 119172c5642Sblymn line */ 120172c5642Sblymn #define REQ_LEFT_CHAR (KEY_MAX + 0x11b) /* move left in the field */ 121172c5642Sblymn #define REQ_RIGHT_CHAR (KEY_MAX + 0x11c) /* move right in the field */ 122172c5642Sblymn #define REQ_UP_CHAR (KEY_MAX + 0x11d) /* move up in the field */ 123172c5642Sblymn #define REQ_DOWN_CHAR (KEY_MAX + 0x11e) /* move down in the field */ 12441859428Sblymn 125172c5642Sblymn #define REQ_NEW_LINE (KEY_MAX + 0x11f) /* insert/overlay a new line */ 126172c5642Sblymn #define REQ_INS_CHAR (KEY_MAX + 0x120) /* insert a blank char at 127172c5642Sblymn the cursor */ 128172c5642Sblymn #define REQ_INS_LINE (KEY_MAX + 0x121) /* insert a blank line at 129172c5642Sblymn the cursor */ 13041859428Sblymn 131172c5642Sblymn #define REQ_DEL_CHAR (KEY_MAX + 0x122) /* delete the current character */ 132172c5642Sblymn #define REQ_DEL_PREV (KEY_MAX + 0x123) /* delete the character 133172c5642Sblymn before the current */ 134172c5642Sblymn #define REQ_DEL_LINE (KEY_MAX + 0x124) /* delete the current line */ 135172c5642Sblymn #define REQ_DEL_WORD (KEY_MAX + 0x125) /* delete the word at the cursor */ 136172c5642Sblymn #define REQ_CLR_EOL (KEY_MAX + 0x126) /* clear to the end of the line */ 137172c5642Sblymn #define REQ_CLR_EOF (KEY_MAX + 0x127) /* clear to the end of the field */ 138172c5642Sblymn #define REQ_CLR_FIELD (KEY_MAX + 0x128) /* clear the field */ 13941859428Sblymn 140172c5642Sblymn #define REQ_OVL_MODE (KEY_MAX + 0x129) /* overlay mode */ 141172c5642Sblymn #define REQ_INS_MODE (KEY_MAX + 0x12a) /* insert mode */ 14241859428Sblymn 143172c5642Sblymn #define REQ_SCR_FLINE (KEY_MAX + 0x12b) /* scroll field forward one line */ 144172c5642Sblymn #define REQ_SCR_BLINE (KEY_MAX + 0x12c) /* scroll field backward 145172c5642Sblymn one line */ 146172c5642Sblymn #define REQ_SCR_FPAGE (KEY_MAX + 0x12d) /* scroll field forward one page */ 147172c5642Sblymn #define REQ_SCR_BPAGE (KEY_MAX + 0x12e) /* scroll field backward 148172c5642Sblymn one page */ 149172c5642Sblymn #define REQ_SCR_FHPAGE (KEY_MAX + 0x12f) /* scroll field forward 150172c5642Sblymn half a page */ 151172c5642Sblymn #define REQ_SCR_BHPAGE (KEY_MAX + 0x130) /* scroll field backward 152172c5642Sblymn half a page */ 15341859428Sblymn 154172c5642Sblymn #define REQ_SCR_FCHAR (KEY_MAX + 0x131) /* horizontal scroll 155172c5642Sblymn forward a character */ 156172c5642Sblymn #define REQ_SCR_BCHAR (KEY_MAX + 0x132) /* horizontal scroll 157172c5642Sblymn backward a character */ 158172c5642Sblymn #define REQ_SCR_HFLINE (KEY_MAX + 0x133) /* horizontal scroll 159172c5642Sblymn forward a line */ 160172c5642Sblymn #define REQ_SCR_HBLINE (KEY_MAX + 0x134) /* horizontal scroll 161172c5642Sblymn backward a line */ 162172c5642Sblymn #define REQ_SCR_HFHALF (KEY_MAX + 0x135) /* horizontal scroll 163172c5642Sblymn forward half a line */ 164172c5642Sblymn #define REQ_SCR_HBHALF (KEY_MAX + 0x136) /* horizontal scroll 165172c5642Sblymn backward half a line */ 16641859428Sblymn 167172c5642Sblymn #define REQ_VALIDATION (KEY_MAX + 0x137) /* validate the field */ 168172c5642Sblymn #define REQ_PREV_CHOICE (KEY_MAX + 0x138) /* display previous field choice */ 169172c5642Sblymn #define REQ_NEXT_CHOICE (KEY_MAX + 0x139) /* display next field choice */ 17041859428Sblymn 171172c5642Sblymn #define REQ_MAX_COMMAND (KEY_MAX + 0x139) /* must match the last 172172c5642Sblymn driver command */ 17341859428Sblymn 174316f67d6Sblymn /* The following defines are for ncurses compatibility */ 175316f67d6Sblymn #define MIN_FORM_COMMAND REQ_MIN_REQUEST 176316f67d6Sblymn #define MAX_FORM_COMMAND REQ_MAX_COMMAND 177316f67d6Sblymn 178316f67d6Sblymn 17941859428Sblymn typedef struct _form_string { 18041859428Sblymn size_t allocated; 18141859428Sblymn unsigned int length; 18241859428Sblymn char *string; 18341859428Sblymn } FORM_STR; 18441859428Sblymn 18541859428Sblymn typedef struct _form_field FIELD; 18641859428Sblymn typedef struct _form_struct FORM; 18741859428Sblymn typedef struct _form_fieldtype FIELDTYPE; 18841859428Sblymn 18941859428Sblymn typedef struct _formi_page_struct _FORMI_PAGE_START; 19041859428Sblymn typedef struct formi_type_link_struct _FORMI_TYPE_LINK; 1917ffbe072Sblymn typedef struct _formi_field_lines _FORMI_FIELD_LINES; 1927ffbe072Sblymn 19341859428Sblymn 19441859428Sblymn typedef void (*Form_Hook)(FORM *); 19541859428Sblymn 19641859428Sblymn /* definition of a field in the form */ 19741859428Sblymn struct _form_field { 19841859428Sblymn unsigned int rows; /* rows in the field */ 19941859428Sblymn unsigned int cols; /* columns in the field */ 20041859428Sblymn unsigned int drows; /* dynamic rows */ 20141859428Sblymn unsigned int dcols; /* dynamic columns */ 20241859428Sblymn unsigned int max; /* maximum growth */ 20341859428Sblymn unsigned int form_row; /* starting row in the form subwindow */ 20441859428Sblymn unsigned int form_col; /* starting column in the form subwindow */ 20541859428Sblymn unsigned int nrows; /* number of off screen rows */ 20641859428Sblymn int index; /* index of this field in form fields array. */ 20741859428Sblymn int nbuf; /* number of buffers associated with this field */ 20841859428Sblymn int buf0_status; /* set to true if buffer 0 has changed. */ 20941859428Sblymn int justification; /* justification style of the field */ 21041859428Sblymn int overlay; /* set to true if field is in overlay mode */ 21119f07fb2Sblymn _FORMI_FIELD_LINES *cur_line; /* pointer to the current line cursor 21219f07fb2Sblymn is on */ 21341859428Sblymn unsigned int start_char; /* starting char in string (horiz scroll) */ 21419f07fb2Sblymn _FORMI_FIELD_LINES *start_line; /* start line in field (vert scroll) */ 21541859428Sblymn unsigned int row_count; /* number of rows actually used in field */ 216759e545dSblymn unsigned int row_xpos; /* char offset of cursor in field, not same 217759e545dSblymn as cursor_xpos due to tab expansion */ 21841859428Sblymn unsigned int cursor_xpos; /* x pos of cursor in field */ 21941859428Sblymn unsigned int cursor_ypos; /* y pos of cursor in field */ 22041859428Sblymn short page_break; /* start of a new page on the form if 1 */ 22141859428Sblymn short page; /* number of the page this field is on */ 22241859428Sblymn chtype fore; /* character attributes for the foreground */ 22341859428Sblymn chtype back; /* character attributes for the background */ 22441859428Sblymn int pad; /* padding character */ 22541859428Sblymn Form_Options opts; /* options for the field */ 22641859428Sblymn FORM *parent; /* the form this field is bound to, if any */ 22741859428Sblymn FIELD *up; /* field above this one */ 22841859428Sblymn FIELD *down; /* field below this one */ 22941859428Sblymn FIELD *left; /* field to the left of this one */ 23041859428Sblymn FIELD *right; /* field to the right of this one */ 23141859428Sblymn void *userptr; /* user defined pointer. */ 23241859428Sblymn FIELD *link; /* used if fields are linked */ 23341859428Sblymn FIELDTYPE *type; /* type struct for the field */ 234f1abc9f9Schristos TAILQ_ENTRY(_form_field) glue; /* tail queue glue for sorting fields */ 23541859428Sblymn char *args; /* args for field type. */ 23698eb8895Sroy _FORMI_FIELD_LINES *alines; /* array of the starts and ends of lines */ 23719f07fb2Sblymn _FORMI_FIELD_LINES *free; /* list of lines available for reuse */ 23841859428Sblymn FORM_STR *buffers; /* array of buffers for the field */ 23941859428Sblymn }; 24041859428Sblymn 24141859428Sblymn /* define the types of fields we can have */ 24241859428Sblymn extern FIELDTYPE *TYPE_ALNUM; 24341859428Sblymn extern FIELDTYPE *TYPE_ALPHA; 24441859428Sblymn extern FIELDTYPE *TYPE_ENUM; 24541859428Sblymn extern FIELDTYPE *TYPE_INTEGER; 24641859428Sblymn extern FIELDTYPE *TYPE_NUMERIC; 24741859428Sblymn extern FIELDTYPE *TYPE_REGEXP; 248445edb6dSblymn extern FIELDTYPE *TYPE_IPV4; 249445edb6dSblymn extern FIELDTYPE *TYPE_IPV6; 25041859428Sblymn extern FIELDTYPE *TYPE_USER; 25141859428Sblymn 25241859428Sblymn /* definition of a field type. */ 25341859428Sblymn struct _form_fieldtype { 25441859428Sblymn unsigned flags; /* status of the type */ 25541859428Sblymn unsigned refcount; /* in use if > 0 */ 25641859428Sblymn _FORMI_TYPE_LINK *link; /* set if this type is linked */ 25741859428Sblymn 25841859428Sblymn char * (*make_args)(va_list *); /* make the args for the type */ 25941859428Sblymn char * (*copy_args)(char *); /* copy the args for the type */ 26041859428Sblymn void (*free_args)(char *); /* free storage used by the args */ 26141859428Sblymn int (*field_check)(FIELD *, char *); /* field validation routine */ 26241859428Sblymn int (*char_check)(int, char *); /* char validation routine */ 26341859428Sblymn int (*next_choice)(FIELD *, char *); /* function to select next 26441859428Sblymn choice */ 26541859428Sblymn int (*prev_choice)(FIELD *, char *); /* function to select prev 26641859428Sblymn choice */ 26741859428Sblymn }; 26841859428Sblymn 26941859428Sblymn /*definition of a form */ 27041859428Sblymn 27141859428Sblymn struct _form_struct { 27241859428Sblymn int in_init; /* true if performing a init or term function */ 27341859428Sblymn int posted; /* the form is posted */ 274c0219226Sblymn int wrap; /* wrap from last field to first field if true */ 27541859428Sblymn WINDOW *win; /* window for the form */ 27641859428Sblymn WINDOW *subwin; /* subwindow for the form */ 277172c5642Sblymn WINDOW *scrwin; /* this is the window to use for output */ 27841859428Sblymn void *userptr; /* user defined pointer */ 27941859428Sblymn Form_Options opts; /* options for the form */ 28041859428Sblymn Form_Hook form_init; /* function called when form posted and 28141859428Sblymn after page change */ 28241859428Sblymn Form_Hook form_term; /* function called when form is unposted and 28341859428Sblymn before page change */ 28441859428Sblymn Form_Hook field_init; /* function called when form posted and after 28541859428Sblymn current field changes */ 28641859428Sblymn Form_Hook field_term; /* function called when form unposted and 28741859428Sblymn before current field changes */ 28841859428Sblymn int field_count; /* number of fields attached */ 28941859428Sblymn int cur_field; /* current field */ 29041859428Sblymn int page; /* current page of form */ 29141859428Sblymn int max_page; /* number of pages in the form */ 29241859428Sblymn _FORMI_PAGE_START *page_starts; /* dynamic array of fields that start 29341859428Sblymn the pages */ 294f1abc9f9Schristos TAILQ_HEAD(_formi_sort_head, _form_field) sorted_fields; /* sorted field 29541859428Sblymn list */ 29641859428Sblymn FIELD **fields; /* array of fields attached to this form. */ 29741859428Sblymn }; 29841859428Sblymn 29941859428Sblymn /* Public function prototypes. */ 30041859428Sblymn __BEGIN_DECLS 30141859428Sblymn 30241859428Sblymn FIELD *current_field(FORM *); 30341859428Sblymn int data_ahead(FORM *); 30441859428Sblymn int data_behind(FORM *); 30541859428Sblymn FIELD *dup_field(FIELD *, int, int); 30641859428Sblymn int dynamic_field_info(FIELD *, int *, int *, int *); 30741859428Sblymn char *field_arg(FIELD *); 30841859428Sblymn chtype field_back(FIELD *); 30941859428Sblymn char *field_buffer(FIELD *, int); 31041859428Sblymn int field_count(FORM *); 31141859428Sblymn chtype field_fore(FIELD *); 31241859428Sblymn int field_index(FIELD *); 31311b49061Sblymn int field_info(FIELD *, int *, int *, int *, int *, int *, int *); 31441859428Sblymn Form_Hook field_init(FORM *); 31541859428Sblymn int field_just(FIELD *); 31641859428Sblymn Form_Options field_opts(FIELD *); 31741859428Sblymn int field_opts_off(FIELD *, Form_Options); 31841859428Sblymn int field_opts_on(FIELD *, Form_Options); 31941859428Sblymn int field_pad(FIELD *); 32041859428Sblymn int field_status(FIELD *); 32141859428Sblymn Form_Hook field_term(FORM *); 32241859428Sblymn FIELDTYPE *field_type(FIELD *); 323af28ef95Sblymn void *field_userptr(FIELD *); 32441859428Sblymn int form_driver(FORM *, int); 32541859428Sblymn FIELD **form_fields(FORM *); 32641859428Sblymn Form_Hook form_init(FORM *); 3273ebef9c4Sblymn int form_max_page(FORM *); 32841859428Sblymn Form_Options form_opts(FORM *); 32941859428Sblymn int form_opts_off(FORM *, Form_Options); 33041859428Sblymn int form_opts_on(FORM *, Form_Options); 33141859428Sblymn int form_page(FORM *); 33241859428Sblymn WINDOW *form_sub(FORM *); 33341859428Sblymn Form_Hook form_term(FORM *); 334af28ef95Sblymn void *form_userptr(FORM *); 33541859428Sblymn WINDOW *form_win(FORM *); 33641859428Sblymn int free_field(FIELD *); 33741859428Sblymn int free_fieldtype(FIELDTYPE *); 33841859428Sblymn int free_form(FORM *); 33941859428Sblymn FIELD *link_field(FIELD *, int, int); 34041859428Sblymn FIELDTYPE *link_fieldtype(FIELDTYPE *, FIELDTYPE *); 34141859428Sblymn int move_field(FIELD *, int, int); 34241859428Sblymn FIELD *new_field(int, int, int, int, int, int); 34341859428Sblymn FIELDTYPE *new_fieldtype(int (* field_check)(FIELD *, char *), 34441859428Sblymn int (* char_check)(int, char *)); 34541859428Sblymn FORM *new_form(FIELD **); 34641859428Sblymn int new_page(FIELD *); 34741859428Sblymn int pos_form_cursor(FORM *); 34841859428Sblymn int post_form(FORM *); 34941859428Sblymn int scale_form(FORM *, int *, int *); 35041859428Sblymn int set_current_field(FORM *, FIELD *); 35141859428Sblymn int set_field_back(FIELD *, chtype); 352*53ebe243Sjoerg int set_field_buffer(FIELD *, int, const char *); 35341859428Sblymn int set_field_fore(FIELD *, chtype); 35441859428Sblymn int set_field_init(FORM *, Form_Hook); 35541859428Sblymn int set_field_just(FIELD *, int); 35641859428Sblymn int set_field_opts(FIELD *, Form_Options); 35741859428Sblymn int set_field_pad(FIELD *, int); 35893a30e6dSjoerg int set_field_printf(FIELD *, int, char *, ...) __printflike(3, 4); 35941859428Sblymn int set_field_status(FIELD *, int); 36041859428Sblymn int set_field_term(FORM *, Form_Hook); 36141859428Sblymn int set_field_type(FIELD *, FIELDTYPE *, ...); 362af28ef95Sblymn int set_field_userptr(FIELD *, void *); 36341859428Sblymn int set_fieldtype_arg(FIELDTYPE *, char *(*)(va_list *), 36441859428Sblymn char *(*)(char *), 36541859428Sblymn void (*)(char *)); 36641859428Sblymn int set_fieldtype_choice(FIELDTYPE *, int (*)(FIELD *, char *), 36741859428Sblymn int (*)(FIELD *, char *)); 36841859428Sblymn int set_form_fields(FORM *, FIELD **); 36941859428Sblymn int set_form_init(FORM *, Form_Hook); 37041859428Sblymn int set_form_opts(FORM *, Form_Options); 37141859428Sblymn int set_form_page(FORM *, int); 37241859428Sblymn int set_form_sub(FORM *, WINDOW *); 37341859428Sblymn int set_form_term(FORM *, Form_Hook); 374af28ef95Sblymn int set_form_userptr(FORM *, void *); 37541859428Sblymn int set_form_win(FORM *, WINDOW *); 37641859428Sblymn int set_max_field(FIELD *, int); 37741859428Sblymn int set_new_page(FIELD *, int); 37841859428Sblymn int unpost_form(FORM *); 37941859428Sblymn 38041859428Sblymn __END_DECLS 38141859428Sblymn 382d594ce93Scgd #endif /* FORM_H */ 383