home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-16 | 1.6 KB | 72 lines | [TEXT/KAHL] |
- /*
- File: MathComponent.h
-
- Contains: Header file for math component routines.
-
- Written by: Gary Woodcock
-
- Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- */
-
- //-----------------------------------------------------------------------
- // Includes
-
- #ifndef _MATHCOMPONENT_
- #define _MATHCOMPONENT_
-
- #include <QuickTimeComponents.h>
-
- //-----------------------------------------------------------------------
- // Public constants
-
- #define mathComponentType 'math'
-
- // Math component request codes
- enum
- {
- kDoDivideSelect = 1,
- kDoMultiplySelect
- };
-
- //-----------------------------------------------------------------------
- // Public types
-
- typedef ComponentInstance MathComponent;
-
- //-----------------------------------------------------------------------
- // Public interfaces
-
- #ifdef __cplusplus
- extern "C" {
- #endif __cplusplus
-
- pascal ComponentResult DoDivide (MathComponent mathInstance,
- short numerator,
- short denominator,
- short *result)
-
- = ComponentCallNow (kDoDivideSelect, 0x08);
-
- pascal ComponentResult DoMultiply (MathComponent mathInstance,
- short firstNum,
- short secondNum,
- short *result)
-
- = ComponentCallNow (kDoMultiplySelect, 0x08);
-
- // Glue to send a target request code to a component - comment this out if you're using
- // QuickTime 1.5 or later
- pascal long ComponentSetTarget (ComponentInstance ti, ComponentInstance target)
- = ComponentCallNow (kComponentTargetSelect, 0x04);
-
- #ifdef __cplusplus
- }
- #endif __cplusplus
-
- #endif _MATHCOMPONENT_
-
- //-----------------------------------------------------------------------
-