]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_threads.3x
ncurses 6.4 - patch 20230917
[ncurses.git] / man / curs_threads.3x
index 17dabdb7b40a560971884e8bc1c45c7c6301d498..c058a14d899a536c7829959d0a794f4d3ba01069 100644 (file)
@@ -1,5 +1,7 @@
+'\" t
 .\"***************************************************************************
-.\" Copyright (c) 2008 Free Software Foundation, Inc.                        *
+.\" Copyright 2021-2022,2023 Thomas E. Dickey                                *
+.\" Copyright 2008-2015,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_threads.3x,v 1.12 2008/04/12 18:22:51 tom Exp $
-.TH curs_threads 3X ""
-.na
-.hy 0
+.\" $Id: curs_threads.3x,v 1.41 2023/09/16 23:37:03 tom Exp $
+.TH curs_threads 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.de bP
+.ie n  .IP \(bu 4
+.el    .IP \(bu 2
+..
 .SH NAME
-\fBuse_screen\fR,
-\fBuse_window\fR - \fBcurses\fR thread support
-.ad
-.hy
+\fB\%curs_threads\fP \-
+\fIcurses\fR thread support
 .SH SYNOPSIS
-\fB#include <curses.h>\fR
+\fB#include <curses.h>\fP
 .sp
-\fBtypedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);\fR
-\fBtypedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);\fR
+\fBtypedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);\fP
 .br
-\fBint set_escdelay(int size);\fR
-.br
-\fBint set_tabsize(int size);\fR
+\fBtypedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);\fP
+.sp
+\fBint get_escdelay(void);\fP
 .br
-\fBint use_screen(SCREEN *scr, NCURSES_WINDOW_CB func, void *data);\fR
+\fBint set_escdelay(int \fIms\fB);\fR
 .br
-\fBint use_window(WINDOW *win, NCURSES_SCREEN_CB func, void *data);\fR
+\fBint set_tabsize(int \fIcols\fB);\fR
+.sp
+\fBint use_screen(SCREEN *\fIscr\fB, NCURSES_SCREEN_CB \fIfunc\fB, void *\fIdata\fB);\fR
 .br
+\fBint use_window(WINDOW *\fIwin\fB, NCURSES_WINDOW_CB \fIfunc\fB, void *\fIdata\fB);\fR
 .SH DESCRIPTION
 This implementation can be configured to provide rudimentary support
 for multi-threaded applications.
-This makes a different set of libraries, e.g., \fIlibncursest\fP since
+This makes a different set of libraries, e.g., \fBlibncursest\fP since
 the binary interfaces are different.
 .PP
 Rather than modify the interfaces to pass a thread specifier to
@@ -61,7 +65,7 @@ configuration which hide the mutex's needed to prevent concurrent
 use of the global variables when configured for threading.
 .PP
 In addition to forcing access to members of the \fBWINDOW\fP structure
-to be via functions (see \fBcurs_opaque\fP(3x)),
+to be via functions (see \fBcurs_opaque\fP(3X)),
 it makes functions of the common global variables,
 e.g.,
 COLORS,
@@ -89,6 +93,8 @@ To modify them in any configuration,
 use the \fBset_escdelay\fP or \fBset_tabsize\fP functions.
 Other global variables are not modifiable.
 .PP
+The \fBget_escdelay\fP function returns the value for ESCDELAY.
+.PP
 The \fBuse_window\fP and \fBuse_screen\fP functions provide coarse
 granularity mutexes for their respective \fBWINDOW\fP and \fBSCREEN\fP
 parameters, and call a user-supplied function,
@@ -100,31 +106,27 @@ All of the ncurses library functions assume that the locale is not
 altered during operation.
 In addition,
 they use data which is maintained within a hierarchy of scopes.
-.RS
-.TP 3
--
+.RS 3
+.bP
 global data, e.g., used in the low-level terminfo or termcap interfaces.
-.TP 3
--
-terminal data, e.g., associated with a call to \fIset_curterm\fP.
+.bP
+terminal data, e.g., associated with a call to \fBset_curterm\fP.
 The terminal data are initialized when screens are created.
-.TP 3
--
-screen data, e.g., associated with a call to \fInewterm\fP or \fIinitscr\fP.
-.TP 3
--
-window data, e.g., associated with a call to \fInewwin\fP or \fIsubwin\fP.
+.bP
+screen data, e.g., associated with a call to \fBnewterm\fP or \fBinitscr\fP.
+.bP
+window data, e.g., associated with a call to \fBnewwin\fP or \fBsubwin\fP.
 Windows are associated with screens.
 Pads are not necessarily associated with a particular screen.
 .IP
 Most curses applications operate on one or more windows within a single screen.
-.TP 3
--
+.bP
 reentrant, i.e., it uses only the data passed as parameters.
 .RE
 .PP
 This table lists the scope of data used for each symbol in the
 ncurses library when it is configured to support threading:
+.PP
 .TS
 center tab(/);
 l l
@@ -136,7 +138,7 @@ COLORS/screen (readonly)
 COLOR_PAIR/reentrant
 COLOR_PAIRS/screen (readonly)
 COLS/screen (readonly)
-ESCDELAY/screen (readonly, see \fIset_escdelay\fP)
+ESCDELAY/screen (readonly, see \fBset_escdelay\fP)
 LINES/screen (readonly)
 PAIR_NUMBER/reentrant
 PC/global
@@ -537,6 +539,7 @@ wget_wch/screen (input-operation)
 wget_wstr/screen (input-operation)
 wgetbkgrnd/window
 wgetch/screen (input-operation)
+wgetdelay/window
 wgetn_wstr/screen (input-operation)
 wgetnstr/screen (input-operation)
 wgetparent/window
@@ -584,7 +587,7 @@ wvline_set/window
 .TE
 .\" ***************************************************************************
 .SH RETURN VALUE
-These functions all return TRUE or FALSE, except as noted.
+These functions all return \fBTRUE\fP or \fBFALSE\fP, except as noted.
 .SH NOTES
 Both a macro and a function are provided for each name.
 .SH PORTABILITY
@@ -593,11 +596,6 @@ They were not supported on Version 7, BSD or System V implementations.
 It is recommended that any code depending on ncurses extensions
 be conditioned using NCURSES_VERSION.
 .SH SEE ALSO
-\fBcurses\fR(3X),
-\fBcurs_opaque\fR(3X)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
+\fBcurses\fP(3X),
+\fBcurs_opaque\fP(3X),
+\fBcurs_variables\fP(3X).