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

  1. /*
  2.     File:        SampleLibrary.h
  3.  
  4.     Contains:    Interface for everything that the CSampleLibrary 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. #ifndef __SAMPLELIBRARY__
  12. #define __SAMPLELIBRARY__
  13.  
  14. #ifndef __TYPES__
  15. #include <Types.h>
  16. #endif
  17.  
  18. /*————————————————————————————————————————————————————————————————————————————————————
  19.     DEFINITIONS AND CONSTANTS
  20. ————————————————————————————————————————————————————————————————————————————————————*/
  21.  
  22. #define    rWindow                        128            /* application's window */
  23. #define rStopRect                    128            /* rectangle for Stop light */
  24. #define rGoRect                        129            /* rectangle for Go light */
  25.  
  26. #define    mLight                        131            /* Light menu */
  27. #define    iStop                        1
  28. #define    iGo                            2
  29.  
  30. // if k<functionsetname>ID is declared, it will be used as default function set id
  31. // when the shared library is built.
  32.  
  33. #define kTrafficLightLibID            "slm:samp$CTrafficLightLib"
  34. #define kTrafficLightFunctionSet     "slm:samp$CTrafficLightFunctionSet,1.1"
  35.  
  36. /*————————————————————————————————————————————————————————————————————————————————————
  37.     FunctionSet routines
  38. ————————————————————————————————————————————————————————————————————————————————————*/
  39.  
  40. OSErr            NewTrafficLight();
  41. void            FreeTrafficLight();
  42. Boolean         GetLightState();
  43. void             SetLightState( Boolean newState );
  44. void             DrawLight();
  45. void             AdjustTrafficLightMenus( Boolean activate );
  46. void             DoTrafficLightMenuCommand( short menuItem );
  47.  
  48. #endif