home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Sample Apps / CCPlusSample / Sources / SampleLibrary.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-19  |  1.7 KB  |  63 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SampleLibrary.h
  3.  
  4.     Contains:    Interface for everything that the CCPlusSampleLibrary exports including
  5.                 the functions of the traffic light function set.
  6.  
  7.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  8.  
  9. */
  10.  
  11.  
  12. #ifndef __SAMPLELIBRARY__
  13. #define __SAMPLELIBRARY__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18.  
  19. /*————————————————————————————————————————————————————————————————————————————————————
  20.     DEFINITIONS AND CONSTANTS
  21. ————————————————————————————————————————————————————————————————————————————————————*/
  22.  
  23. #define    rWindow                        128            /* application's window */
  24. #define rStopRect                    128            /* rectangle for Stop light */
  25. #define rGoRect                        129            /* rectangle for Go light */
  26.  
  27. #define    mLight                        131            /* Light menu */
  28. #define    iStop                        1
  29. #define    iGo                            2
  30.  
  31. // if k<functionsetname>ID is declared, it will be used as default function set id
  32. // when the shared library is built.
  33.  
  34. #define kTrafficLightLibID            "slm:samp$CCPlusTrafficLightLib"
  35. #define kTrafficLightFunctionSet     "slm:samp$CCPlusTrafficLightFunctionSet,1.1"
  36.  
  37.  
  38. #ifdef __cplusplus
  39.     class TTrafficLight;
  40.     extern "C"
  41.     {
  42. #else
  43.     typedef void TTrafficLight;
  44. #endif 
  45.  
  46. /*————————————————————————————————————————————————————————————————————————————————————
  47.     FunctionSet routines.
  48. ————————————————————————————————————————————————————————————————————————————————————*/
  49.  
  50. TTrafficLight     *NewTrafficLight();
  51. void            FreeTrafficLight( TTrafficLight * );
  52. Boolean         GetLightState( TTrafficLight * );
  53. void             SetLightState( TTrafficLight * , Boolean newState );
  54. void             DrawLight( TTrafficLight * );
  55. void             AdjustTrafficLightMenus( TTrafficLight * , Boolean activate );
  56. void             DoTrafficLightMenuCommand( TTrafficLight * , short menuItem );
  57.  
  58. #ifdef __cplusplus
  59.     }
  60. #endif 
  61.  
  62.  
  63. #endif