home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / vcrdub / vcrdub.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  4.2 KB  |  138 lines

  1. /*
  2.  * Copyright (c) 1990, 1991 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/collab/vcrDub/RCS/vcrDub.h,v 0.12 91/09/24 22:18:44 lim Exp Locker: drapeau $ */
  25. /* $Log:    vcrDub.h,v $
  26.  * Revision 0.12  91/09/24  22:18:44  lim
  27.  * Changed 'DubEdit' to 'vcrDub' everywhere.
  28.  * Used relative filenames.
  29.  * 
  30.  * Revision 0.11  91/08/25  16:21:18  lim
  31.  * Included diagMode and PrintDiagnostics().
  32.  * 
  33.  * Revision 0.10  91/08/19  16:24:11  lim
  34.  * Initial revision.
  35.  * This version only supports NEC players.
  36.  *  */
  37.  
  38. #include <stdio.h>
  39. #include <sys/param.h>
  40. #include <sys/types.h>
  41. #include <sys/stat.h>
  42. #include <xview/xview.h>
  43. #include <xview/font.h>
  44. #include <xview/panel.h>
  45. #include <xview/textsw.h>
  46. #include <xview/cms.h>
  47. #include <xview/notice.h>
  48. #include <xview/xv_xrect.h>
  49. #include <gdd.h>
  50. #include "vcrDub_ui.h"
  51. #include <Browse.h>
  52. #include <getopt.h>
  53. #include <videoObj.h>
  54. #include <PlayerStatus.h>
  55.  
  56. #define MaxNameLength 30
  57. #define MaxPathLength 256
  58. #define MaxListSize 1000
  59. #define MaxLabelSize 22
  60.  
  61. #define EditHeight 14
  62. #define EditWidth  300
  63. #define EditGap    5
  64. #define LeftMargin 15
  65. #define TopMargin  5
  66. #define AudioXOffset 2
  67. #define AudioYOffset 1
  68. #define LabelXOffset 25
  69. #define LabelYOffset 11
  70.  
  71. #define Grey84         0                        /* Color definitions used in the canvas colormaps */
  72. #define Grey92         1
  73. #define Grey65         2
  74. #define White          3
  75. #define Red            4
  76. #define Unused1        5
  77. #define Unused2        6
  78. #define Black          7
  79. #define NumColors      8
  80.  
  81. #define audioBitmap_width 15                        /* audio dubbing on image */
  82. #define audioBitmap_height 12
  83. static char audioBitmap_bits[] = {
  84.    0xe0, 0x03, 0x10, 0x04, 0x0c, 0x18, 0x02, 0x20, 0x02, 0x20, 0x01, 0x40,
  85.    0x01, 0x40, 0x1d, 0x5c, 0x1d, 0x5c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c};
  86.  
  87. enum SelectMode { Unselected, Selected };
  88. enum Boolean diagMode;
  89.  
  90. typedef struct _MergeEdit
  91. {
  92.   char startAddress[12];
  93.   char endAddress[12];
  94.   struct _MergeEdit* nextMergeEdit;
  95. } MergeEdit;
  96.  
  97. typedef struct _EditLink
  98. {
  99.   struct _EditLink* nextEdit;
  100.   struct _EditLink* prevEdit;
  101.   int origNum;
  102.   enum Boolean audioDub;
  103.   MergeEdit* mergeList;
  104.   enum SelectMode sMode;
  105. } EditLink;
  106.  
  107. typedef struct _CanvasData
  108. {
  109.   Xv_window paintWindow;                        
  110.   Window    drawable;
  111.   Display*  display;
  112.   GC gc;                                /* Normal GC */
  113.   GC gcXor;                                /* GC which draws with XOR function */
  114.   Cms cms;                                /* Color map segment */
  115.   unsigned long* pixelTable;                        /* Array of pixel values for RGB array of colors */
  116.   EditLink* listHead;                            /* Head of linked list in canvas */
  117.   EditLink* listTail;                            /* Tail of linked list in canvas */
  118.   int numInLinkedList;                            /* Number of edits in linked list */
  119.   int numInMergedLists;                            /* Number of edits in all merged lists */
  120.   int numMerged;                            /* Number of edits from numInLinkedList that are merged */
  121.   int firstSelected;                            /* First selected edit - from 1 to n */
  122. } CanvasData;
  123.  
  124. CanvasData* editCanvas;
  125.  
  126. /* Xview stuff */
  127. vcrDub_window1_objects    *vcrDub_window1;
  128. vcrDub_dubSetupWindow_objects    *vcrDub_dubSetupWindow;
  129.  
  130. void CreateBrowse();
  131. int OpenHandler();
  132. int SaveHandler();
  133. VideoObject* DevInit();
  134. void DisplayError();
  135. void PrintDiagnostics();
  136.  
  137. static char hrcsid[] = "$Header: /Source/Media/collab/vcrDub/RCS/vcrDub.h,v 0.12 91/09/24 22:18:44 lim Exp Locker: drapeau $";
  138.