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
2e871e4f
Kaydet (Commit)
2e871e4f
authored
Eyl 08, 1997
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added SysBeep
üst
5b3c9717
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
macosmodule.c
Mac/Modules/macosmodule.c
+22
-7
No files found.
Mac/Modules/macosmodule.c
Dosyayı görüntüle @
2e871e4f
...
@@ -482,13 +482,13 @@ MacOS_EnableAppswitch(PyObject *self, PyObject *args)
...
@@ -482,13 +482,13 @@ MacOS_EnableAppswitch(PyObject *self, PyObject *args)
if
(
schp
.
process_events
)
if
(
schp
.
process_events
)
old
=
1
;
old
=
1
;
else
if
(
schp
.
check_interrupt
)
else
if
(
schp
.
check_interrupt
)
old
=
-
1
;
else
old
=
0
;
old
=
0
;
else
old
=
-
1
;
if
(
new
>
0
)
{
if
(
new
>
0
)
{
schp
.
process_events
=
mDownMask
|
keyDownMask
|
osMask
;
schp
.
process_events
=
mDownMask
|
keyDownMask
|
osMask
;
schp
.
check_interrupt
=
1
;
schp
.
check_interrupt
=
1
;
}
else
if
(
new
<
0
)
{
}
else
if
(
new
==
0
)
{
schp
.
process_events
=
0
;
schp
.
process_events
=
0
;
schp
.
check_interrupt
=
1
;
schp
.
check_interrupt
=
1
;
}
else
{
}
else
{
...
@@ -555,16 +555,14 @@ MacOS_splash(PyObject *self, PyObject *args)
...
@@ -555,16 +555,14 @@ MacOS_splash(PyObject *self, PyObject *args)
{
{
int
resid
=
-
1
;
int
resid
=
-
1
;
static
DialogPtr
curdialog
=
NULL
;
static
DialogPtr
curdialog
=
NULL
;
DialogPtr
olddialog
;
WindowRef
theWindow
;
WindowRef
theWindow
;
CGrafPtr
thePort
;
CGrafPtr
thePort
;
short
xpos
,
ypos
,
width
,
height
,
swidth
,
sheight
;
short
xpos
,
ypos
,
width
,
height
,
swidth
,
sheight
;
if
(
!
PyArg_ParseTuple
(
args
,
"|i"
,
&
resid
))
if
(
!
PyArg_ParseTuple
(
args
,
"|i"
,
&
resid
))
return
NULL
;
return
NULL
;
if
(
curdialog
)
{
olddialog
=
curdialog
;
DisposeDialog
(
curdialog
);
curdialog
=
NULL
;
}
if
(
resid
!=
-
1
)
{
if
(
resid
!=
-
1
)
{
curdialog
=
GetNewDialog
(
resid
,
NULL
,
(
WindowPtr
)
-
1
);
curdialog
=
GetNewDialog
(
resid
,
NULL
,
(
WindowPtr
)
-
1
);
...
@@ -582,6 +580,8 @@ MacOS_splash(PyObject *self, PyObject *args)
...
@@ -582,6 +580,8 @@ MacOS_splash(PyObject *self, PyObject *args)
DrawDialog
(
curdialog
);
DrawDialog
(
curdialog
);
}
}
}
}
if
(
olddialog
)
DisposeDialog
(
olddialog
);
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
}
}
...
@@ -601,6 +601,20 @@ MacOS_DebugStr(PyObject *self, PyObject *args)
...
@@ -601,6 +601,20 @@ MacOS_DebugStr(PyObject *self, PyObject *args)
return
Py_None
;
return
Py_None
;
}
}
static
char
SysBeep_doc
[]
=
"BEEEEEP!!!"
;
static
PyObject
*
MacOS_SysBeep
(
PyObject
*
self
,
PyObject
*
args
)
{
int
duration
=
6
;
if
(
!
PyArg_ParseTuple
(
args
,
"|i"
,
&
duration
))
return
NULL
;
SysBeep
(
duration
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
char
GetTicks_doc
[]
=
"Return number of ticks since bootup"
;
static
char
GetTicks_doc
[]
=
"Return number of ticks since bootup"
;
static
PyObject
*
static
PyObject
*
...
@@ -685,6 +699,7 @@ static PyMethodDef MacOS_Methods[] = {
...
@@ -685,6 +699,7 @@ static PyMethodDef MacOS_Methods[] = {
{
"splash"
,
MacOS_splash
,
1
,
splash_doc
},
{
"splash"
,
MacOS_splash
,
1
,
splash_doc
},
{
"DebugStr"
,
MacOS_DebugStr
,
1
,
DebugStr_doc
},
{
"DebugStr"
,
MacOS_DebugStr
,
1
,
DebugStr_doc
},
{
"GetTicks"
,
MacOS_GetTicks
,
1
,
GetTicks_doc
},
{
"GetTicks"
,
MacOS_GetTicks
,
1
,
GetTicks_doc
},
{
"SysBeep"
,
MacOS_SysBeep
,
1
,
SysBeep_doc
},
{
NULL
,
NULL
}
/* Sentinel */
{
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