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
e26c263e
Kaydet (Commit)
e26c263e
authored
Şub 28, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
more stuff
üst
a12ef943
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
Menus.py
Mac/Lib/toolbox/Menus.py
+3
-1
Evtmodule.c
Mac/Modules/evt/Evtmodule.c
+17
-10
evtsupport.py
Mac/Modules/evt/evtsupport.py
+4
-2
No files found.
Mac/Lib/toolbox/Menus.py
Dosyayı görüntüle @
e26c263e
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Menus.h'
mDrawMsg
=
0
mChooseMsg
=
1
mSizeMsg
=
2
...
...
@@ -9,4 +10,5 @@ hMenuCmd = 27
hierMenu
=
-
1
mPopUpMsg
=
3
mctAllItems
=
-
98
mctLastIDIndic
=
-
99
/*
last
color
table
entry
has
this
in
ID
field
*/
mctLastIDIndic
=
-
99
Mac/Modules/evt/Evtmodule.c
Dosyayı görüntüle @
e26c263e
...
...
@@ -30,7 +30,10 @@ extern int MenuObj_Convert(PyObject *, MenuHandle *);
extern
PyObject
*
CtlObj_New
(
ControlHandle
);
extern
int
CtlObj_Convert
(
PyObject
*
,
ControlHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <Events.h>
#include <Desk.h>
#define resNotFound -192
/* Can't include <Errors.h> because of Python's "errors.h" */
...
...
@@ -159,27 +162,30 @@ static PyObject *Evt_GetKeys(_self, _args)
{
PyObject
*
_res
=
NULL
;
KeyMap
theKeys__out__
;
int
theKeys__len__
;
if
(
!
PyArg_ParseTuple
(
_args
,
""
))
return
NULL
;
GetKeys
(
theKeys__out__
);
_res
=
Py_BuildValue
(
"s#"
,
(
char
*
)
&
theKeys__out__
,
sizeof
(
KeyMap
));
(
char
*
)
&
theKeys__out__
,
(
int
)
sizeof
(
KeyMap
));
theKeys__error__
:
;
return
_res
;
}
static
PyObject
*
Evt_
TickCount
(
_self
,
_args
)
static
PyObject
*
Evt_
SystemClick
(
_self
,
_args
)
PyObject
*
_self
;
PyObject
*
_args
;
{
PyObject
*
_res
=
NULL
;
long
_rv
;
if
(
!
PyArg_ParseTuple
(
_args
,
""
))
EventRecord
theEvent
;
WindowPtr
theWindow
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&O&"
,
PyMac_GetEventRecord
,
&
theEvent
,
WinObj_Convert
,
&
theWindow
))
return
NULL
;
_rv
=
TickCount
();
_res
=
Py_BuildValue
(
"l"
,
_rv
);
SystemClick
(
&
theEvent
,
theWindow
);
Py_INCREF
(
Py_None
);
_res
=
Py_None
;
return
_res
;
}
...
...
@@ -200,8 +206,8 @@ static PyMethodDef Evt_methods[] = {
"() -> (Boolean _rv)"
},
{
"GetKeys"
,
(
PyCFunction
)
Evt_GetKeys
,
1
,
"() -> (KeyMap theKeys)"
},
{
"
TickCount"
,
(
PyCFunction
)
Evt_TickCount
,
1
,
"(
) -> (long _rv)
"
},
{
"
SystemClick"
,
(
PyCFunction
)
Evt_SystemClick
,
1
,
"(
EventRecord theEvent, WindowPtr theWindow) -> None
"
},
{
NULL
,
NULL
,
0
}
};
...
...
@@ -226,3 +232,4 @@ void initEvt()
/* ========================= End module Evt ========================= */
Mac/Modules/evt/evtsupport.py
Dosyayı görüntüle @
e26c263e
...
...
@@ -22,8 +22,7 @@ from macsupport import *
# Create the type objects
WindowPtr
=
OpaqueByValueType
(
OBJECTTYPE
,
OBJECTPREFIX
)
WindowPeek
=
OpaqueByValueType
(
"WindowPeek"
,
OBJECTPREFIX
)
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
RgnHandle
=
FakeType
(
"(RgnHandle)0"
)
# XXX
...
...
@@ -31,6 +30,7 @@ KeyMap = ArrayOutputBufferType("KeyMap")
includestuff
=
includestuff
+
"""
#include <
%
s>"""
%
MACHEADERFILE
+
"""
#include <Desk.h>
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
"""
...
...
@@ -63,6 +63,7 @@ Function = OSErrFunctionGenerator
functions
=
[]
##methods = []
execfile
(
INPUTFILE
)
execfile
(
"evtedit.py"
)
# add the populated lists to the generator groups
# (in a different wordl the scan program would generate this)
...
...
@@ -72,3 +73,4 @@ for f in functions: 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