Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
69f31eb8
Kaydet (Commit)
69f31eb8
authored
Agu 13, 2003
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[Patch #739124] Add use_default_colors() to curses module
üst
a54b92b2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
3 deletions
+44
-3
libcurses.tex
Doc/lib/libcurses.tex
+9
-0
whatsnew24.tex
Doc/whatsnew/whatsnew24.tex
+5
-2
test_curses.py
Lib/test/test_curses.py
+3
-0
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+2
-0
_cursesmodule.c
Modules/_cursesmodule.c
+24
-1
No files found.
Doc/lib/libcurses.tex
Dosyayı görüntüle @
69f31eb8
...
...
@@ -537,6 +537,15 @@ a window (in which case default behavior would be to use the window
size if
\envvar
{
LINES
}
and
\envvar
{
COLUMNS
}
are not set).
\end{funcdesc}
\begin{funcdesc}
{
use
_
default
_
colors
}{}
Allow use of default values for colors on terminals supporting this
feature. Use this to support transparency in your
application. The default color is assigned to the color number -1.
After calling this function,
\function
{
init
_
pair(x, curses.COLOR
_
RED, -1)
}
initializes, for instance,
color pair
\var
{
x
}
to a red foreground color on the default background.
\end{funcdesc}
\subsection
{
Window Objects
\label
{
curses-window-objects
}}
Window objects, as returned by
\function
{
initscr()
}
and
...
...
Doc/whatsnew/whatsnew24.tex
Dosyayı görüntüle @
69f31eb8
...
...
@@ -69,8 +69,11 @@ details.
\begin{itemize}
\item
Descriptions go here.
\item
The
\module
{
curses
}
modules now supports the ncurses extension
\function
{
use
_
default
_
colors()
}
. On platforms where the terminal
supports transparency, this makes it possible to use a transparent background.
(Contributed by J
\"
org Lehmann.)
\end{itemize}
...
...
Lib/test/test_curses.py
Dosyayı görüntüle @
69f31eb8
...
...
@@ -181,6 +181,9 @@ def module_funcs(stdscr):
curses
.
pair_content
(
curses
.
COLOR_PAIRS
)
curses
.
pair_number
(
0
)
if
hasattr
(
curses
,
'use_default_colors'
):
curses
.
use_default_colors
()
if
hasattr
(
curses
,
'keyname'
):
curses
.
keyname
(
13
)
...
...
Misc/ACKS
Dosyayı görüntüle @
69f31eb8
...
...
@@ -325,6 +325,7 @@ Inyeol Lee
John J. Lee
Luc Lefebvre
Kip Lehman
Joerg Lehmann
Marc-Andre Lemburg
William Lewis
Robert van Liere
...
...
Misc/NEWS
Dosyayı görüntüle @
69f31eb8
...
...
@@ -22,6 +22,8 @@ Extension modules
- The signal module now exposes SIGRTMIN and SIGRTMAX (if available).
- curses module now supports use_default_colors(). [patch #739124]
Library
-------
...
...
Modules/_cursesmodule.c
Dosyayı görüntüle @
69f31eb8
...
...
@@ -47,7 +47,7 @@ unsupported functions:
resizeterm restartterm ripoffline scr_dump
scr_init scr_restore scr_set scrl set_curterm set_term setterm
tgetent tgetflag tgetnum tgetstr tgoto timeout tputs
use_default_colors
vidattr vidputs waddchnstr waddchstr wchgat
vidattr vidputs waddchnstr waddchstr wchgat
wcolor_set winchnstr winchstr winnstr wmouse_trafo wscrl
Low-priority:
...
...
@@ -2354,6 +2354,26 @@ PyCurses_Use_Env(PyObject *self, PyObject *args)
return
Py_None
;
}
#ifndef STRICT_SYSV_CURSES
static
PyObject
*
PyCurses_Use_Default_Colors
(
PyObject
*
self
)
{
int
code
;
PyCursesInitialised
PyCursesInitialisedColor
code
=
use_default_colors
();
if
(
code
!=
ERR
)
{
Py_INCREF
(
Py_None
);
return
Py_None
;
}
else
{
PyErr_SetString
(
PyCursesError
,
"use_default_colors() returned ERR"
);
return
NULL
;
}
}
#endif
/* STRICT_SYSV_CURSES */
/* List of functions defined in the module */
static
PyMethodDef
PyCurses_methods
[]
=
{
...
...
@@ -2434,6 +2454,9 @@ static PyMethodDef PyCurses_methods[] = {
{
"unctrl"
,
(
PyCFunction
)
PyCurses_UnCtrl
,
METH_VARARGS
},
{
"ungetch"
,
(
PyCFunction
)
PyCurses_UngetCh
,
METH_VARARGS
},
{
"use_env"
,
(
PyCFunction
)
PyCurses_Use_Env
,
METH_VARARGS
},
#ifndef STRICT_SYSV_CURSES
{
"use_default_colors"
,
(
PyCFunction
)
PyCurses_Use_Default_Colors
,
METH_NOARGS
},
#endif
{
NULL
,
NULL
}
/* sentinel */
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment