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
cb4eaadd
Kaydet (Commit)
cb4eaadd
authored
Kas 30, 1995
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
QuickTime support (not yet functional)
üst
b996856d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
391 additions
and
0 deletions
+391
-0
QuickTime.py
Mac/Lib/toolbox/QuickTime.py
+234
-0
qtgen.py
Mac/Modules/qt/qtgen.py
+0
-0
qtscan.py
Mac/Modules/qt/qtscan.py
+78
-0
qtsupport.py
Mac/Modules/qt/qtsupport.py
+79
-0
No files found.
Mac/Lib/toolbox/QuickTime.py
0 → 100644
Dosyayı görüntüle @
cb4eaadd
# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Movies.h'
MovieFileType
=
'MooV'
MediaHandlerType
=
'mhlr'
DataHandlerType
=
'dhlr'
VideoMediaType
=
'vide'
SoundMediaType
=
'soun'
TextMediaType
=
'text'
BaseMediaType
=
'gnrc'
MPEGMediaType
=
'MPEG'
MusicMediaType
=
'musi'
TimeCodeMediaType
=
'tmcd'
HandleDataHandlerSubType
=
'hndl'
VisualMediaCharacteristic
=
'eyes'
AudioMediaCharacteristic
=
'ears'
DoTheRightThing
=
0
dfDontDisplay
=
1
<<
0
dfDontAutoScale
=
1
<<
1
dfClipToTextBox
=
1
<<
2
dfUseMovieBGColor
=
1
<<
3
dfShrinkTextBoxToFit
=
1
<<
4
dfScrollIn
=
1
<<
5
dfScrollOut
=
1
<<
6
dfHorizScroll
=
1
<<
7
dfReverseScroll
=
1
<<
8
dfContinuousScroll
=
1
<<
9
dfFlowHoriz
=
1
<<
10
dfDropShadow
=
1
<<
12
dfAntiAlias
=
1
<<
13
dfKeyedText
=
1
<<
14
dfInverseHilite
=
1
<<
15
searchTextDontGoToFoundTime
=
1L
<<
16
searchTextDontHiliteFoundText
=
1L
<<
17
searchTextOneTrackOnly
=
1L
<<
18
searchTextEnabledTracksOnly
=
1L
<<
19
movieProgressOpen
=
0
movieProgressUpdatePercent
=
1
movieProgressClose
=
2
progressOpFlatten
=
1
mediaQualityDraft
=
0x0000
mediaQualityNormal
=
0x0040
mediaQualityBetter
=
0x0080
mediaQualityBest
=
0x00C0
loopTimeBase
=
1
palindromeLoopTimeBase
=
2
maintainTimeBaseZero
=
4
triggerTimeFwd
=
0x0001
triggerTimeBwd
=
0x0002
triggerTimeEither
=
0x0003
triggerRateLT
=
0x0004
triggerRateGT
=
0x0008
triggerRateEqual
=
0x0010
triggerRateChange
=
0
triggerAtStart
=
0x0001
triggerAtStop
=
0x0002
timeBaseBeforeStartTime
=
1
timeBaseAfterStopTime
=
2
callBackAtTime
=
1
callBackAtRate
=
2
callBackAtTimeJump
=
3
callBackAtExtremes
=
4
callBackAtInterrupt
=
0x8000
callBackAtDeferredTask
=
0x4000
qtcbNeedsRateChanges
=
1
qtcbNeedsTimeChanges
=
2
qtcbNeedsStartStopChanges
=
4
keepInRam
=
1
<<
0
unkeepInRam
=
1
<<
1
flushFromRam
=
1
<<
2
loadForwardTrackEdits
=
1
<<
3
loadBackwardTrackEdits
=
1
<<
4
newMovieActive
=
1
<<
0
newMovieDontResolveDataRefs
=
1
<<
1
newMovieDontAskUnresolvedDataRefs
=
1
<<
2
newMovieDontAutoAlternates
=
1
<<
3
trackUsageInMovie
=
1
<<
1
trackUsageInPreview
=
1
<<
2
trackUsageInPoster
=
1
<<
3
mediaSampleNotSync
=
1
<<
0
mediaSampleShadowSync
=
1
<<
1
pasteInParallel
=
1
showUserSettingsDialog
=
2
movieToFileOnlyExport
=
4
nextTimeMediaSample
=
1
<<
0
nextTimeMediaEdit
=
1
<<
1
nextTimeTrackEdit
=
1
<<
2
nextTimeSyncSample
=
1
<<
3
nextTimeEdgeOK
=
1
<<
14
nextTimeIgnoreActiveSegment
=
1
<<
15
createMovieFileDeleteCurFile
=
1L
<<
31
createMovieFileDontCreateMovie
=
1L
<<
30
createMovieFileDontOpenFile
=
1L
<<
29
flattenAddMovieToDataFork
=
1L
<<
0
flattenActiveTracksOnly
=
1L
<<
2
flattenDontInterleaveFlatten
=
1L
<<
3
movieInDataForkResID
=
-
1
mcTopLeftMovie
=
1
<<
0
mcScaleMovieToFit
=
1
<<
1
mcWithBadge
=
1
<<
2
mcNotVisible
=
1
<<
3
mcWithFrame
=
1
<<
4
movieScrapDontZeroScrap
=
1
<<
0
movieScrapOnlyPutMovie
=
1
<<
1
dataRefSelfReference
=
1
<<
0
dataRefWasNotResolved
=
1
<<
1
hintsScrubMode
=
1
<<
0
hintsLoop
=
1
<<
1
hintsDontPurge
=
1
<<
2
hintsUseScreenBuffer
=
1
<<
5
hintsAllowInterlace
=
1
<<
6
hintsUseSoundInterp
=
1
<<
7
hintsHighQuality
=
1
<<
8
hintsPalindrome
=
1
<<
9
hintsInactive
=
1
<<
11
mediaHandlerFlagBaseClient
=
1
movieTrackMediaType
=
1
<<
0
movieTrackCharacteristic
=
1
<<
1
movieTrackEnabledOnly
=
1
<<
2
movieDrawingCallWhenChanged
=
0
movieDrawingCallAlways
=
1
txtProcDefaultDisplay
=
0
txtProcDontDisplay
=
1
txtProcDoDisplay
=
2
findTextEdgeOK
=
1
<<
0
findTextCaseSensitive
=
1
<<
1
findTextReverseSearch
=
1
<<
2
findTextWrapAround
=
1
<<
3
findTextUseOffset
=
1
<<
4
dropShadowOffsetType
=
'drpo'
dropShadowTranslucencyType
=
'drpt'
preloadAlways
=
1L
<<
0
preloadOnlyIfEnabled
=
1L
<<
1
MovieControllerComponentType
=
'play'
mcActionIdle
=
1
mcActionDraw
=
2
mcActionActivate
=
3
mcActionDeactivate
=
4
mcActionMouseDown
=
5
mcActionKey
=
6
mcActionPlay
=
8
mcActionGoToTime
=
12
mcActionSetVolume
=
14
mcActionGetVolume
=
15
mcActionStep
=
18
mcActionSetLooping
=
21
mcActionGetLooping
=
22
mcActionSetLoopIsPalindrome
=
23
mcActionGetLoopIsPalindrome
=
24
mcActionSetGrowBoxBounds
=
25
mcActionControllerSizeChanged
=
26
mcActionSetSelectionBegin
=
29
mcActionSetSelectionDuration
=
30
mcActionSetKeysEnabled
=
32
mcActionGetKeysEnabled
=
33
mcActionSetPlaySelection
=
34
mcActionGetPlaySelection
=
35
mcActionSetUseBadge
=
36
mcActionGetUseBadge
=
37
mcActionSetFlags
=
38
mcActionGetFlags
=
39
mcActionSetPlayEveryFrame
=
40
mcActionGetPlayEveryFrame
=
41
mcActionGetPlayRate
=
42
mcActionShowBalloon
=
43
mcActionBadgeClick
=
44
mcActionMovieClick
=
45
mcActionSuspend
=
46
mcActionResume
=
47
mcActionSetControllerKeysEnabled
=
48
mcActionGetTimeSliderRect
=
49
mcActionMovieEdited
=
50
mcActionGetDragEnabled
=
51
mcActionSetDragEnabled
=
52
mcFlagSuppressMovieFrame
=
1
<<
0
mcFlagSuppressStepButtons
=
1
<<
1
mcFlagSuppressSpeakerButton
=
1
<<
2
mcFlagsUseWindowPalette
=
1
<<
3
mcFlagsDontInvalidate
=
1
<<
4
mcPositionDontInvalidate
=
1
<<
5
mcInfoUndoAvailable
=
1
<<
0
mcInfoCutAvailable
=
1
<<
1
mcInfoCopyAvailable
=
1
<<
2
mcInfoPasteAvailable
=
1
<<
3
mcInfoClearAvailable
=
1
<<
4
mcInfoHasSound
=
1
<<
5
mcInfoIsPlaying
=
1
<<
6
mcInfoIsLooping
=
1
<<
7
mcInfoIsInPalindrome
=
1
<<
8
mcInfoEditingEnabled
=
1
<<
9
mcMenuUndo
=
1
mcMenuCut
=
3
mcMenuCopy
=
4
mcMenuPaste
=
5
mcMenuClear
=
6
kMCSetMovieSelect
=
0x2
kMCGetIndMovieSelect
=
0x5
kMCRemoveMovieSelect
=
0x6
kMCIsPlayerEventSelect
=
0x7
kMCSetActionFilterSelect
=
0x8
kMCDoActionSelect
=
0x9
kMCSetControllerAttachedSelect
=
0xA
kMCIsControllerAttachedSelect
=
0xB
kMCSetControllerPortSelect
=
0xC
kMCGetControllerPortSelect
=
0xD
kMCSetVisibleSelect
=
0xE
kMCGetVisibleSelect
=
0xF
kMCGetControllerBoundsRectSelect
=
0x10
kMCSetControllerBoundsRectSelect
=
0x11
kMCGetControllerBoundsRgnSelect
=
0x12
kMCGetWindowRgnSelect
=
0x13
kMCMovieChangedSelect
=
0x14
kMCSetDurationSelect
=
0x15
kMCGetCurrentTimeSelect
=
0x16
kMCNewAttachedControllerSelect
=
0x17
kMCDrawSelect
=
0x18
kMCActivateSelect
=
0x19
kMCIdleSelect
=
0x1A
kMCKeySelect
=
0x1B
kMCClickSelect
=
0x1C
kMCEnableEditingSelect
=
0x1D
kMCIsEditingEnabledSelect
=
0x1E
kMCCopySelect
=
0x1F
kMCCutSelect
=
0x20
kMCPasteSelect
=
0x21
kMCClearSelect
=
0x22
kMCUndoSelect
=
0x23
kMCPositionControllerSelect
=
0x24
kMCGetControllerInfoSelect
=
0x25
kMCSetClipSelect
=
0x28
kMCGetClipSelect
=
0x29
kMCDrawBadgeSelect
=
0x2A
kMCSetUpEditMenuSelect
=
0x2B
kMCGetMenuStringSelect
=
0x2C
kMCSetActionFilterWithRefConSelect
=
0x2D
Mac/Modules/qt/qtgen.py
0 → 100644
Dosyayı görüntüle @
cb4eaadd
This diff is collapsed.
Click to expand it.
Mac/Modules/qt/qtscan.py
0 → 100644
Dosyayı görüntüle @
cb4eaadd
# Scan an Apple header file, generating a Python file of generator calls.
import
addpack
addpack
.
addpack
(
':tools:bgen:bgen'
)
from
scantools
import
Scanner
LONG
=
"QuickTime"
SHORT
=
"qt"
OBJECT
=
"Movie"
def
main
():
input
=
"Movies.h"
output
=
SHORT
+
"gen.py"
defsoutput
=
LONG
+
".py"
scanner
=
MyScanner
(
input
,
output
,
defsoutput
)
scanner
.
scan
()
scanner
.
close
()
print
"=== Done scanning and generating, now importing the generated code... ==="
exec
"import "
+
SHORT
+
"support"
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
==
OBJECT
and
m
==
"InMode"
:
classname
=
"Method"
listname
=
"methods"
return
classname
,
listname
def
makeblacklistnames
(
self
):
return
[
"DisposeMovie"
,
# Done on python-object disposal
"GetMovieCreationTime"
,
# type "unsigned long" in C, inparseable
"GetMovieModificationTime"
,
# Ditto
]
def
makeblacklisttypes
(
self
):
return
[
"MoviesErrorUPP"
,
"Track"
,
# XXXX To be done in the future
"Media"
,
"UserData"
,
"TimeBase"
,
"QTCallBack"
,
"Component"
,
"TimeRecord"
,
"TimeRecord_ptr"
,
"TrackEditState"
,
"MovieEditState"
,
"MoviePreviewCallOutUPP"
,
"CGrafPtr"
,
"GDHandle"
,
"MovieDrawingCompleteUPP"
,
"PixMapHandle"
,
"MatrixRecord"
,
"MatrixRecord_ptr"
,
"QTCallBackUPP"
,
"TextMediaUPP"
,
"MovieProgressUPP"
,
"MovieRgnCoverUPP"
,
"MCActionFilterUPP"
,
"MCActionFilterWithRefConUPP"
,
"SampleDescription"
,
"SoundDescription"
,
"TextDescription"
,
"MusicDescription"
,
]
def
makerepairinstructions
(
self
):
return
[
]
if
__name__
==
"__main__"
:
main
()
Mac/Modules/qt/qtsupport.py
0 → 100644
Dosyayı görüntüle @
cb4eaadd
# This script generates a Python interface for an Apple Macintosh Manager.
# It uses the "bgen" package to generate C code.
# The function specifications are generated by scanning the mamager's header file,
# using the "scantools" package (customized for this particular manager).
import
string
# Declarations that change for each manager
MACHEADERFILE
=
'Movies.h'
# The Apple header file
MODNAME
=
'qt'
# The name of the module
OBJECTNAME
=
'Movie'
# The basic name of the objects used here
# The following is *usually* unchanged but may still require tuning
MODPREFIX
=
MODNAME
# The prefix for module-wide routines
OBJECTTYPE
=
"Movie"
# 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
OUTPUTFILE
=
MODNAME
+
"module.c"
# The file generated by this program
from
macsupport
import
*
# Create the type objects
includestuff
=
includestuff
+
"""
#include <
%
s>"""
%
MACHEADERFILE
+
"""
"""
Movie
=
OpaqueByValueType
(
OBJECTTYPE
,
OBJECTPREFIX
)
TimeValue
=
Type
(
"TimeValue"
,
"l"
)
TimeScale
=
Type
(
"TimeScale"
,
"l"
)
TimeBaseFlags
=
Type
(
"TimeBaseFlags"
,
"l"
)
QTCallBackFlags
=
Type
(
"QTCallBackFlags"
,
"h"
)
TimeBaseStatus
=
Type
(
"TimeBaseStatus"
,
"l"
)
QTCallBackType
=
Type
(
"QTCallBackType"
,
"h"
)
nextTimeFlagsEnum
=
Type
(
"nextTimeFlagsEnum"
,
"h"
)
createMovieFileFlagsEnum
=
Type
(
"createMovieFileFlagsEnum"
,
"l"
)
movieFlattenFlagsEnum
=
Type
(
"movieFlattenFlagsEnum"
,
"l"
)
dataRefAttributesFlags
=
Type
(
"dataRefAttributesFlags"
,
"l"
)
playHintsEnum
=
Type
(
"playHintsEnum"
,
"l"
)
mediaHandlerFlagsEnum
=
Type
(
"mediaHandlerFlagsEnum"
,
"l"
)
RgnHandle
=
OpaqueByValueType
(
"RgnHandle"
,
"ResObj"
)
PicHandle
=
OpaqueByValueType
(
"PicHandle"
,
"ResObj"
)
class
MyObjectDefinition
(
GlobalObjectDefinition
):
def
outputCheckNewArg
(
self
):
Output
(
"""if (itself == NULL) {
PyErr_SetString(Qt_Error,"Cannot create null Movie");
return NULL;
}"""
)
def
outputFreeIt
(
self
,
itselfname
):
Output
(
"DisposeMovie(
%
s);"
,
itselfname
)
# From here on it's basically all boiler plate...
# Create the generator groups and link them
module
=
MacModule
(
MODNAME
,
MODPREFIX
,
includestuff
,
finalstuff
,
initstuff
)
object
=
MyObjectDefinition
(
OBJECTNAME
,
OBJECTPREFIX
,
OBJECTTYPE
)
module
.
addobject
(
object
)
# Create the generator classes used to populate the lists
Function
=
FunctionGenerator
Method
=
MethodGenerator
# Create and populate the lists
functions
=
[]
methods
=
[]
execfile
(
INPUTFILE
)
# add the populated lists to the generator groups
# (in a different wordl the scan program would generate this)
for
f
in
functions
:
module
.
add
(
f
)
for
f
in
methods
:
object
.
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