+'\" t
.\"***************************************************************************
-.\" Copyright 2018-2020,2021 Thomas E. Dickey *
+.\" Copyright 2018-2022,2023 Thomas E. Dickey *
.\" Copyright 1998-2016,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_driver.3x,v 1.38 2021/12/25 21:49:32 tom Exp $
-.TH form_driver 3X ""
+.\" $Id: form_driver.3x,v 1.44 2023/08/06 00:02:02 tom Exp $
+.TH form_driver 3X 2023-08-05 "ncurses 6.4" "Library calls"
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
.SH SYNOPSIS
\fB#include <form.h>\fP
.sp
-\fBint form_driver(FORM *\fP\fIform\fP\fB, int \fP\fIc\fP\fB);\fP
-.br
-\fBint form_driver_w(FORM *\fP\fIform\fP\fB, int \fP\fIc\fP\fB, wchar_t \fP\fIwch\fP\fB);\fP
+\fBint form_driver(FORM *\fIform\fB, int \fIc\fB);\fR
.br
+\fBint form_driver_w(FORM *\fIform\fB, int \fIc\fB, wchar_t \fIwch\fB);\fR
.SH DESCRIPTION
.SS form_driver
Once a form has been posted (displayed), you should funnel input events to it
.bP
The input is the KEY_MOUSE special key associated with an mouse event.
.SS form_driver_w
-.PP
This extension simplifies the use of the forms library using wide characters.
The input is either a key code (a request) or a wide character
returned by \fBget_wch\fP(3X).
to enable the library to determine whether the parameter
is a wide character or a request.
.SS Form-driver requests
-.PP
The form driver requests are as follows:
.TS
l l
to ensure that the contents
meet whatever constraints an application may attach using \fBset_field_type\fP.
.PP
-.PP
You can validate a field without making any changes to it using
\fBREQ_VALIDATION\fP.
The form driver also validates a field in these cases:
data from the window associated with the field
to the field buffer.
.SS Mouse handling
-.PP
If the second argument is the KEY_MOUSE special key, the associated
mouse event is translated into one of the above pre-defined requests.
Currently only clicks in the user window (e.g., inside the form display
or the mouse event could not be translated
into a form request an \fBE_REQUEST_DENIED\fP is returned.
.SS Application-defined commands
-.PP
If the second argument is neither printable nor one of the above
pre-defined form requests, the driver assumes it is an application-specific
command and returns \fBE_UNKNOWN_COMMAND\fP. Application-defined commands