Subversion Repositories shark

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/*
2
 * Copyright (c) 1995 The Regents of the University of California.
3
 * All rights reserved.
4
 *
5
 * Permission to use, copy, modify, and distribute this software and its
6
 * documentation for any purpose, without fee, and without written agreement is
7
 * hereby granted, provided that the above copyright notice and the following
8
 * two paragraphs appear in all copies of this software.
9
 *
10
 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
11
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
12
 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
13
 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
16
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17
 * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
18
 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
19
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
20
 
21
 contributed by (but no rights held by):
22
 
23
 Michael J. Donahue
24
 National Institute of Standards and Technology
25
 Gaithersburg MD USA
26
 donahue@ulexite.nist.gov
27
 
28
 */
29
 
30
/*
31
 * Portions of this software Copyright (c) 1995 Brown University.
32
 * All rights reserved.
33
 *
34
 * Permission to use, copy, modify, and distribute this software and its
35
 * documentation for any purpose, without fee, and without written agreement
36
 * is hereby granted, provided that the above copyright notice and the
37
 * following two paragraphs appear in all copies of this software.
38
 *
39
 * IN NO EVENT SHALL BROWN UNIVERSITY BE LIABLE TO ANY PARTY FOR
40
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
41
 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF BROWN
42
 * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
 *
44
 * BROWN UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
45
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
46
 * PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
47
 * BASIS, AND BROWN UNIVERSITY HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
48
 * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
49
 */
50
 
51
#include <X11/Xlib.h>
52
#include <X11/Xutil.h>
53
 
54
/*
55
   Changes to make the code reentrant:
56
     deglobalize totNumFrames, realTimeStart, seekValue, EOF_flag
57
   Additional changes:
58
     none
59
   -lsh@cs.brown.edu (Loring Holden)
60
*/
61
 
62
#define DISPLAY_WINDOW_BORDER 4
63
 
64
/* Control bar display flag */
65
extern int ControlShow;
66
#define CTRLBAR_OFF  0
67
#define CTRLBAR_ON   1
68
#define CTRLBAR_NONE 2  /* No control bar at all */
69
 
70
/* Video play states */
71
extern int ControlState;
72
#define CTRL_UNDEFINED  -1
73
#define CTRL_PAUSE       0
74
#define CTRL_PLAY        1
75
#define CTRL_STEP        2
76
#define CTRL_EOF         3
77
#define CTRL_REWIND      4
78
#define CTRL_FFWD        5   /* Fast Forward (skips frames w/o display) */
79
#define CTRL_EXIT        6
80
 
81
/* ControlMotion tracks Play/Pause status (for resumption after e.g. Rewind) */
82
extern int ControlMotion;
83
#define CTRLMOTION_OFF 0   /* Pause */
84
#define CTRLMOTION_ON  1   /* Play  */
85
 
86
/* StopWatch constants */
87
extern long TotalFrameCount; /* Total number of frames processed, with loops */
88
#define STOPWATCH_RESET 0  /* Resets timing, returns 0.0.                   */
89
#define STOPWATCH_START 1  /* Starts timing, returns 0.0.                   */
90
#define STOPWATCH_STOP  2  /* Stops timing,  returns elapsed time in secs.  */
91
#define STOPWATCH_READ  3  /* Returns elapsed time in seconds.              */
92
 
93
/* Miscellaneous externals */
94
extern int loopFlag;      /* Video loop flag */
95
extern int startFrame;    /* != -1 => skip all frames up to this one */
96
extern int endFrame;      /* Either last frame to display or else frame count,
97
                           * depending on the value of seekValue.             */