This commit was manufactured by cvs2svn to create tag 'r22a4-fork'.
[python/dscho.git] / Mac / scripts / missingcarbonmethods.py
blob5db2674979c82ea687c81cf080fe821e113054ec
1 # Methods that are missing in Carbon.
2 # This module is mainly for documentation purposes, but you could use
3 # it to automatically search for usage of methods that are missing.
6 missing_icglue = [
7 'ICFindConfigFile',
8 'ICFindUserConfigFile',
9 'ICChooseConfig',
10 'ICChooseNewConfig',
13 missing_Help = [
14 'Help'
17 missing_Scrap = [
18 'InfoScrap',
19 'GetScrap',
20 'ZeroScrap',
21 'PutScrap',
24 missing_Win = [
25 'GetAuxWin',
26 'GetWindowDataHandle',
27 'SaveOld',
28 'DrawNew',
29 'SetWinColor',
30 'SetDeskCPat',
31 'InitWindows',
32 'InitFloatingWindows',
33 'GetWMgrPort',
34 'GetCWMgrPort',
35 'ValidRgn', # Use versions with Window in their name
36 'ValidRect',
37 'InvalRgn',
38 'InvalRect',
39 'IsValidWindowPtr', # I think this is useless for Python, but not sure...
40 'GetWindowZoomFlag', # Not available in Carbon
41 'GetWindowTitleWidth', # Ditto
44 missing_Snd = [
45 'MACEVersion',
46 'SPBRecordToFile',
47 'Exp1to6',
48 'Comp6to1',
49 'Exp1to3',
50 'Comp3to1',
51 'SndControl',
52 'SndStopFilePlay',
53 'SndStartFilePlay',
54 'SndPauseFilePlay',
57 missing_Res = [
58 'RGetResource',
59 'OpenResFile',
60 'CreateResFile',
61 'RsrcZoneInit',
62 'InitResources',
63 'RsrcMapEntry',
66 missing_Qt = [
67 'SpriteMediaGetIndImageProperty', # XXXX Why isn't this in carbon?
68 'CheckQuickTimeRegistration',
69 'SetMovieAnchorDataRef',
70 'GetMovieAnchorDataRef',
71 'GetMovieLoadState',
72 'OpenADataHandler',
73 'MovieMediaGetCurrentMovieProperty',
74 'MovieMediaGetCurrentTrackProperty',
75 'MovieMediaGetChildMovieDataReference',
76 'MovieMediaSetChildMovieDataReference',
77 'MovieMediaLoadChildMovieFromDataReference',
78 'Media3DGetViewObject',
81 missing_Qd = [
82 ## 'device', # Too many false positives
83 'portBits',
84 'portPixMap',
85 'portVersion',
86 'grafVars',
89 missing_Qdoffs = [
93 missing_Menu = [
94 'GetMenuItemRefCon2',
95 'SetMenuItemRefCon2',
96 'EnableItem',
97 'DisableItem',
98 'CheckItem',
99 'CountMItems',
100 'OpenDeskAcc',
101 'SystemEdit',
102 'SystemMenu',
103 'SetMenuFlash',
104 'InitMenus',
105 'InitProcMenu',
108 missing_List = [
111 missing_Icn = [
112 'IconServicesTerminate',
115 missing_Fm = [
116 'InitFonts',
117 'SetFontLock',
118 'FlushFonts',
121 missing_Evt = [
122 'SystemEvent',
123 'SystemTask',
124 'SystemClick',
125 'GetOSEvent',
126 'OSEventAvail',
129 missing_Dlg = [
130 'SetGrafPortOfDialog',
133 missing_Ctl = [
134 'GetAuxiliaryControlRecord',
135 'SetControlColor',
138 missing_Cm = [
139 'SetComponentInstanceA5',
140 'GetComponentInstanceA5',
143 missing_App = [
144 'GetThemeMetric',
147 missing_AE = [
148 'AEGetDescDataSize',
149 'AEReplaceDescData',
153 missing = []
154 for name in dir():
155 if name[:8] == 'missing_':
156 missing = missing + eval(name)
157 del name
159 def _search():
160 # Warning: this function only works on Unix
161 import string, os
162 re = string.join(missing, '|')
163 re = """[^a-zA-Z0-9_'"](%s)[^a-zA-Z0-9_'"]""" % re
164 os.system("find . -name '*.py' -print | xargs egrep '%s'"%re)
166 if __name__ == '__main__':
167 _search()