home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Documentation / develop / develop Issue 12 / develop 12 code / Components / MathComponent.h < prev    next >
Encoding:
Text File  |  1992-10-16  |  1.6 KB  |  72 lines  |  [TEXT/KAHL]

  1. /*
  2.     File:        MathComponent.h
  3.  
  4.     Contains:    Header file for math component routines.
  5.  
  6.     Written by:    Gary Woodcock
  7.  
  8.     Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12. */
  13.  
  14. //-----------------------------------------------------------------------
  15. // Includes
  16.  
  17. #ifndef    _MATHCOMPONENT_
  18. #define    _MATHCOMPONENT_
  19.  
  20. #include <QuickTimeComponents.h>
  21.  
  22. //-----------------------------------------------------------------------
  23. // Public constants
  24.  
  25. #define    mathComponentType        'math'
  26.  
  27. // Math component request codes
  28. enum
  29. {
  30.     kDoDivideSelect = 1,
  31.     kDoMultiplySelect
  32. };
  33.  
  34. //-----------------------------------------------------------------------
  35. // Public types
  36.  
  37. typedef    ComponentInstance    MathComponent;
  38.  
  39. //-----------------------------------------------------------------------
  40. // Public interfaces
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif __cplusplus
  45.  
  46. pascal    ComponentResult    DoDivide    (MathComponent    mathInstance,
  47.                                      short            numerator,
  48.                                      short            denominator,
  49.                                      short            *result)
  50.                                      
  51.     = ComponentCallNow (kDoDivideSelect, 0x08);
  52.     
  53. pascal    ComponentResult    DoMultiply    (MathComponent    mathInstance,
  54.                                      short            firstNum,
  55.                                      short            secondNum,
  56.                                      short            *result)
  57.                                      
  58.     = ComponentCallNow (kDoMultiplySelect, 0x08);
  59.  
  60. // Glue to send a target request code to a component - comment this out if you're using 
  61. // QuickTime 1.5 or later
  62. pascal long    ComponentSetTarget (ComponentInstance ti, ComponentInstance target)
  63.     = ComponentCallNow (kComponentTargetSelect, 0x04);
  64.  
  65. #ifdef __cplusplus
  66. }
  67. #endif __cplusplus
  68.  
  69. #endif _MATHCOMPONENT_
  70.  
  71. //-----------------------------------------------------------------------
  72.