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
5279ec68
Kaydet (Commit)
5279ec68
authored
Ock 26, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
reverse h/v in Point and Rect
üst
efd9767f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
macglue.c
Mac/Python/macglue.c
+12
-10
No files found.
Mac/Python/macglue.c
Dosyayı görüntüle @
5279ec68
...
@@ -327,36 +327,38 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *fs)
...
@@ -327,36 +327,38 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *fs)
/* Convert a Python object to a Rect.
/* Convert a Python object to a Rect.
The object must be a (top, left, bottom, right) tuple.
The object must be a (left, top, right, bottom) tuple.
(Unfortunately this is different from STDWIN's convention). */
(This differs from the order in the struct but is consistent with
the arguments to SetRect(), and also with STDWIN). */
int
int
PyMac_GetRect
(
PyObject
*
v
,
Rect
*
r
)
PyMac_GetRect
(
PyObject
*
v
,
Rect
*
r
)
{
{
return
PyArg_Parse
(
v
,
"(hhhh)"
,
&
r
->
top
,
&
r
->
left
,
&
r
->
bottom
,
&
r
->
right
);
return
PyArg_Parse
(
v
,
"(hhhh)"
,
&
r
->
left
,
&
r
->
top
,
&
r
->
right
,
&
r
->
bottom
);
}
}
/* Convert a Rect to a Python object */
/* Convert a Rect to a Python object */
PyObject
*
PyObject
*
PyMac_BuildRect
(
Rect
*
r
)
PyMac_BuildRect
(
Rect
*
r
)
{
{
return
Py_BuildValue
(
"(hhhh)"
,
r
->
top
,
r
->
left
,
r
->
bottom
,
r
->
right
);
return
Py_BuildValue
(
"(hhhh)"
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
);
}
}
/* Convert a Python object to a Point.
/* Convert a Python object to a Point.
The object must be a (v, h) tuple.
The object must be a (h, v) tuple.
(Unfortunately this is different from STDWIN's convention). */
(This differs from the order in the struct but is consistent with
the arguments to SetPoint(), and also with STDWIN). */
int
int
PyMac_GetPoint
(
PyObject
*
v
,
Point
*
p
)
PyMac_GetPoint
(
PyObject
*
v
,
Point
*
p
)
{
{
return
PyArg_Parse
(
v
,
"(hh)"
,
&
p
->
v
,
&
p
->
h
);
return
PyArg_Parse
(
v
,
"(hh)"
,
&
p
->
h
,
&
p
->
v
);
}
}
/* Convert a Point to a Python object */
/* Convert a Point to a Python object */
PyObject
*
PyObject
*
PyMac_BuildPoint
(
Point
p
)
PyMac_BuildPoint
(
Point
p
)
{
{
return
Py_BuildValue
(
"(hh)"
,
p
.
v
,
p
.
h
);
return
Py_BuildValue
(
"(hh)"
,
p
.
h
,
p
.
v
);
}
}
...
@@ -369,8 +371,8 @@ PyMac_GetEventRecord(PyObject *v, EventRecord *e)
...
@@ -369,8 +371,8 @@ PyMac_GetEventRecord(PyObject *v, EventRecord *e)
&
e
->
what
,
&
e
->
what
,
&
e
->
message
,
&
e
->
message
,
&
e
->
when
,
&
e
->
when
,
&
e
->
where
.
v
,
&
e
->
where
.
h
,
&
e
->
where
.
h
,
&
e
->
where
.
v
,
&
e
->
modifiers
);
&
e
->
modifiers
);
}
}
...
@@ -382,7 +384,7 @@ PyMac_BuildEventRecord(EventRecord *e)
...
@@ -382,7 +384,7 @@ PyMac_BuildEventRecord(EventRecord *e)
e
->
what
,
e
->
what
,
e
->
message
,
e
->
message
,
e
->
when
,
e
->
when
,
e
->
where
.
v
,
e
->
where
.
h
,
e
->
where
.
h
,
e
->
where
.
v
,
e
->
modifiers
);
e
->
modifiers
);
}
}
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