home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SampleLibrary.h
-
- Contains: Interface for everything that the CCPlusSampleLibrary exports including
- the functions of the traffic light function set.
-
- Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
-
- */
-
-
- #ifndef __SAMPLELIBRARY__
- #define __SAMPLELIBRARY__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- /*————————————————————————————————————————————————————————————————————————————————————
- DEFINITIONS AND CONSTANTS
- ————————————————————————————————————————————————————————————————————————————————————*/
-
- #define rWindow 128 /* application's window */
- #define rStopRect 128 /* rectangle for Stop light */
- #define rGoRect 129 /* rectangle for Go light */
-
- #define mLight 131 /* Light menu */
- #define iStop 1
- #define iGo 2
-
- // if k<functionsetname>ID is declared, it will be used as default function set id
- // when the shared library is built.
-
- #define kTrafficLightLibID "slm:samp$CCPlusTrafficLightLib"
- #define kTrafficLightFunctionSet "slm:samp$CCPlusTrafficLightFunctionSet,1.1"
-
-
- #ifdef __cplusplus
- class TTrafficLight;
- extern "C"
- {
- #else
- typedef void TTrafficLight;
- #endif
-
- /*————————————————————————————————————————————————————————————————————————————————————
- FunctionSet routines.
- ————————————————————————————————————————————————————————————————————————————————————*/
-
- TTrafficLight *NewTrafficLight();
- void FreeTrafficLight( TTrafficLight * );
- Boolean GetLightState( TTrafficLight * );
- void SetLightState( TTrafficLight * , Boolean newState );
- void DrawLight( TTrafficLight * );
- void AdjustTrafficLightMenus( TTrafficLight * , Boolean activate );
- void DoTrafficLightMenuCommand( TTrafficLight * , short menuItem );
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif