Skip to content

Commit b39a748

Browse files
authored
bpo-30176: Add missing curses cell attributes constants (#2278)
1 parent c3c9db8 commit b39a748

File tree

2 files changed

+47
-9
lines changed

2 files changed

+47
-9
lines changed

Doc/library/curses.rst

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,27 +1234,63 @@ The :mod:`curses` module defines the following data members:
12341234
A string representing the current version of the module. Also available as
12351235
:const:`__version__`.
12361236

1237-
Several constants are available to specify character cell attributes:
1237+
Some constants are available to specify character cell attributes.
1238+
The exact constants available are system dependent.
12381239

12391240
+------------------+-------------------------------+
12401241
| Attribute | Meaning |
12411242
+==================+===============================+
1242-
| ``A_ALTCHARSET`` | Alternate character set mode. |
1243+
| ``A_ALTCHARSET`` | Alternate character set mode |
12431244
+------------------+-------------------------------+
1244-
| ``A_BLINK`` | Blink mode. |
1245+
| ``A_BLINK`` | Blink mode |
12451246
+------------------+-------------------------------+
1246-
| ``A_BOLD`` | Bold mode. |
1247+
| ``A_BOLD`` | Bold mode |
12471248
+------------------+-------------------------------+
1248-
| ``A_DIM`` | Dim mode. |
1249+
| ``A_DIM`` | Dim mode |
12491250
+------------------+-------------------------------+
1250-
| ``A_NORMAL`` | Normal attribute. |
1251+
| ``A_INVIS`` | Invisible or blank mode |
1252+
+------------------+-------------------------------+
1253+
| ``A_NORMAL`` | Normal attribute |
1254+
+------------------+-------------------------------+
1255+
| ``A_PROTECT`` | Protected mode |
12511256
+------------------+-------------------------------+
12521257
| ``A_REVERSE`` | Reverse background and |
1253-
| | foreground colors. |
1258+
| | foreground colors |
1259+
+------------------+-------------------------------+
1260+
| ``A_STANDOUT`` | Standout mode |
1261+
+------------------+-------------------------------+
1262+
| ``A_UNDERLINE`` | Underline mode |
1263+
+------------------+-------------------------------+
1264+
| ``A_HORIZONTAL`` | Horizontal highlight |
1265+
+------------------+-------------------------------+
1266+
| ``A_LEFT`` | Left highlight |
1267+
+------------------+-------------------------------+
1268+
| ``A_LOW`` | Low highlight |
1269+
+------------------+-------------------------------+
1270+
| ``A_RIGHT`` | Right highlight |
1271+
+------------------+-------------------------------+
1272+
| ``A_TOP`` | Top highlight |
1273+
+------------------+-------------------------------+
1274+
| ``A_VERTICAL`` | Vertical highlight |
1275+
+------------------+-------------------------------+
1276+
| ``A_CHARTEXT`` | Bit-mask to extract a |
1277+
| | character |
1278+
+------------------+-------------------------------+
1279+
1280+
Several constants are available to extract corresponding attributes returned
1281+
by some methods.
1282+
1283+
+------------------+-------------------------------+
1284+
| Bit-mask | Meaning |
1285+
+==================+===============================+
1286+
| ``A_ATTRIBUTES`` | Bit-mask to extract |
1287+
| | attributes |
12541288
+------------------+-------------------------------+
1255-
| ``A_STANDOUT`` | Standout mode. |
1289+
| ``A_CHARTEXT`` | Bit-mask to extract a |
1290+
| | character |
12561291
+------------------+-------------------------------+
1257-
| ``A_UNDERLINE`` | Underline mode. |
1292+
| ``A_COLOR`` | Bit-mask to extract |
1293+
| | color-pair field information |
12581294
+------------------+-------------------------------+
12591295

12601296
Keys are referred to by integer constants with names starting with ``KEY_``.

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ Library
184184
Documentation
185185
-------------
186186

187+
- bpo-30176: Add missing attribute related constants in curses documentation.
188+
187189
- bpo-28929: Link the documentation to its source file on GitHub.
188190

189191
- Issue #26355: Add canonical header link on each page to corresponding major

0 commit comments

Comments
 (0)