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
e56db434
Kaydet (Commit)
e56db434
authored
Mar 19, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
first cut at the whole quickdraw.h header file ...
üst
86c3af7d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
181 additions
and
2 deletions
+181
-2
QuickDraw.py
Mac/Lib/toolbox/QuickDraw.py
+77
-0
Qdmodule.c
Mac/Modules/qd/Qdmodule.c
+0
-0
qdgen.py
Mac/Modules/qd/qdgen.py
+0
-0
qdscan.py
Mac/Modules/qd/qdscan.py
+83
-0
qdsupport.py
Mac/Modules/qd/qdsupport.py
+21
-2
No files found.
Mac/Lib/toolbox/QuickDraw.py
0 → 100644
Dosyayı görüntüle @
e56db434
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:QuickDraw.h'
invalColReq
=
-
1
srcCopy
=
0
srcOr
=
1
srcXor
=
2
srcBic
=
3
notSrcCopy
=
4
notSrcOr
=
5
notSrcXor
=
6
notSrcBic
=
7
patCopy
=
8
patOr
=
9
patXor
=
10
patBic
=
11
notPatCopy
=
12
notPatOr
=
13
notPatXor
=
14
notPatBic
=
15
grayishTextOr
=
49
blend
=
32
addPin
=
33
addOver
=
34
subPin
=
35
addMax
=
37
adMax
=
37
subOver
=
38
adMin
=
39
ditherCopy
=
64
transparent
=
36
normalBit
=
0
inverseBit
=
1
redBit
=
4
greenBit
=
3
blueBit
=
2
cyanBit
=
8
magentaBit
=
7
yellowBit
=
6
blackBit
=
5
blackColor
=
33
whiteColor
=
30
redColor
=
205
greenColor
=
341
blueColor
=
409
cyanColor
=
273
magentaColor
=
137
yellowColor
=
69
picLParen
=
0
picRParen
=
1
normal
=
0
bold
=
1
italic
=
2
underline
=
4
outline
=
8
shadow
=
0x10
condense
=
0x20
extend
=
0x40
clutType
=
0
fixedType
=
1
directType
=
2
gdDevType
=
0
burstDevice
=
7
ext32Device
=
8
ramInit
=
10
mainScreen
=
11
allInit
=
12
screenDevice
=
13
noDriver
=
14
screenActive
=
15
hiliteBit
=
7
pHiliteBit
=
0
defQDColors
=
127
RGBDirect
=
16
baseAddr32
=
4
rgnOverflowErr
=
-
147
insufficientStackErr
=
-
149
allDevices
=
1
<<
allDevicesBit
Mac/Modules/qd/Qdmodule.c
Dosyayı görüntüle @
e56db434
This diff is collapsed.
Click to expand it.
Mac/Modules/qd/qdgen.py
0 → 100644
Dosyayı görüntüle @
e56db434
This diff is collapsed.
Click to expand it.
Mac/Modules/qd/qdscan.py
0 → 100644
Dosyayı görüntüle @
e56db434
# Scan an Apple header file, generating a Python file of generator calls.
import
addpack
addpack
.
addpack
(
'D:python:Tools:bgen:bgen'
)
from
scantools
import
Scanner
def
main
():
input
=
"QuickDraw.h"
output
=
"qdgen.py"
defsoutput
=
"QuickDraw.py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
print
"=== Done scanning and generating, now importing the generated code... ==="
import
qdsupport
print
"=== Done. It's up to you to compile it now! ==="
class
MyScanner
(
Scanner
):
def
destination
(
self
,
type
,
name
,
arglist
):
classname
=
"Function"
listname
=
"functions"
if
arglist
:
t
,
n
,
m
=
arglist
[
0
]
if
t
in
(
"WindowPtr"
,
"WindowPeek"
)
and
m
==
"InMode"
:
classname
=
"Method"
listname
=
"methods"
return
classname
,
listname
def
makeblacklistnames
(
self
):
return
[
'InitGraf'
,
'StuffHex'
,
'StdLine'
,
'StdComment'
,
'StdGetPic'
,
'StdLine'
,
]
def
makeblacklisttypes
(
self
):
return
[
'BitMap_ptr'
,
'CCrsrHandle'
,
'CGrafPtr'
,
'CIconHandle'
,
'CQDProcs'
,
'CSpecArray'
,
'CTabHandle'
,
'ColorComplementProcPtr'
,
'ColorSearchProcPtr'
,
'ConstPatternParam'
,
'Cursor_ptr'
,
'DeviceLoopDrawingProcPtr'
,
'DeviceLoopFlags'
,
'FontInfo'
,
'GDHandle'
,
'GrafVerb'
,
'OpenCPicParams_ptr'
,
'PenState'
,
'PenState_ptr'
,
'Ptr'
,
'QDProcs'
,
'RGBColor'
,
'RGBColor_ptr'
,
'ReqListRec'
,
'void_ptr'
,
]
def
makerepairinstructions
(
self
):
return
[
([(
'void_ptr'
,
'textBuf'
,
'InMode'
),
(
'short'
,
'firstByte'
,
'InMode'
),
(
'short'
,
'byteCount'
,
'InMode'
)],
[(
'TextThingie'
,
'*'
,
'*'
),
(
'*'
,
'*'
,
'*'
),
(
'*'
,
'*'
,
'*'
)]),
([(
'Point'
,
'*'
,
'OutMode'
)],
[(
'*'
,
'*'
,
'InOutMode'
)]),
]
if
__name__
==
"__main__"
:
main
()
Mac/Modules/qd/qdsupport.py
Dosyayı görüntüle @
e56db434
...
...
@@ -5,6 +5,9 @@
import
string
import
addpack
addpack
.
addpack
(
'D:python:Tools:bgen:bgen'
)
# Declarations that change for each manager
MACHEADERFILE
=
'QuickDraw.h'
# The Apple header file
MODNAME
=
'Qd'
# The name of the module
...
...
@@ -22,6 +25,22 @@ from macsupport import *
# Create the type objects
GrafPtr
=
WindowPtr
class
TextThingieClass
(
FixedInputBufferType
):
def
getargsCheck
(
self
,
name
):
pass
TextThingie
=
TextThingieClass
(
None
)
# These are temporary!
Fixed
=
long
RgnHandle
=
OpaqueByValueType
(
"RgnHandle"
,
"ResObj"
)
PicHandle
=
OpaqueByValueType
(
"PicHandle"
,
"ResObj"
)
PolyHandle
=
OpaqueByValueType
(
"PolyHandle"
,
"ResObj"
)
PixMapHandle
=
OpaqueByValueType
(
"PixMapHandle"
,
"ResObj"
)
PixPatHandle
=
OpaqueByValueType
(
"PixPatHandle"
,
"ResObj"
)
includestuff
=
includestuff
+
"""
#include <
%
s>"""
%
MACHEADERFILE
+
"""
#include <Desk.h>
...
...
@@ -58,8 +77,8 @@ Method = OSErrMethodGenerator
# Create and populate the lists
functions
=
[]
methods
=
[]
#
execfile(INPUTFILE)
execfile
(
EXTRAFILE
)
execfile
(
INPUTFILE
)
#
execfile(EXTRAFILE)
# add the populated lists to the generator groups
# (in a different wordl the scan program would generate this)
...
...
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