Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TObject.h

Go to the documentation of this file.
00001 /* 00002 File: TObject.h 00003 00004 Version: Mac OS X 00005 00006 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. 00007 ("Apple") in consideration of your agreement to the following terms, and your 00008 use, installation, modification or redistribution of this Apple software 00009 constitutes acceptance of these terms. If you do not agree with these terms, 00010 please do not use, install, modify or redistribute this Apple software. 00011 00012 In consideration of your agreement to abide by the following terms, and subject 00013 to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs 00014 copyrights in this original Apple software (the "Apple Software"), to use, 00015 reproduce, modify and redistribute the Apple Software, with or without 00016 modifications, in source and/or binary forms; provided that if you redistribute 00017 the Apple Software in its entirety and without modifications, you must retain 00018 this notice and the following text and disclaimers in all such redistributions of 00019 the Apple Software. Neither the name, trademarks, service marks or logos of 00020 Apple Computer, Inc. may be used to endorse or promote products derived from the 00021 Apple Software without specific prior written permission from Apple. Except as 00022 expressly stated in this notice, no other rights or licenses, express or implied, 00023 are granted by Apple herein, including but not limited to any patent rights that 00024 may be infringed by your derivative works or by other works in which the Apple 00025 Software may be incorporated. 00026 00027 The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO 00028 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED 00029 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00030 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN 00031 COMBINATION WITH YOUR PRODUCTS. 00032 00033 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR 00034 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00035 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00036 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION 00037 OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT 00038 (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN 00039 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00040 00041 Copyright © 2000-2002 Apple Computer, Inc., All Rights Reserved 00042 */ 00043 00044 #ifndef TObject_H_ 00045 #define TObject_H_ 00046 00047 #include <Carbon/Carbon.h> 00048 00049 #include "TCarbonEvent.h" 00050 00051 class TObject 00052 { 00053 public: 00054 EventTargetRef GetEventTarget() 00055 { return HIObjectGetEventTarget( fObjectRef ); } 00056 00057 HIObjectRef GetObjectRef() 00058 { return fObjectRef; } 00059 00060 void PrintDebugInfo() 00061 { return HIObjectPrintDebugInfo( fObjectRef ); } 00062 00063 void Retain() 00064 { CFRetain( fObjectRef ); } 00065 void Release() 00066 { CFRelease( fObjectRef ); } 00067 00068 protected: 00069 00070 // Types 00071 typedef OSStatus (*ConstructProc)( 00072 HIObjectRef inBaseObject, 00073 TObject** outInstance ); 00074 00075 // Construction/Destruction 00076 TObject( 00077 HIObjectRef inObject ); 00078 virtual ~TObject(); 00079 00080 static OSStatus RegisterSubclass( 00081 CFStringRef inID, 00082 CFStringRef inBaseID, 00083 ConstructProc inProc ); 00084 static EventRef CreateInitializationEvent(); 00085 00086 virtual OSStatus Initialize( 00087 TCarbonEvent& inEvent ); 00088 00089 virtual void PrintDebugInfoSelf(); 00090 00091 private: 00092 static OSStatus ObjectEventHandler( 00093 EventHandlerCallRef inCallRef, 00094 EventRef inEvent, 00095 void* inUserData ); 00096 00097 HIObjectRef fObjectRef; 00098 }; 00099 00100 00101 #endif // TObject_H_





Generated on Sun May 23 09:05:17 2004 for AUGUI Framework by doxygen1.3.7

hosted on SourceForge.net Logo