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
8ae8e4f9
Kaydet (Commit)
8ae8e4f9
authored
Nis 23, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Made style and soup handles optional
üst
efe8c9c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
17 deletions
+27
-17
wastemodule.c
Mac/Modules/waste/wastemodule.c
+8
-10
wastescan.py
Mac/Modules/waste/wastescan.py
+14
-3
wastesupport.py
Mac/Modules/waste/wastesupport.py
+5
-4
No files found.
Mac/Modules/waste/wastemodule.c
Dosyayı görüntüle @
8ae8e4f9
...
...
@@ -40,9 +40,6 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern
PyObject
*
BMObj_New
(
BitMapPtr
);
extern
int
BMObj_Convert
(
PyObject
*
,
BitMapPtr
*
);
extern
PyObject
*
PMObj_New
(
PixMapHandle
);
extern
int
PMObj_Convert
(
PyObject
*
,
PixMapHandle
*
);
extern
PyObject
*
WinObj_WhichWindow
(
WindowPtr
);
#include <WASTE.h>
...
...
@@ -559,7 +556,8 @@ static PyObject *wasteObj_WEContinuousStyle(_self, _args)
Boolean
_rv
;
WEStyleMode
mode
;
TextStyle
ts
;
if
(
!
PyArg_ParseTuple
(
_args
,
""
))
if
(
!
PyArg_ParseTuple
(
_args
,
"h"
,
&
mode
))
return
NULL
;
_rv
=
WEContinuousStyle
(
&
mode
,
&
ts
,
...
...
@@ -692,9 +690,9 @@ static PyObject *wasteObj_WECopyRange(_self, _args)
if
(
!
PyArg_ParseTuple
(
_args
,
"llO&O&O&"
,
&
rangeStart
,
&
rangeEnd
,
ResObj_Convert
,
&
hText
,
ResObj_Convert
,
&
hStyles
,
ResObj_Convert
,
&
hSoup
))
Opt
ResObj_Convert
,
&
hText
,
Opt
ResObj_Convert
,
&
hStyles
,
Opt
ResObj_Convert
,
&
hSoup
))
return
NULL
;
_err
=
WECopyRange
(
rangeStart
,
rangeEnd
,
...
...
@@ -916,8 +914,8 @@ static PyObject *wasteObj_WEInsert(_self, _args)
WESoupHandle
hSoup
;
if
(
!
PyArg_ParseTuple
(
_args
,
"s#O&O&"
,
&
pText__in__
,
&
pText__in_len__
,
ResObj_Convert
,
&
hStyles
,
ResObj_Convert
,
&
hSoup
))
Opt
ResObj_Convert
,
&
hStyles
,
Opt
ResObj_Convert
,
&
hSoup
))
return
NULL
;
pText__len__
=
pText__in_len__
;
_err
=
WEInsert
(
pText__in__
,
pText__len__
,
...
...
@@ -1344,7 +1342,7 @@ static PyMethodDef wasteObj_methods[] = {
{
"WESetViewRect"
,
(
PyCFunction
)
wasteObj_WESetViewRect
,
1
,
"(LongRect viewRect) -> None"
},
{
"WEContinuousStyle"
,
(
PyCFunction
)
wasteObj_WEContinuousStyle
,
1
,
"() -> (Boolean _rv, WEStyleMode mode, TextStyle ts)"
},
"(
WEStyleMode mode
) -> (Boolean _rv, WEStyleMode mode, TextStyle ts)"
},
{
"WEGetRunInfo"
,
(
PyCFunction
)
wasteObj_WEGetRunInfo
,
1
,
"(long offset) -> (WERunInfo runInfo)"
},
{
"WEGetOffset"
,
(
PyCFunction
)
wasteObj_WEGetOffset
,
1
,
...
...
Mac/Modules/waste/wastescan.py
Dosyayı görüntüle @
8ae8e4f9
...
...
@@ -18,7 +18,7 @@ def main():
defsoutput
=
TOOLBOXDIR
+
"WASTEconst.py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
gentypetest
(
SHORT
+
"typetest.py"
)
##
scanner.gentypetest(SHORT+"typetest.py")
scanner
.
close
()
print
"=== Done scanning and generating, now importing the generated code... ==="
exec
"import "
+
SHORT
+
"support"
...
...
@@ -67,8 +67,19 @@ class MyScanner(Scanner):
[(
"InBuffer"
,
"*"
,
"*"
)]),
# WEContinuousStyle
([(
"WEStyleMode"
,
"mode"
,
"OutMode"
),
(
"TextStyle"
,
"aStyle"
,
"OutMode"
)],
[(
"WEStyleMode"
,
"mode"
,
"InOutMode"
),
(
"TextStyle"
,
"aStyle"
,
"InOutMode"
)])
([(
"WEStyleMode"
,
"mode"
,
"OutMode"
),
(
"TextStyle"
,
"ts"
,
"OutMode"
)],
[(
"WEStyleMode"
,
"mode"
,
"InOutMode"
),
(
"TextStyle"
,
"ts"
,
"OutMode"
)]),
# WECopyRange
([(
'Handle'
,
'hText'
,
'InMode'
),
(
'StScrpHandle'
,
'hStyles'
,
'InMode'
),
(
'WESoupHandle'
,
'hSoup'
,
'InMode'
)],
[(
'OptHandle'
,
'hText'
,
'InMode'
),
(
'OptStScrpHandle'
,
'hStyles'
,
'InMode'
),
(
'OptSoupHandle'
,
'hSoup'
,
'InMode'
)]),
# WEInsert
([(
'StScrpHandle'
,
'hStyles'
,
'InMode'
),
(
'WESoupHandle'
,
'hSoup'
,
'InMode'
)],
[(
'OptStScrpHandle'
,
'hStyles'
,
'InMode'
),
(
'OptSoupHandle'
,
'hSoup'
,
'InMode'
)])
]
if
__name__
==
"__main__"
:
...
...
Mac/Modules/waste/wastesupport.py
Dosyayı görüntüle @
8ae8e4f9
...
...
@@ -24,15 +24,16 @@ from macsupport import *
# Create the type objects
WEReference
=
OpaqueByValueType
(
"WEReference"
,
"wasteObj"
)
WEObjectReference
=
OpaqueByValueType
(
"WEObjectReference"
,
"WEOObj"
)
##CharsHandle = OpaqueByValueType("CharsHandle", "ResObj")
##Handle = OpaqueByValueType("Handle", "ResObj")
StScrpHandle
=
OpaqueByValueType
(
"StScrpHandle"
,
"ResObj"
)
##TEStyleHandle = OpaqueByValueType("TEStyleHandle", "ResObj")
RgnHandle
=
OpaqueByValueType
(
"RgnHandle"
,
"ResObj"
)
EventModifiers
=
Type
(
"EventModifiers"
,
"h"
)
FlavorType
=
OSTypeType
(
"FlavorType"
)
WESelector
=
OSTypeType
(
"WESelector"
)
OptHandle
=
OpaqueByValueType
(
"Handle"
,
"OptResObj"
)
OptSoupHandle
=
OpaqueByValueType
(
"WESoupHandle"
,
"OptResObj"
)
OptStScrpHandle
=
OpaqueByValueType
(
"StScrpHandle"
,
"OptResObj"
)
WEStyleMode
=
Type
(
"WEStyleMode"
,
"h"
)
WEActionKind
=
Type
(
"WEActionKind"
,
"h"
)
WEAlignment
=
Type
(
"WEAlignment"
,
"b"
)
...
...
@@ -154,7 +155,7 @@ class WEOObjectDefinition(GlobalObjectDefinition):
# From here on it's basically all boiler plate...
# Test types used for existence
execfile
(
TYPETESTFILE
)
##
execfile(TYPETESTFILE)
# Create the generator groups and link them
module
=
MacModule
(
MODNAME
,
MODPREFIX
,
includestuff
,
finalstuff
,
initstuff
)
...
...
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