Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
IRS_Register.c
/******************************************************************************\ |
Module: IRS_Register.c |
Purpose: plug-in renderer's registration methods |
Author: Sun-Inn Shih |
Copyright (C) 1993-96 Apple Computer, Inc. All rights reserved. |
\*****************************************************************************/ |
#include <QD3D.h> |
#include <QD3DRenderer.h> |
#include <QD3DExtension.h> |
#include "IRS_MetaHandler.h" |
#include "IRShell.h" |
TQ3XObjectClass RendererClass; |
#include <CodeFragments.h> |
OSErr IRSRegister( |
void); |
long IRSExit( |
void); |
/*===========================================================================*\ |
* |
* Routine: IRSRegister() |
* |
* Purpose: Register an object class in the QuickDraw 3D hierarchy. |
* |
* QD3D calls: Q3XObjectHierarchy_RegisterClass() in QD3DExtentionl.h |
* |
\*===========================================================================*/ |
OSErr IRSRegister( |
void) |
{ |
TQ3ObjectType classType; /* This is returned from QD3D */ |
RendererClass = |
Q3XObjectHierarchy_RegisterClass( /* register into QD3D hierarchy */ |
kQ3SharedTypeRenderer, /* parent type - a existing type */ |
&classType, /* the new object class type */ |
"IR Shell", /* name, used in the text metafile */ |
IRSMetaHandler, /* metahandler */ |
NULL, /* virtual meta handler*/ |
0, /* methods Size */ |
sizeof(struct irsData)); /* size of the object instandce data */ |
if(RendererClass == NULL) |
{ |
return kQ3Failure; |
} |
return noErr; |
} |
/*===========================================================================*\ |
* |
* Routine: IRSExit() |
* |
* Comments: exit share library |
* |
\*===========================================================================*/ |
long IRSExit( |
void) |
{ |
return 0; |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14