Skip to content

Commit 0d202b7

Browse files
committed
Various tweaks to make it everything build and compile again under carbon. Mainly greylisted functions.
1 parent 42181db commit 0d202b7

5 files changed

Lines changed: 86 additions & 0 deletions

File tree

Mac/Modules/qt/Qtmodule.c

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5733,6 +5733,8 @@ static PyObject *MovieObj_GetMovieDefaultDataRef(_self, _args)
57335733
return _res;
57345734
}
57355735

5736+
#if !TARGET_API_MAC_CARBON
5737+
57365738
static PyObject *MovieObj_SetMovieAnchorDataRef(_self, _args)
57375739
MovieObject *_self;
57385740
PyObject *_args;
@@ -5753,6 +5755,9 @@ static PyObject *MovieObj_SetMovieAnchorDataRef(_self, _args)
57535755
_res = Py_None;
57545756
return _res;
57555757
}
5758+
#endif
5759+
5760+
#if !TARGET_API_MAC_CARBON
57565761

57575762
static PyObject *MovieObj_GetMovieAnchorDataRef(_self, _args)
57585763
MovieObject *_self;
@@ -5776,6 +5781,7 @@ static PyObject *MovieObj_GetMovieAnchorDataRef(_self, _args)
57765781
outFlags);
57775782
return _res;
57785783
}
5784+
#endif
57795785

57805786
static PyObject *MovieObj_SetMovieColorTable(_self, _args)
57815787
MovieObject *_self;
@@ -5974,6 +5980,8 @@ static PyObject *MovieObj_GetMovieStatus(_self, _args)
59745980
return _res;
59755981
}
59765982

5983+
#if !TARGET_API_MAC_CARBON
5984+
59775985
static PyObject *MovieObj_GetMovieLoadState(_self, _args)
59785986
MovieObject *_self;
59795987
PyObject *_args;
@@ -5987,6 +5995,7 @@ static PyObject *MovieObj_GetMovieLoadState(_self, _args)
59875995
_rv);
59885996
return _res;
59895997
}
5998+
#endif
59905999

59916000
static PyObject *MovieObj_NewMovieController(_self, _args)
59926001
MovieObject *_self;
@@ -6287,10 +6296,16 @@ static PyMethodDef MovieObj_methods[] = {
62876296
"(Handle dataRef, OSType dataRefType) -> None"},
62886297
{"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
62896298
"() -> (Handle dataRef, OSType dataRefType)"},
6299+
6300+
#if !TARGET_API_MAC_CARBON
62906301
{"SetMovieAnchorDataRef", (PyCFunction)MovieObj_SetMovieAnchorDataRef, 1,
62916302
"(Handle dataRef, OSType dataRefType) -> None"},
6303+
#endif
6304+
6305+
#if !TARGET_API_MAC_CARBON
62926306
{"GetMovieAnchorDataRef", (PyCFunction)MovieObj_GetMovieAnchorDataRef, 1,
62936307
"() -> (Handle dataRef, OSType dataRefType, long outFlags)"},
6308+
#endif
62946309
{"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
62956310
"(CTabHandle ctab) -> None"},
62966311
{"GetMovieColorTable", (PyCFunction)MovieObj_GetMovieColorTable, 1,
@@ -6309,8 +6324,11 @@ static PyMethodDef MovieObj_methods[] = {
63096324
"(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
63106325
{"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
63116326
"() -> (ComponentResult _rv, Track firstProblemTrack)"},
6327+
6328+
#if !TARGET_API_MAC_CARBON
63126329
{"GetMovieLoadState", (PyCFunction)MovieObj_GetMovieLoadState, 1,
63136330
"() -> (long _rv)"},
6331+
#endif
63146332
{"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
63156333
"(Rect movieRect, long someFlags) -> (MovieController _rv)"},
63166334
{"PutMovieOnScrap", (PyCFunction)MovieObj_PutMovieOnScrap, 1,
@@ -6510,6 +6528,8 @@ static PyObject *Qt_GetDataHandler(_self, _args)
65106528
return _res;
65116529
}
65126530

6531+
#if !TARGET_API_MAC_CARBON
6532+
65136533
static PyObject *Qt_OpenADataHandler(_self, _args)
65146534
PyObject *_self;
65156535
PyObject *_args;
@@ -6543,6 +6563,7 @@ static PyObject *Qt_OpenADataHandler(_self, _args)
65436563
CmpInstObj_New, dh);
65446564
return _res;
65456565
}
6566+
#endif
65466567

65476568
static PyObject *Qt_PasteHandleIntoMovie(_self, _args)
65486569
PyObject *_self;
@@ -8330,6 +8351,8 @@ static PyObject *Qt_FlashMediaFrameLabelToMovieTime(_self, _args)
83308351
return _res;
83318352
}
83328353

8354+
#if !TARGET_API_MAC_CARBON
8355+
83338356
static PyObject *Qt_MovieMediaGetCurrentMovieProperty(_self, _args)
83348357
PyObject *_self;
83358358
PyObject *_args;
@@ -8351,6 +8374,9 @@ static PyObject *Qt_MovieMediaGetCurrentMovieProperty(_self, _args)
83518374
_rv);
83528375
return _res;
83538376
}
8377+
#endif
8378+
8379+
#if !TARGET_API_MAC_CARBON
83548380

83558381
static PyObject *Qt_MovieMediaGetCurrentTrackProperty(_self, _args)
83568382
PyObject *_self;
@@ -8376,6 +8402,9 @@ static PyObject *Qt_MovieMediaGetCurrentTrackProperty(_self, _args)
83768402
_rv);
83778403
return _res;
83788404
}
8405+
#endif
8406+
8407+
#if !TARGET_API_MAC_CARBON
83798408

83808409
static PyObject *Qt_MovieMediaGetChildMovieDataReference(_self, _args)
83818410
PyObject *_self;
@@ -8410,6 +8439,9 @@ static PyObject *Qt_MovieMediaGetChildMovieDataReference(_self, _args)
84108439
dataRefIndexOut);
84118440
return _res;
84128441
}
8442+
#endif
8443+
8444+
#if !TARGET_API_MAC_CARBON
84138445

84148446
static PyObject *Qt_MovieMediaSetChildMovieDataReference(_self, _args)
84158447
PyObject *_self;
@@ -8435,6 +8467,9 @@ static PyObject *Qt_MovieMediaSetChildMovieDataReference(_self, _args)
84358467
_rv);
84368468
return _res;
84378469
}
8470+
#endif
8471+
8472+
#if !TARGET_API_MAC_CARBON
84388473

84398474
static PyObject *Qt_MovieMediaLoadChildMovieFromDataReference(_self, _args)
84408475
PyObject *_self;
@@ -8454,6 +8489,7 @@ static PyObject *Qt_MovieMediaLoadChildMovieFromDataReference(_self, _args)
84548489
_rv);
84558490
return _res;
84568491
}
8492+
#endif
84578493

84588494
static PyObject *Qt_Media3DGetCurrentGroup(_self, _args)
84598495
PyObject *_self;
@@ -8678,6 +8714,8 @@ static PyObject *Qt_Media3DGetCameraRange(_self, _args)
86788714
return _res;
86798715
}
86808716

8717+
#if !TARGET_API_MAC_CARBON
8718+
86818719
static PyObject *Qt_Media3DGetViewObject(_self, _args)
86828720
PyObject *_self;
86838721
PyObject *_args;
@@ -8696,6 +8734,7 @@ static PyObject *Qt_Media3DGetViewObject(_self, _args)
86968734
_rv);
86978735
return _res;
86988736
}
8737+
#endif
86998738

87008739
static PyObject *Qt_NewTimeBase(_self, _args)
87018740
PyObject *_self;
@@ -8886,8 +8925,11 @@ static PyMethodDef Qt_methods[] = {
88868925
"(long flags) -> (Movie _rv)"},
88878926
{"GetDataHandler", (PyCFunction)Qt_GetDataHandler, 1,
88888927
"(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)"},
8928+
8929+
#if !TARGET_API_MAC_CARBON
88898930
{"OpenADataHandler", (PyCFunction)Qt_OpenADataHandler, 1,
88908931
"(Handle dataRef, OSType dataHandlerSubType, Handle anchorDataRef, OSType anchorDataRefType, TimeBase tb, long flags) -> (ComponentInstance dh)"},
8932+
#endif
88918933
{"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
88928934
"(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
88938935
{"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
@@ -9037,16 +9079,31 @@ static PyMethodDef Qt_methods[] = {
90379079
"(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)"},
90389080
{"FlashMediaFrameLabelToMovieTime", (PyCFunction)Qt_FlashMediaFrameLabelToMovieTime, 1,
90399081
"(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)"},
9082+
9083+
#if !TARGET_API_MAC_CARBON
90409084
{"MovieMediaGetCurrentMovieProperty", (PyCFunction)Qt_MovieMediaGetCurrentMovieProperty, 1,
90419085
"(MediaHandler mh, OSType whichProperty, void * value) -> (ComponentResult _rv)"},
9086+
#endif
9087+
9088+
#if !TARGET_API_MAC_CARBON
90429089
{"MovieMediaGetCurrentTrackProperty", (PyCFunction)Qt_MovieMediaGetCurrentTrackProperty, 1,
90439090
"(MediaHandler mh, long trackID, OSType whichProperty, void * value) -> (ComponentResult _rv)"},
9091+
#endif
9092+
9093+
#if !TARGET_API_MAC_CARBON
90449094
{"MovieMediaGetChildMovieDataReference", (PyCFunction)Qt_MovieMediaGetChildMovieDataReference, 1,
90459095
"(MediaHandler mh, QTAtomID dataRefID, short dataRefIndex) -> (ComponentResult _rv, OSType dataRefType, Handle dataRef, QTAtomID dataRefIDOut, short dataRefIndexOut)"},
9096+
#endif
9097+
9098+
#if !TARGET_API_MAC_CARBON
90469099
{"MovieMediaSetChildMovieDataReference", (PyCFunction)Qt_MovieMediaSetChildMovieDataReference, 1,
90479100
"(MediaHandler mh, QTAtomID dataRefID, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)"},
9101+
#endif
9102+
9103+
#if !TARGET_API_MAC_CARBON
90489104
{"MovieMediaLoadChildMovieFromDataReference", (PyCFunction)Qt_MovieMediaLoadChildMovieFromDataReference, 1,
90499105
"(MediaHandler mh, QTAtomID dataRefID) -> (ComponentResult _rv)"},
9106+
#endif
90509107
{"Media3DGetCurrentGroup", (PyCFunction)Qt_Media3DGetCurrentGroup, 1,
90519108
"(MediaHandler mh, void * group) -> (ComponentResult _rv)"},
90529109
{"Media3DTranslateNamedObjectTo", (PyCFunction)Qt_Media3DTranslateNamedObjectTo, 1,
@@ -9067,8 +9124,11 @@ static PyMethodDef Qt_methods[] = {
90679124
"(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)"},
90689125
{"Media3DGetCameraRange", (PyCFunction)Qt_Media3DGetCameraRange, 1,
90699126
"(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)"},
9127+
9128+
#if !TARGET_API_MAC_CARBON
90709129
{"Media3DGetViewObject", (PyCFunction)Qt_Media3DGetViewObject, 1,
90719130
"(MediaHandler mh, void * tq3viewObject) -> (ComponentResult _rv)"},
9131+
#endif
90729132
{"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
90739133
"() -> (TimeBase _rv)"},
90749134
{"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,

Mac/Modules/qt/qtscan.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ def makegreylist(self):
6868
('#if !TARGET_API_MAC_CARBON', [
6969
'SpriteMediaGetIndImageProperty', # XXXX Why isn't this in carbon?
7070
'CheckQuickTimeRegistration',
71+
'SetMovieAnchorDataRef',
72+
'GetMovieAnchorDataRef',
73+
'GetMovieLoadState',
74+
'OpenADataHandler',
75+
'MovieMediaGetCurrentMovieProperty',
76+
'MovieMediaGetCurrentTrackProperty',
77+
'MovieMediaGetChildMovieDataReference',
78+
'MovieMediaSetChildMovieDataReference',
79+
'MovieMediaLoadChildMovieFromDataReference',
80+
'Media3DGetViewObject',
7181
])]
7282

7383
def makeblacklisttypes(self):

Mac/Modules/win/Winmodule.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,8 @@ static PyObject *WinObj_IsWindowVisible(_self, _args)
18721872
return _res;
18731873
}
18741874

1875+
#if !TARGET_API_MAC_CARBON
1876+
18751877
static PyObject *WinObj_GetWindowZoomFlag(_self, _args)
18761878
WindowObject *_self;
18771879
PyObject *_args;
@@ -1885,6 +1887,7 @@ static PyObject *WinObj_GetWindowZoomFlag(_self, _args)
18851887
_rv);
18861888
return _res;
18871889
}
1890+
#endif
18881891

18891892
static PyObject *WinObj_GetWindowStructureRgn(_self, _args)
18901893
WindowObject *_self;
@@ -1934,6 +1937,8 @@ static PyObject *WinObj_GetWindowUpdateRgn(_self, _args)
19341937
return _res;
19351938
}
19361939

1940+
#if !TARGET_API_MAC_CARBON
1941+
19371942
static PyObject *WinObj_GetWindowTitleWidth(_self, _args)
19381943
WindowObject *_self;
19391944
PyObject *_args;
@@ -1947,6 +1952,7 @@ static PyObject *WinObj_GetWindowTitleWidth(_self, _args)
19471952
_rv);
19481953
return _res;
19491954
}
1955+
#endif
19501956

19511957
static PyObject *WinObj_GetNextWindow(_self, _args)
19521958
WindowObject *_self;
@@ -2255,16 +2261,22 @@ static PyMethodDef WinObj_methods[] = {
22552261
"() -> (Rect bounds)"},
22562262
{"IsWindowVisible", (PyCFunction)WinObj_IsWindowVisible, 1,
22572263
"() -> (Boolean _rv)"},
2264+
2265+
#if !TARGET_API_MAC_CARBON
22582266
{"GetWindowZoomFlag", (PyCFunction)WinObj_GetWindowZoomFlag, 1,
22592267
"() -> (Boolean _rv)"},
2268+
#endif
22602269
{"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
22612270
"(RgnHandle r) -> None"},
22622271
{"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
22632272
"(RgnHandle r) -> None"},
22642273
{"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
22652274
"(RgnHandle r) -> None"},
2275+
2276+
#if !TARGET_API_MAC_CARBON
22662277
{"GetWindowTitleWidth", (PyCFunction)WinObj_GetWindowTitleWidth, 1,
22672278
"() -> (short _rv)"},
2279+
#endif
22682280
{"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1,
22692281
"() -> (WindowPtr _rv)"},
22702282

Mac/Modules/win/winedit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
f = Method(Boolean, 'GetWindowZoomFlag',
1010
(WindowRef, 'theWindow', InMode),
11+
condition='#if !TARGET_API_MAC_CARBON'
1112
)
1213
methods.append(f)
1314

@@ -31,6 +32,7 @@
3132

3233
f = Method(short, 'GetWindowTitleWidth',
3334
(WindowRef, 'theWindow', InMode),
35+
condition='#if !TARGET_API_MAC_CARBON'
3436
)
3537
methods.append(f)
3638

Mac/Modules/win/winscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def makegreylist(self):
6666
'InvalRgn',
6767
'InvalRect',
6868
'IsValidWindowPtr', # I think this is useless for Python, but not sure...
69+
'GetWindowZoomFlag', # Not available in Carbon
70+
'GetWindowTitleWidth', # Ditto
6971
]),
7072
('#if TARGET_API_MAC_CARBON', [
7173
'IsWindowUpdatePending',

0 commit comments

Comments
 (0)