summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/Carbon
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-04-09 13:25:43 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-04-09 13:25:43 (GMT)
commit0ae3220736f9b71820b01aee1f540d0afcceb9a6 (patch)
tree6015b689b7555940e0c0822b1896fff3ee39cb23 /Lib/plat-mac/Carbon
parent058a84f36ae62dc69f4cb2a07d038e10a617fffc (diff)
downloadcpython-0ae3220736f9b71820b01aee1f540d0afcceb9a6.zip
cpython-0ae3220736f9b71820b01aee1f540d0afcceb9a6.tar.gz
cpython-0ae3220736f9b71820b01aee1f540d0afcceb9a6.tar.bz2
Detabbed.
Diffstat (limited to 'Lib/plat-mac/Carbon')
-rw-r--r--Lib/plat-mac/Carbon/ControlAccessor.py82
-rw-r--r--Lib/plat-mac/Carbon/Res.py4
2 files changed, 43 insertions, 43 deletions
diff --git a/Lib/plat-mac/Carbon/ControlAccessor.py b/Lib/plat-mac/Carbon/ControlAccessor.py
index 20cf414..791544e 100644
--- a/Lib/plat-mac/Carbon/ControlAccessor.py
+++ b/Lib/plat-mac/Carbon/ControlAccessor.py
@@ -5,53 +5,53 @@ import struct
# These needn't go through this module, but are here for completeness
def SetControlData_Handle(control, part, selector, data):
- control.SetControlData_Handle(part, selector, data)
-
+ control.SetControlData_Handle(part, selector, data)
+
def GetControlData_Handle(control, part, selector):
- return control.GetControlData_Handle(part, selector)
-
+ return control.GetControlData_Handle(part, selector)
+
_accessdict = {
- kControlPopupButtonMenuHandleTag: (SetControlData_Handle, GetControlData_Handle),
+ kControlPopupButtonMenuHandleTag: (SetControlData_Handle, GetControlData_Handle),
}
_codingdict = {
- kControlPushButtonDefaultTag : ("b", None, None),
-
- kControlEditTextTextTag: (None, None, None),
- kControlEditTextPasswordTag: (None, None, None),
-
- kControlPopupButtonMenuIDTag: ("h", None, None),
-
- kControlListBoxDoubleClickTag: ("b", None, None),
+ kControlPushButtonDefaultTag : ("b", None, None),
+
+ kControlEditTextTextTag: (None, None, None),
+ kControlEditTextPasswordTag: (None, None, None),
+
+ kControlPopupButtonMenuIDTag: ("h", None, None),
+
+ kControlListBoxDoubleClickTag: ("b", None, None),
}
def SetControlData(control, part, selector, data):
- if _accessdict.has_key(selector):
- setfunc, getfunc = _accessdict[selector]
- setfunc(control, part, selector, data)
- return
- if not _codingdict.has_key(selector):
- raise KeyError, ('Unknown control selector', selector)
- structfmt, coder, decoder = _codingdict[selector]
- if coder:
- data = coder(data)
- if structfmt:
- data = struct.pack(structfmt, data)
- control.SetControlData(part, selector, data)
-
+ if _accessdict.has_key(selector):
+ setfunc, getfunc = _accessdict[selector]
+ setfunc(control, part, selector, data)
+ return
+ if not _codingdict.has_key(selector):
+ raise KeyError, ('Unknown control selector', selector)
+ structfmt, coder, decoder = _codingdict[selector]
+ if coder:
+ data = coder(data)
+ if structfmt:
+ data = struct.pack(structfmt, data)
+ control.SetControlData(part, selector, data)
+
def GetControlData(control, part, selector):
- if _accessdict.has_key(selector):
- setfunc, getfunc = _accessdict[selector]
- return getfunc(control, part, selector, data)
- if not _codingdict.has_key(selector):
- raise KeyError, ('Unknown control selector', selector)
- structfmt, coder, decoder = _codingdict[selector]
- data = control.GetControlData(part, selector)
- if structfmt:
- data = struct.unpack(structfmt, data)
- if decoder:
- data = decoder(data)
- if type(data) == type(()) and len(data) == 1:
- data = data[0]
- return data
-
+ if _accessdict.has_key(selector):
+ setfunc, getfunc = _accessdict[selector]
+ return getfunc(control, part, selector, data)
+ if not _codingdict.has_key(selector):
+ raise KeyError, ('Unknown control selector', selector)
+ structfmt, coder, decoder = _codingdict[selector]
+ data = control.GetControlData(part, selector)
+ if structfmt:
+ data = struct.unpack(structfmt, data)
+ if decoder:
+ data = decoder(data)
+ if type(data) == type(()) and len(data) == 1:
+ data = data[0]
+ return data
+
diff --git a/Lib/plat-mac/Carbon/Res.py b/Lib/plat-mac/Carbon/Res.py
index 8465ab8..8f45d09 100644
--- a/Lib/plat-mac/Carbon/Res.py
+++ b/Lib/plat-mac/Carbon/Res.py
@@ -1,4 +1,4 @@
try:
- from OverrideFrom23._Res import *
+ from OverrideFrom23._Res import *
except ImportError:
- from _Res import *
+ from _Res import *