home *** CD-ROM | disk | FTP | other *** search
- /*********** ScreenConversion: header files ***********/
-
- replace "#import \"screens.h\"" with "#import \"NSScreen.h\""
-
- replace "#import <AppKit/screens.h>" with "#import <AppKit/NSScreen.h>"
-
- replace "#include \"screens.h\"" with "#include \"NSScreen.h\""
-
- replace "#include <AppKit/screens.h>" with "#include <AppKit/NSScreen.h>"
-
- /*********** ScreenConversion: Application methods ***********/
-
- replace "[NSApp mainScreen]" with "[NSScreen mainScreen]"
-
- replace "[NSApp colorScreen]" with "[NSScreen deepestScreen]"
-
- replacemethod "getScreens:count:" with same
- error "ScreenConversion: 'getScreens:count:' has been replaced by NSScreen 'screens' (returning an NSArray instance)"
-
- replacemethod "mainScreen" with same
- error "ScreenConversion: 'mainScreen' has been replaced by NSScreen 'mainScreen'"
-
- replace "[NSApp screenSize]" with "[[NSScreen mainScreen] frame].size"
-
- replacemethod "colorScreen" with same
- error "ScreenConversion: 'colorScreen' has been replaced by NSScreen 'deepestScreen'"
-
- replacemethod "screenSize" with same
- error "ScreenConversion: '[NSApp screenSize]' has been replaced by NSScreen '[[NSScreen mainScreen] frame].size'"
-
- /*********** ScreenConversion: mark NXScreens ***********/
-
- replace "NXScreen *" with "NXScreen"
-
- replace "const NXScreen" with "NXScreen"
-
- replace "- <b arg1>:(NXScreen)<token theScreen><b arg2><w w2>{<scope implementation>}" with "- <arg1>:(NSScreen *)<theScreen> <arg2><w2>{<implementation>}"
- within ("<implementation>"){
- replace "<t theScreen>" "(TOPS__SCREEN)<theScreen>"
- }
-
- replace "<t fun>(<b arg1>NXScreen <t struct><b arg2>)<w w>{<scope implementation>}" with "<fun>(<arg1>NSScreeen *<struct><arg2>)<w w>{<scope implementation>}"
- within ("<implementation>"){
- replace "<struct>" "(TOPS__SCREEN)<struct>"
- }
-
- replace "NXScreen <b variables>;" with "NSScreen <variables>;"
- within ("<variables>"){
- replace "<t theScreen>" with "*(TOPSTEMP__SCREEN)<theScreen>"
- replace "**" with "*"
- }
-
- replace "(TOPSTEMP__SCREEN)<t theScreen><scope implementation>}" with same
- within ("<implementation>"){
- replace "<t theScreen>" "(TOPS__SCREEN)<t theScreen>"
- }
-
- replace "(NXScreen)" with "(NSScreen *)"
-
- replace "NXScreen*" with "NSScreen **"
-
- replace "NXScreen<w w><t tok>" with "NSScreen<w w>*<t tok>"
-
- /*********** ScreenConversion: prepare for replacemets ***********/
-
- replace "&(TOPS__SCREEN)<t theScreen>" with "(TOPS__SCREEN)<theScreen>"
-
- replace "*(TOPS__SCREEN)<t theScreen>" with "(TOPS__SCREEN)<theScreen>"
-
- replace "((TOPS__SCREEN)<t theScreen>)." with "(TOPS__SCREEN)<theScreen>."
-
- replace "((TOPS__SCREEN)<t theScreen>)->" with "(TOPS__SCREEN)<theScreen>."
-
- replace "(TOPS__SCREEN)<t theScreen>->" with "(TOPS__SCREEN)<theScreen>."
-
- /*********** ScreenConversion: make replacemets ***********/
-
- replace "(TOPS__SCREEN)<theScreen>.screenBounds" with "[(TOPS__SCREEN)<theScreen> frame]"
-
- replace "(TOPS__SCREEN)<theScreen>->screenBounds" with "[(TOPS__SCREEN)<theScreen> frame]"
-
- replace "(TOPS__SCREEN)<theScreen>.screenNumber" with same
- error "ScreenConversion: screenNumber is not in the API anymore and is no longer necessary. See the NSScreen class."
-
- replace "(TOPS__SCREEN)<theScreen>.depth" with "[screen depth]"
-
- /*********** ScreenConversion: cleanup ***********/
-
- replace "(TOPS__SCREEN)" with ""
-
- replace "(TOPSTEMP__SCREEN)" with ""
-
- replace "NXScreen" with same
- error "ScreenConversion: the NXScreen structure is obsolete; use the NSScreen class"
-