home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Sample Code / Sequence Grabber / Example Video Panel / ExampleVideoPanelPrivate.h < prev    next >
Encoding:
Text File  |  1992-10-16  |  3.9 KB  |  164 lines  |  [TEXT/KAHL]

  1. /*
  2.     File:        ExampleVideoPanelPrivate.h
  3.  
  4.     Contains:    Private header file for example video panel 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    _EXAMPLEVIDEOPANELPRIVATE_
  18. #define    _EXAMPLEVIDEOPANELPRIVATE_
  19.  
  20. #include <QuickTimeComponents.h>
  21. #include "DebugFlags.h"
  22.  
  23. //-----------------------------------------------------------------------
  24. // Private constants
  25.  
  26. // Base resource ID
  27. enum
  28. {
  29.     kBaseResID = 500
  30. };
  31.  
  32. // Maximum number of instances that can be opened
  33. enum
  34. {
  35.     kMaxExampleVideoPanelInstances = 1
  36. };
  37.  
  38. // Component and interface revision levels
  39. enum
  40. {
  41.     exampleVideoPanelInterfaceRevision = 0x00010001    
  42. };
  43.  
  44. enum
  45. {
  46.     kGenericError = -1L    // Handy return code
  47. };
  48.  
  49. // DITL ID
  50. enum
  51. {
  52.     kExampleVideoPanelDITLID = kBaseResID
  53. };
  54.  
  55. // DITL items
  56. enum
  57. {
  58.     kZeroBlackButton = 1,
  59.     kResetButton,
  60.     kSeparator,
  61.     kTextBlurb
  62. };
  63.  
  64. enum
  65. {
  66.     kDKey = 0x02,
  67.     kRKey = 0x0F
  68. };
  69.  
  70. //-----------------------------------------------------------------------
  71. // Private types
  72.  
  73. typedef    struct    PanelGlobals
  74. {
  75.     Component            self;
  76.     SeqGrabComponent    seqGrabber;
  77.     SGChannel            videoChannel;
  78.     short                resRefNum;
  79.     Pattern                grayPat;
  80.     unsigned short        savedBlackLevel;
  81. }
  82. PanelGlobals, *PanelGlobalsPtr, **PanelGlobalsHdl;
  83.  
  84. //-----------------------------------------------------------------------
  85. // Private prototypes
  86.  
  87. #ifdef DEBUG_IT
  88.  
  89. // Only need this prototype if we're running linked (for debugging)
  90. pascal ComponentResult
  91. ExampleVideoPanelDispatcher (ComponentParameters *params, Handle storage);
  92.                                          
  93. #endif DEBUG_IT
  94.                                              
  95. pascal ComponentResult
  96. _ExampleVideoPanelOpen (Handle storage, ComponentInstance self);
  97.     
  98. pascal ComponentResult
  99. _ExampleVideoPanelClose (Handle storage, ComponentInstance self);
  100.  
  101. pascal ComponentResult
  102. _ExampleVideoPanelCanDo (short selector);
  103.  
  104. pascal ComponentResult
  105. _ExampleVideoPanelVersion (void);
  106.  
  107. pascal ComponentResult
  108. _ExampleVideoPanelGetDitl (Handle storage, Handle *ditl);
  109.                                                          
  110. pascal ComponentResult
  111. _ExampleVideoPanelGetTitle (Handle storage, Str255 title);
  112.                                                          
  113. pascal ComponentResult
  114. _ExampleVideoPanelCanRun (Handle storage, SGChannel c);
  115.                                                          
  116. pascal ComponentResult
  117. _ExampleVideoPanelInstall (Handle storage, SGChannel c, DialogPtr d, short itemOffset);
  118.                                                          
  119. pascal ComponentResult
  120. _ExampleVideoPanelEvent (Handle storage, SGChannel c, DialogPtr d, short itemOffset,
  121.     EventRecord *theEvent, short *itemHit, Boolean *handled);
  122.                                                          
  123. pascal ComponentResult
  124. _ExampleVideoPanelItem (Handle storage, SGChannel c, DialogPtr d, short itemOffset, short itemNum);
  125.                                                          
  126. pascal ComponentResult
  127. _ExampleVideoPanelRemove (Handle storage, SGChannel c, DialogPtr d, short itemOffset);
  128.                                                          
  129. pascal ComponentResult
  130. _ExampleVideoPanelSetGrabber (Handle storage, SeqGrabComponent sg);
  131.                                                          
  132. pascal ComponentResult
  133. _ExampleVideoPanelSetResFile (Handle storage, short resRef);
  134.                                                          
  135. pascal ComponentResult
  136. _ExampleVideoPanelGetSettings (Handle storage, SGChannel c, UserData *ud, long flags);
  137.                                                         
  138. pascal ComponentResult
  139. _ExampleVideoPanelSetSettings (Handle storage, SGChannel c, UserData ud, long flags);
  140.                                                          
  141. pascal ComponentResult
  142. _ExampleVideoPanelValidateInput (Handle storage, Boolean *ok);
  143.                                                          
  144. static OSErr
  145. FakeButtonHit (ControlHandle theButton);
  146.  
  147. static OSErr
  148. FakeDialogButtonHit (DialogPtr theDialog, short theButtonItem);
  149.  
  150. static void
  151. SetUserItem (DialogPtr theDialog, short theItem, Handle userProc);
  152.  
  153. static Handle
  154. GetItemHandle (DialogPtr theDialog, short theItem);
  155.  
  156. static void
  157. GetItemBox (DialogPtr theDialog, short theItem, Rect *theRect);
  158.  
  159. //-----------------------------------------------------------------------
  160.  
  161. #endif    _EXAMPLEVIDEOPANELPRIVATE_
  162.  
  163. //-----------------------------------------------------------------------
  164.