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
91b5bedf
Kaydet (Commit)
91b5bedf
authored
Eyl 17, 1998
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added optional mouseregion parameter to WaitNextEvent (which is now
manually generated).
üst
64421160
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
25 deletions
+56
-25
Evtmodule.c
Mac/Modules/evt/Evtmodule.c
+30
-25
evtscan.py
Mac/Modules/evt/evtscan.py
+1
-0
evtsupport.py
Mac/Modules/evt/evtsupport.py
+25
-0
No files found.
Mac/Modules/evt/Evtmodule.c
Dosyayı görüntüle @
91b5bedf
...
...
@@ -195,29 +195,6 @@ static PyObject *Evt_GetNextEvent(_self, _args)
return
_res
;
}
static
PyObject
*
Evt_WaitNextEvent
(
_self
,
_args
)
PyObject
*
_self
;
PyObject
*
_args
;
{
PyObject
*
_res
=
NULL
;
Boolean
_rv
;
EventMask
eventMask
;
EventRecord
theEvent
;
UInt32
sleep
;
if
(
!
PyArg_ParseTuple
(
_args
,
"hl"
,
&
eventMask
,
&
sleep
))
return
NULL
;
_rv
=
WaitNextEvent
(
eventMask
,
&
theEvent
,
sleep
,
(
RgnHandle
)
0
);
_res
=
Py_BuildValue
(
"bO&"
,
_rv
,
PyMac_BuildEventRecord
,
&
theEvent
);
return
_res
;
}
static
PyObject
*
Evt_EventAvail
(
_self
,
_args
)
PyObject
*
_self
;
PyObject
*
_args
;
...
...
@@ -360,6 +337,34 @@ static PyObject *Evt_SystemEvent(_self, _args)
return
_res
;
}
static
PyObject
*
Evt_WaitNextEvent
(
_self
,
_args
)
PyObject
*
_self
;
PyObject
*
_args
;
{
PyObject
*
_res
=
NULL
;
Boolean
_rv
;
EventMask
eventMask
;
EventRecord
theEvent
;
UInt32
sleep
;
Handle
mouseregion
=
(
Handle
)
0
;
if
(
!
PyArg_ParseTuple
(
_args
,
"hl|O&"
,
&
eventMask
,
&
sleep
,
OptResObj_Convert
,
&
mouseregion
))
return
NULL
;
_rv
=
WaitNextEvent
(
eventMask
,
&
theEvent
,
sleep
,
(
RgnHandle
)
mouseregion
);
_res
=
Py_BuildValue
(
"bO&"
,
_rv
,
PyMac_BuildEventRecord
,
&
theEvent
);
return
_res
;
}
static
PyMethodDef
Evt_methods
[]
=
{
{
"GetMouse"
,
(
PyCFunction
)
Evt_GetMouse
,
1
,
"() -> (Point mouseLoc)"
},
...
...
@@ -381,8 +386,6 @@ static PyMethodDef Evt_methods[] = {
"(EventMask value) -> None"
},
{
"GetNextEvent"
,
(
PyCFunction
)
Evt_GetNextEvent
,
1
,
"(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"
},
{
"WaitNextEvent"
,
(
PyCFunction
)
Evt_WaitNextEvent
,
1
,
"(EventMask eventMask, UInt32 sleep) -> (Boolean _rv, EventRecord theEvent)"
},
{
"EventAvail"
,
(
PyCFunction
)
Evt_EventAvail
,
1
,
"(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)"
},
{
"PostEvent"
,
(
PyCFunction
)
Evt_PostEvent
,
1
,
...
...
@@ -399,6 +402,8 @@ static PyMethodDef Evt_methods[] = {
"() -> None"
},
{
"SystemEvent"
,
(
PyCFunction
)
Evt_SystemEvent
,
1
,
"(EventRecord theEvent) -> (Boolean _rv)"
},
{
"WaitNextEvent"
,
(
PyCFunction
)
Evt_WaitNextEvent
,
1
,
"(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"
},
{
NULL
,
NULL
,
0
}
};
...
...
Mac/Modules/evt/evtscan.py
Dosyayı görüntüle @
91b5bedf
...
...
@@ -39,6 +39,7 @@ class MyScanner(Scanner):
return
[
"KeyTranslate"
,
"GetEventMask"
,
# I cannot seem to find this routine...
"WaitNextEvent"
# Manually generated because of optional region
]
def
makeblacklisttypes
(
self
):
...
...
Mac/Modules/evt/evtsupport.py
Dosyayı görüntüle @
91b5bedf
...
...
@@ -74,6 +74,31 @@ execfile(INPUTFILE)
for
f
in
functions
:
module
.
add
(
f
)
##for f in methods: object.add(f)
WaitNextEvent_body
=
"""
Boolean _rv;
EventMask eventMask;
EventRecord theEvent;
UInt32 sleep;
Handle mouseregion = (Handle)0;
if (!PyArg_ParseTuple(_args, "hl|O&",
&eventMask,
&sleep,
OptResObj_Convert, &mouseregion))
return NULL;
_rv = WaitNextEvent(eventMask,
&theEvent,
sleep,
(RgnHandle)mouseregion);
_res = Py_BuildValue("bO&",
_rv,
PyMac_BuildEventRecord, &theEvent);
return _res;
"""
f
=
ManualGenerator
(
"WaitNextEvent"
,
WaitNextEvent_body
);
f
.
docstring
=
lambda
:
"(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"
module
.
add
(
f
)
# generate output (open the output file as late as possible)
SetOutputFileName
(
OUTPUTFILE
)
module
.
generate
()
...
...
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