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
86c3af7d
Kaydet (Commit)
86c3af7d
authored
Mar 19, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
moved OpenDeskAcc here
üst
f23e0fe3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
Menumodule.c
Mac/Modules/menu/Menumodule.c
+19
-0
menuedit.py
Mac/Modules/menu/menuedit.py
+4
-0
menusupport.py
Mac/Modules/menu/menusupport.py
+7
-0
No files found.
Mac/Modules/menu/Menumodule.c
Dosyayı görüntüle @
86c3af7d
...
...
@@ -32,6 +32,8 @@ extern int CtlObj_Convert(PyObject *, ControlHandle *);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <Devices.h>
/* Defines OpenDeskAcc in universal headers */
#include <Desk.h>
/* Defines OpenDeskAcc in old headers */
#include <Menus.h>
#define resNotFound -192
/* Can't include <Errors.h> because of Python's "errors.h" */
...
...
@@ -843,6 +845,21 @@ static PyObject *Menu_DelMCEntries(_self, _args)
return
_res
;
}
static
PyObject
*
Menu_OpenDeskAcc
(
_self
,
_args
)
PyObject
*
_self
;
PyObject
*
_args
;
{
PyObject
*
_res
=
NULL
;
Str255
name
;
if
(
!
PyArg_ParseTuple
(
_args
,
"O&"
,
PyMac_GetStr255
,
name
))
return
NULL
;
OpenDeskAcc
(
name
);
Py_INCREF
(
Py_None
);
_res
=
Py_None
;
return
_res
;
}
static
PyMethodDef
Menu_methods
[]
=
{
{
"InitMenus"
,
(
PyCFunction
)
Menu_InitMenus
,
1
,
"() -> None"
},
...
...
@@ -882,6 +899,8 @@ static PyMethodDef Menu_methods[] = {
"() -> (long _rv)"
},
{
"DelMCEntries"
,
(
PyCFunction
)
Menu_DelMCEntries
,
1
,
"(short menuID, short menuItem) -> None"
},
{
"OpenDeskAcc"
,
(
PyCFunction
)
Menu_OpenDeskAcc
,
1
,
"(Str255 name) -> None"
},
{
NULL
,
NULL
,
0
}
};
...
...
Mac/Modules/menu/menuedit.py
0 → 100644
Dosyayı görüntüle @
86c3af7d
f
=
Function
(
void
,
'OpenDeskAcc'
,
(
Str255
,
'name'
,
InMode
),
)
functions
.
append
(
f
)
Mac/Modules/menu/menusupport.py
Dosyayı görüntüle @
86c3af7d
...
...
@@ -5,6 +5,9 @@
import
string
import
addpack
addpack
.
addpack
(
'D:python:Tools:bgen:bgen'
)
# Declarations that change for each manager
MACHEADERFILE
=
'Menus.h'
# The Apple header file
MODNAME
=
'Menu'
# The name of the module
...
...
@@ -15,6 +18,7 @@ MODPREFIX = MODNAME # The prefix for module-wide routines
OBJECTTYPE
=
OBJECTNAME
+
'Handle'
# The C type used to represent them
OBJECTPREFIX
=
MODPREFIX
+
'Obj'
# The prefix for object methods
INPUTFILE
=
string
.
lower
(
MODPREFIX
)
+
'gen.py'
# The file generated by the scanner
EXTRAFILE
=
string
.
lower
(
MODPREFIX
)
+
'edit.py'
# A similar file but hand-made
OUTPUTFILE
=
MODNAME
+
"module.c"
# The file generated by this program
from
macsupport
import
*
...
...
@@ -24,6 +28,8 @@ from macsupport import *
MenuHandle
=
OpaqueByValueType
(
OBJECTTYPE
,
OBJECTPREFIX
)
includestuff
=
includestuff
+
"""
#include <Devices.h> /* Defines OpenDeskAcc in universal headers */
#include <Desk.h> /* Defines OpenDeskAcc in old headers */
#include <
%
s>"""
%
MACHEADERFILE
+
"""
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
...
...
@@ -45,6 +51,7 @@ Method = OSErrMethodGenerator
functions
=
[]
methods
=
[]
execfile
(
INPUTFILE
)
execfile
(
EXTRAFILE
)
# add the populated lists to the generator groups
for
f
in
functions
:
module
.
add
(
f
)
...
...
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