Jack Jansen | 5bb3be2 | 2001-01-23 15:59:39 +0000 | [diff] [blame] | 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. |
| 4 | # |
| 5 | # Modules Help and (for the time being) Scrap are completely missing. |
| 6 | |
| 7 | missing_Win = [ |
| 8 | 'GetAuxWin', |
| 9 | 'GetWindowDataHandle', |
| 10 | 'SaveOld', |
| 11 | 'DrawNew', |
| 12 | 'SetWinColor', |
| 13 | 'SetDeskCPat', |
| 14 | 'InitWindows', |
| 15 | 'InitFloatingWindows', |
| 16 | 'GetWMgrPort', |
| 17 | 'GetCWMgrPort', |
| 18 | 'ValidRgn', # Use versions with Window in their name |
| 19 | 'ValidRect', |
| 20 | 'InvalRgn', |
| 21 | 'InvalRect', |
| 22 | 'IsValidWindowPtr', # I think this is useless for Python, but not sure... |
| 23 | 'GetWindowZoomFlag', # Not available in Carbon |
| 24 | 'GetWindowTitleWidth', # Ditto |
| 25 | ] |
| 26 | |
| 27 | missing_Snd = [ |
| 28 | 'MACEVersion', |
| 29 | 'SPBRecordToFile', |
| 30 | 'Exp1to6', |
| 31 | 'Comp6to1', |
| 32 | 'Exp1to3', |
| 33 | 'Comp3to1', |
| 34 | 'SndControl', |
| 35 | 'SndStopFilePlay', |
| 36 | 'SndStartFilePlay', |
| 37 | 'SndPauseFilePlay', |
| 38 | ] |
| 39 | |
| 40 | missing_Res = [ |
| 41 | 'RGetResource', |
| 42 | 'OpenResFile', |
| 43 | 'CreateResFile', |
| 44 | 'RsrcZoneInit', |
| 45 | 'InitResources', |
| 46 | 'RsrcMapEntry', |
| 47 | ] |
| 48 | |
| 49 | missing_Qt = [ |
| 50 | 'SpriteMediaGetIndImageProperty', # XXXX Why isn't this in carbon? |
| 51 | 'CheckQuickTimeRegistration', |
| 52 | 'SetMovieAnchorDataRef', |
| 53 | 'GetMovieAnchorDataRef', |
| 54 | 'GetMovieLoadState', |
| 55 | 'OpenADataHandler', |
| 56 | 'MovieMediaGetCurrentMovieProperty', |
| 57 | 'MovieMediaGetCurrentTrackProperty', |
| 58 | 'MovieMediaGetChildMovieDataReference', |
| 59 | 'MovieMediaSetChildMovieDataReference', |
| 60 | 'MovieMediaLoadChildMovieFromDataReference', |
| 61 | 'Media3DGetViewObject', |
| 62 | ] |
| 63 | |
| 64 | missing_Qd = [ |
Jack Jansen | bace5e9 | 2001-01-24 14:06:04 +0000 | [diff] [blame^] | 65 | 'device', |
| 66 | 'portBits', |
| 67 | 'portPixMap', |
| 68 | 'portVersion', |
| 69 | 'grafVars', |
Jack Jansen | 5bb3be2 | 2001-01-23 15:59:39 +0000 | [diff] [blame] | 70 | ] |
| 71 | |
| 72 | missing_Qdoffs = [ |
| 73 | ] |
| 74 | |
| 75 | |
| 76 | missing_Menu = [ |
| 77 | 'GetMenuItemRefCon2', |
| 78 | 'SetMenuItemRefCon2', |
| 79 | 'EnableItem', |
| 80 | 'DisableItem', |
| 81 | 'CheckItem', |
| 82 | 'CountMItems', |
| 83 | 'OpenDeskAcc', |
| 84 | 'SystemEdit', |
| 85 | 'SystemMenu', |
| 86 | 'SetMenuFlash', |
| 87 | 'InitMenus', |
| 88 | 'InitProcMenu', |
| 89 | ] |
| 90 | |
| 91 | missing_List = [ |
| 92 | ] |
| 93 | |
| 94 | missing_Icn = [ |
| 95 | 'IconServicesTerminate', |
| 96 | ] |
| 97 | |
| 98 | missing_Fm = [ |
| 99 | 'InitFonts', |
| 100 | 'SetFontLock', |
| 101 | 'FlushFonts', |
| 102 | ] |
| 103 | |
| 104 | missing_Evt = [ |
| 105 | 'SystemEvent', |
| 106 | 'SystemTask', |
| 107 | 'SystemClick', |
| 108 | 'GetOSEvent', |
| 109 | 'OSEventAvail', |
| 110 | ] |
| 111 | |
| 112 | missing_Dlg = [ |
| 113 | 'SetGrafPortOfDialog', |
| 114 | ] |
| 115 | |
| 116 | missing_Ctl = [ |
| 117 | 'GetAuxiliaryControlRecord', |
| 118 | 'SetControlColor', |
| 119 | ] |
| 120 | |
| 121 | missing_Cm = [ |
| 122 | 'SetComponentInstanceA5', |
| 123 | 'GetComponentInstanceA5', |
| 124 | ] |
| 125 | |
| 126 | missing_App = [ |
| 127 | 'GetThemeMetric', |
| 128 | ] |
| 129 | |
| 130 | missing_AE = [ |
| 131 | 'AEGetDescDataSize', |
| 132 | 'AEReplaceDescData', |
| 133 | ] |
| 134 | |
| 135 | |
| 136 | missing = [] |
| 137 | for name in dir(): |
| 138 | if name[:8] == 'missing_': |
| 139 | missing = missing + eval(name) |
| 140 | del name |
| 141 | |
| 142 | def _search(): |
| 143 | # Warning: this function only works on Unix |
| 144 | import string, os |
| 145 | re = string.join(missing, '|') |
| 146 | re = """[^a-zA-Z'"](%s)[^a-zA-Z'"]""" % re |
| 147 | os.system("find . -name '*.py' -print | xargs egrep '%s'"%re) |
| 148 | |
| 149 | if __name__ == '__main__': |
| 150 | _search() |