diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-25 12:15:04 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-25 12:15:04 (GMT) |
commit | 5a6fdcd3718927109592c6df692fe24a8fdaee31 (patch) | |
tree | 3816c4cbfcf1533dee55a48a8eec2c3557ae44cc /Mac/Lib | |
parent | 6dba6bc0a226c2dd384d9311b9ad842be653c2b5 (diff) | |
download | cpython-5a6fdcd3718927109592c6df692fe24a8fdaee31.zip cpython-5a6fdcd3718927109592c6df692fe24a8fdaee31.tar.gz cpython-5a6fdcd3718927109592c6df692fe24a8fdaee31.tar.bz2 |
Import the MacOS toolbox modules from the Carbon package.
Diffstat (limited to 'Mac/Lib')
30 files changed, 98 insertions, 98 deletions
diff --git a/Mac/Lib/Audio_mac.py b/Mac/Lib/Audio_mac.py index 14f825e..d8b327b 100644 --- a/Mac/Lib/Audio_mac.py +++ b/Mac/Lib/Audio_mac.py @@ -40,11 +40,11 @@ class Play_Audio_mac: def writeframes(self, data): import time - from Sound import bufferCmd, callBackCmd, extSH + from Carbon.Sound import bufferCmd, callBackCmd, extSH import struct import MacOS if not self._chan: - import Snd + from Carbon import Snd self._chan = Snd.SndNewChannel(5, 0, self._callback) nframes = len(data) / self._nchannels / self._sampwidth if len(data) != nframes * self._nchannels * self._sampwidth: diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py index 1943908..68ad58e 100644 --- a/Mac/Lib/EasyDialogs.py +++ b/Mac/Lib/EasyDialogs.py @@ -14,18 +14,18 @@ This module uses DLOG resources 260 and on. Based upon STDWIN dialogs with the same names and functions. """ -from Dlg import GetNewDialog, SetDialogItemText, GetDialogItemText, ModalDialog -import Qd -import QuickDraw -import Dialogs -import Windows -import Dlg,Win,Evt,Events # sdm7g -import Ctl -import Controls -import Menu +from Carbon.Dlg import GetNewDialog, SetDialogItemText, GetDialogItemText, ModalDialog +from Carbon import Qd +from Carbon import QuickDraw +from Carbon import Dialogs +from Carbon import Windows +from Carbon import Dlg,Win,Evt,Events # sdm7g +from Carbon import Ctl +from Carbon import Controls +from Carbon import Menu import MacOS import string -from ControlAccessor import * # Also import Controls constants +from Carbon.ControlAccessor import * # Also import Controls constants import macfs def cr2lf(text): diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py index 3ee118d..b2b61db 100644 --- a/Mac/Lib/FrameWork.py +++ b/Mac/Lib/FrameWork.py @@ -5,24 +5,24 @@ DEBUG=0 import MacOS import traceback -from AE import * -from AppleEvents import * -from Ctl import * -from Controls import * -from Dlg import * -from Dialogs import * -from Evt import * -from Events import * -from Menu import * -from Menus import * -from Qd import * -from QuickDraw import * -#from Res import * -#from Resources import * -#from Snd import * -#from Sound import * -from Win import * -from Windows import * +from Carbon.AE import * +from Carbon.AppleEvents import * +from Carbon.Ctl import * +from Carbon.Controls import * +from Carbon.Dlg import * +from Carbon.Dialogs import * +from Carbon.Evt import * +from Carbon.Events import * +from Carbon.Menu import * +from Carbon.Menus import * +from Carbon.Qd import * +from Carbon.QuickDraw import * +#from Carbon.Res import * +#from Carbon.Resources import * +#from Carbon.Snd import * +#from Carbon.Sound import * +from Carbon.Win import * +from Carbon.Windows import * import types import EasyDialogs diff --git a/Mac/Lib/MiniAEFrame.py b/Mac/Lib/MiniAEFrame.py index fbb6f1b..e562301 100644 --- a/Mac/Lib/MiniAEFrame.py +++ b/Mac/Lib/MiniAEFrame.py @@ -9,14 +9,14 @@ There are two classes: import sys import traceback import MacOS -import AE -from AppleEvents import * -import Evt -from Events import * -import Menu -import Win -from Windows import * -import Qd +from Carbon import AE +from Carbon.AppleEvents import * +from Carbon import Evt +from Carbon.Events import * +from Carbon import Menu +from Carbon import Win +from Carbon.Windows import * +from Carbon import Qd import aetools import EasyDialogs diff --git a/Mac/Lib/PixMapWrapper.py b/Mac/Lib/PixMapWrapper.py index 72a64ba..b167cc2 100644 --- a/Mac/Lib/PixMapWrapper.py +++ b/Mac/Lib/PixMapWrapper.py @@ -5,8 +5,8 @@ Python Imaging Library Image object. J. Strout <joe@strout.net> February 1999""" -import Qd -import QuickDraw +from Carbon import Qd +from Carbon import QuickDraw import struct import MacOS import img diff --git a/Mac/Lib/aepack.py b/Mac/Lib/aepack.py index be6e645..161f3eb 100644 --- a/Mac/Lib/aepack.py +++ b/Mac/Lib/aepack.py @@ -17,8 +17,8 @@ import string import types from string import strip from types import * -import AE -from AppleEvents import * +from Carbon import AE +from Carbon.AppleEvents import * import MacOS import macfs import StringIO diff --git a/Mac/Lib/aetools.py b/Mac/Lib/aetools.py index 1af761e..00ec18a 100644 --- a/Mac/Lib/aetools.py +++ b/Mac/Lib/aetools.py @@ -22,8 +22,8 @@ files: the pack stuff from aepack, the objects from aetypes. from types import * -import AE -import AppleEvents +from Carbon import AE +from Carbon import AppleEvents import MacOS import sys diff --git a/Mac/Lib/aetypes.py b/Mac/Lib/aetypes.py index 253d1e7..8fe8cf9 100644 --- a/Mac/Lib/aetypes.py +++ b/Mac/Lib/aetypes.py @@ -1,6 +1,6 @@ """aetypes - Python objects representing various AE types.""" -from AppleEvents import * +from Carbon.AppleEvents import * import struct from types import * import string diff --git a/Mac/Lib/buildtools.py b/Mac/Lib/buildtools.py index dd2e30e..da43d09 100644 --- a/Mac/Lib/buildtools.py +++ b/Mac/Lib/buildtools.py @@ -6,7 +6,7 @@ import string import imp import marshal import macfs -import Res +from Carbon import Res import MACFS import MacOS import macostools diff --git a/Mac/Lib/cfmfile.py b/Mac/Lib/cfmfile.py index 9c449e0..9efc409 100644 --- a/Mac/Lib/cfmfile.py +++ b/Mac/Lib/cfmfile.py @@ -7,7 +7,7 @@ __author__ = "jvr" import macfs import struct -import Res +from Carbon import Res import os import sys diff --git a/Mac/Lib/findertools.py b/Mac/Lib/findertools.py index 7e1e3fd..aeb6b93 100644 --- a/Mac/Lib/findertools.py +++ b/Mac/Lib/findertools.py @@ -15,7 +15,7 @@ So bottom line: the processes() stuff does not work on < MacOS9 Mostly written by erik@letterror.com """ import Finder -import AppleEvents +from Carbon import AppleEvents import aetools import MacOS import sys diff --git a/Mac/Lib/ic.py b/Mac/Lib/ic.py index 5756463..abe5b69 100644 --- a/Mac/Lib/ic.py +++ b/Mac/Lib/ic.py @@ -3,7 +3,7 @@ import icglue import string import sys -import Res +from Carbon import Res import macfs import macostools diff --git a/Mac/Lib/macfsn.py b/Mac/Lib/macfsn.py index 3c12646..c496903 100644 --- a/Mac/Lib/macfsn.py +++ b/Mac/Lib/macfsn.py @@ -2,7 +2,7 @@ API calls with Navigation Services""" import macfs import struct -import Res +from Carbon import Res try: import Nav except ImportError: diff --git a/Mac/Lib/macostools.py b/Mac/Lib/macostools.py index d706856..ab6ab88 100644 --- a/Mac/Lib/macostools.py +++ b/Mac/Lib/macostools.py @@ -5,7 +5,7 @@ copy(src, dst) - Full copy of 'src' to 'dst' """ import macfs -import Res +from Carbon import Res import os from MACFS import * import MacOS diff --git a/Mac/Lib/mkcwproject/__init__.py b/Mac/Lib/mkcwproject/__init__.py index fec4476..da73adb 100644 --- a/Mac/Lib/mkcwproject/__init__.py +++ b/Mac/Lib/mkcwproject/__init__.py @@ -1,7 +1,7 @@ import cwxmlgen import cwtalker import os -import AppleEvents +from Carbon import AppleEvents import macfs def mkproject(outputfile, modulename, settings, force=0, templatename=None): diff --git a/Mac/Lib/preferences.py b/Mac/Lib/preferences.py index b1e0948..8b77012 100644 --- a/Mac/Lib/preferences.py +++ b/Mac/Lib/preferences.py @@ -1,7 +1,7 @@ # # General parser/loaders for preferences files and such # -import Res +from Carbon import Res import macfs import struct import MACFS diff --git a/Mac/Lib/py_resource.py b/Mac/Lib/py_resource.py index 85d67e5..0faf1f1 100644 --- a/Mac/Lib/py_resource.py +++ b/Mac/Lib/py_resource.py @@ -1,6 +1,6 @@ """Creation of PYC resources""" import os -import Res +from Carbon import Res import __builtin__ READ = 1 diff --git a/Mac/Lib/test/AEservertest.py b/Mac/Lib/test/AEservertest.py index 631889d..d474f43 100644 --- a/Mac/Lib/test/AEservertest.py +++ b/Mac/Lib/test/AEservertest.py @@ -10,15 +10,15 @@ import sys sys.stdout = sys.stderr import traceback import MacOS -import AE -from AppleEvents import * -import Evt -from Events import * -import Menu -import Dlg -import Win -from Windows import * -import Qd +from Carbon import AE +from Carbon.AppleEvents import * +from Carbon import Evt +from Carbon.Events import * +from Carbon import Menu +from Carbon import Dlg +from Carbon import Win +from Carbon.Windows import * +from Carbon import Qd import macfs import aetools diff --git a/Mac/Lib/test/aete.py b/Mac/Lib/test/aete.py index 21fff61..3945a86 100644 --- a/Mac/Lib/test/aete.py +++ b/Mac/Lib/test/aete.py @@ -8,7 +8,7 @@ import sys import types import StringIO -from Res import * +from Carbon.Res import * def main(): filename = "" diff --git a/Mac/Lib/test/cmtest.py b/Mac/Lib/test/cmtest.py index 7170424..bdbca23 100644 --- a/Mac/Lib/test/cmtest.py +++ b/Mac/Lib/test/cmtest.py @@ -1,8 +1,8 @@ """cmtest - List all components in the system""" -import Cm -import Res -import sys +from Carbon import Cm +from Carbon import Res +from Carbon import sys def getstr255(r): """Get string from str255 resource""" diff --git a/Mac/Lib/test/ctbtest.py b/Mac/Lib/test/ctbtest.py index cb1b506..91824d3 100644 --- a/Mac/Lib/test/ctbtest.py +++ b/Mac/Lib/test/ctbtest.py @@ -3,8 +3,8 @@ # To simplify matters use the python console window for output. # import ctb -import Evt -import Events +from Carbon import Evt +from Carbon import Events import MacOS import sys diff --git a/Mac/Lib/test/dragtest.py b/Mac/Lib/test/dragtest.py index 7663af7..28eb1a9 100644 --- a/Mac/Lib/test/dragtest.py +++ b/Mac/Lib/test/dragtest.py @@ -1,4 +1,4 @@ -import Drag +from Carbon import Drag import time xxxx=1 def decode_hfs(data): diff --git a/Mac/Lib/test/echo.py b/Mac/Lib/test/echo.py index 46c84c2..f84e13b 100644 --- a/Mac/Lib/test/echo.py +++ b/Mac/Lib/test/echo.py @@ -10,15 +10,15 @@ import sys sys.stdout = sys.stderr import traceback import MacOS -import AE -from AppleEvents import * -import Evt -from Events import * -import Menu -import Dlg -import Win -from Windows import * -import Qd +from Carbon import AE +from Carbon.AppleEvents import * +from Carbon import Evt +from Carbon.Events import * +from Carbon import Menu +from Carbon import Dlg +from Carbon import Win +from Carbon.Windows import * +from Carbon import Qd import aetools import EasyDialogs diff --git a/Mac/Lib/test/icgluetest.py b/Mac/Lib/test/icgluetest.py index 97c0c74..dd34bd0 100644 --- a/Mac/Lib/test/icgluetest.py +++ b/Mac/Lib/test/icgluetest.py @@ -2,7 +2,7 @@ not the icglue module, is what you should normally use.""" import icglue -import Res +from Carbon import Res ici = icglue.ICStart('Pyth') #ici.ICFindConfigFile() diff --git a/Mac/Lib/test/tell.py b/Mac/Lib/test/tell.py index 74e0ca0..fcacb7e 100644 --- a/Mac/Lib/test/tell.py +++ b/Mac/Lib/test/tell.py @@ -1,8 +1,8 @@ # (Slightly less) primitive operations for sending Apple Events to applications. # This could be the basis of a Script Editor like application. -from AE import * -from AppleEvents import * +from Carbon.AE import * +from Carbon.AppleEvents import * import aetools import types diff --git a/Mac/Lib/test/test_setcontroldata.py b/Mac/Lib/test/test_setcontroldata.py index c46e613..8167214 100644 --- a/Mac/Lib/test/test_setcontroldata.py +++ b/Mac/Lib/test/test_setcontroldata.py @@ -1,5 +1,5 @@ import W -from Controls import * +from Carbon.Controls import * w = W.Window((200,200), "Test") diff --git a/Mac/Lib/test/tlist.py b/Mac/Lib/test/tlist.py index fdcfe6e..5b84fc5 100644 --- a/Mac/Lib/test/tlist.py +++ b/Mac/Lib/test/tlist.py @@ -8,10 +8,10 @@ # Actually, it is more a test of FrameWork by now.... from FrameWork import * -import Win -import Qd -import List -import Lists +from Carbon import Win +from Carbon import Qd +from Carbon import List +from Carbon import Lists import os class ListWindow(Window): diff --git a/Mac/Lib/test/tsnd.py b/Mac/Lib/test/tsnd.py index ac347cb..919785a 100644 --- a/Mac/Lib/test/tsnd.py +++ b/Mac/Lib/test/tsnd.py @@ -1,8 +1,8 @@ # Show off SndPlay (and some resource manager functions). # Get a list of all 'snd ' resources in the system and play them all. -from Res import * -from Snd import * +from Carbon.Res import * +from Carbon.Snd import * ch = SndNewChannel(0, 0, None) print "Channel:", ch diff --git a/Mac/Lib/test/tte.py b/Mac/Lib/test/tte.py index 9e6bee4..bde7de2 100644 --- a/Mac/Lib/test/tte.py +++ b/Mac/Lib/test/tte.py @@ -1,8 +1,8 @@ # Test TE module, simple version -from Win import * -from TE import * -import Qd +from Carbon.Win import * +from Carbon.TE import * +from Carbon import Qd r = (40, 40, 140, 140) w = NewWindow(r, "TETextBox test", 1, 0, -1, 1, 0x55555555) diff --git a/Mac/Lib/videoreader.py b/Mac/Lib/videoreader.py index 9691875..7b776f2 100644 --- a/Mac/Lib/videoreader.py +++ b/Mac/Lib/videoreader.py @@ -6,12 +6,12 @@ # Jack Jansen, August 2000 # import sys -import Qt -import QuickTime -import Qd -import Qdoffs -import QDOffscreen -import Res +from Carbon import Qt +from Carbon import QuickTime +from Carbon import Qd +from Carbon import Qdoffs +from Carbon import QDOffscreen +from Carbon import Res import MediaDescr import imgformat import os |