Unified handle-conversion scheme to

handle = Ctl.as_Resource(ctl)
  ctl = Ctl.as_Control(handle)
and similarly for List, Menu, TE. The old handle.as_Control() methods are
still there for backward compatability.
This commit is contained in:
Jack Jansen 1999-12-23 14:32:06 +00:00
parent 7b912120ca
commit a1a0fef2ea
10 changed files with 120 additions and 27 deletions

View file

@ -24,6 +24,7 @@ from macsupport import *
MenuHandle = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
MenuRef = MenuHandle
Handle = OpaqueByValueType("Handle", "ResObj")
unsigned_char = Type('unsigned char', 'b')
@ -34,6 +35,7 @@ includestuff = includestuff + """
#define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
#define as_Menu(h) ((MenuHandle)h)
#define as_Resource(h) ((Handle)h)
"""
class MyObjectDefinition(GlobalObjectDefinition):