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
ec0107f0
Kaydet (Commit)
ec0107f0
authored
Ock 08, 2002
tarafından
Just van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Today's Carbon Toolbox addition: CarbonEvt.TrackMouseLocation() and friends.
üst
925f1442
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
3 deletions
+86
-3
CarbonEvtscan.py
Mac/Modules/carbonevt/CarbonEvtscan.py
+3
-3
CarbonEvtsupport.py
Mac/Modules/carbonevt/CarbonEvtsupport.py
+5
-0
_CarbonEvtmodule.c
Mac/Modules/carbonevt/_CarbonEvtmodule.c
+78
-0
No files found.
Mac/Modules/carbonevt/CarbonEvtscan.py
Dosyayı görüntüle @
ec0107f0
...
...
@@ -63,9 +63,9 @@ class CarbonEvents_Scanner(Scanner_OSX):
return
[
"sHandler"
,
"MacCreateEvent"
,
"TrackMouseLocationWithOptions"
,
"TrackMouseLocation"
,
"TrackMouseRegion"
,
#
"TrackMouseLocationWithOptions",
#
"TrackMouseLocation",
#
"TrackMouseRegion",
"RegisterToolboxObjectClass"
,
"UnregisterToolboxObjectClass"
,
"ProcessHICommand"
,
...
...
Mac/Modules/carbonevt/CarbonEvtsupport.py
Dosyayı görüntüle @
ec0107f0
...
...
@@ -68,6 +68,11 @@ class EventHandlerRefMethod(OSErrMethodGenerator):
OutRbrace
()
RgnHandle
=
OpaqueByValueType
(
"RgnHandle"
,
"ResObj"
)
GrafPtr
=
OpaqueByValueType
(
"GrafPtr"
,
"GrafObj"
)
MouseTrackingResult
=
UInt16
includestuff
=
r"""
#ifdef WITHOUT_FRAMEWORKS
#include <CarbonEvents.h>
...
...
Mac/Modules/carbonevt/_CarbonEvtmodule.c
Dosyayı görüntüle @
ec0107f0
...
...
@@ -1390,6 +1390,78 @@ static PyObject *CarbonEvents_GetCurrentEventTime(PyObject *_self, PyObject *_ar
return
_res
;
}
static
PyObject
*
CarbonEvents_TrackMouseLocation
(
PyObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
OSStatus
_err
;
GrafPtr
inPort
;
Point
outPt
;
UInt16
outResult
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&"
,
GrafObj_Convert
,
&
inPort
))
return
NULL
;
_err
=
TrackMouseLocation
(
inPort
,
&
outPt
,
&
outResult
);
if
(
_err
!=
noErr
)
return
PyMac_Error
(
_err
);
_res
=
Py_BuildValue
(
"O&H"
,
PyMac_BuildPoint
,
outPt
,
outResult
);
return
_res
;
}
static
PyObject
*
CarbonEvents_TrackMouseLocationWithOptions
(
PyObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
OSStatus
_err
;
GrafPtr
inPort
;
OptionBits
inOptions
;
double
inTimeout
;
Point
outPt
;
UInt32
outModifiers
;
UInt16
outResult
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&ld"
,
GrafObj_Convert
,
&
inPort
,
&
inOptions
,
&
inTimeout
))
return
NULL
;
_err
=
TrackMouseLocationWithOptions
(
inPort
,
inOptions
,
inTimeout
,
&
outPt
,
&
outModifiers
,
&
outResult
);
if
(
_err
!=
noErr
)
return
PyMac_Error
(
_err
);
_res
=
Py_BuildValue
(
"O&lH"
,
PyMac_BuildPoint
,
outPt
,
outModifiers
,
outResult
);
return
_res
;
}
static
PyObject
*
CarbonEvents_TrackMouseRegion
(
PyObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
OSStatus
_err
;
GrafPtr
inPort
;
RgnHandle
inRegion
;
Boolean
ioWasInRgn
;
UInt16
outResult
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&O&"
,
GrafObj_Convert
,
&
inPort
,
ResObj_Convert
,
&
inRegion
))
return
NULL
;
_err
=
TrackMouseRegion
(
inPort
,
inRegion
,
&
ioWasInRgn
,
&
outResult
);
if
(
_err
!=
noErr
)
return
PyMac_Error
(
_err
);
_res
=
Py_BuildValue
(
"bH"
,
ioWasInRgn
,
outResult
);
return
_res
;
}
static
PyObject
*
CarbonEvents_GetLastUserEventTime
(
PyObject
*
_self
,
PyObject
*
_args
)
{
PyObject
*
_res
=
NULL
;
...
...
@@ -1718,6 +1790,12 @@ static PyMethodDef CarbonEvents_methods[] = {
"() -> (EventQueueRef _rv)"
},
{
"GetCurrentEventTime"
,
(
PyCFunction
)
CarbonEvents_GetCurrentEventTime
,
1
,
"() -> (double _rv)"
},
{
"TrackMouseLocation"
,
(
PyCFunction
)
CarbonEvents_TrackMouseLocation
,
1
,
"(GrafPtr inPort) -> (Point outPt, UInt16 outResult)"
},
{
"TrackMouseLocationWithOptions"
,
(
PyCFunction
)
CarbonEvents_TrackMouseLocationWithOptions
,
1
,
"(GrafPtr inPort, OptionBits inOptions, double inTimeout) -> (Point outPt, UInt32 outModifiers, UInt16 outResult)"
},
{
"TrackMouseRegion"
,
(
PyCFunction
)
CarbonEvents_TrackMouseRegion
,
1
,
"(GrafPtr inPort, RgnHandle inRegion) -> (Boolean ioWasInRgn, UInt16 outResult)"
},
{
"GetLastUserEventTime"
,
(
PyCFunction
)
CarbonEvents_GetLastUserEventTime
,
1
,
"() -> (double _rv)"
},
{
"GetWindowEventTarget"
,
(
PyCFunction
)
CarbonEvents_GetWindowEventTarget
,
1
,
...
...
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