transport.h
4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*====================================================================
* transport.h
*
* Copyright 1995, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
#ifndef __transport__
#define __transport__
/*
transport.h
Contains definitions and structures for transport controls.
*/
#include "UI.h"
#include "UIpane.h"
#include "music.h" /* COMP_SEQ_PLAY */
/*
UI item ids must start at zero since they are stored
in an array and the ids are used to index the items.
*/
enum
{
kRewItemID = 0,
kStopItemID,
kPlayItemID,
kFwdItemID,
kCueBackItemID,
kCueFwdItemID,
kCounterItemID,
kAutoCueItemID,
kLoopEnableItemID, /* Must be last item since it is conditional on COMP_SEQ_PLAY */
#ifdef COMP_SEQ_PLAY
kNumXptItems = kLoopEnableItemID
#else
kNumXptItems
#endif
};
/*
UI item locations are relative to the transport's origin
which is defined by kXpt_l and kXpt_t.
*/
#define kXpt_l 28
#define kXpt_t 20
#define kXpt_h 50
#define kXpt_delta 10
#define kXptBtn_t 30
#define kXptBtn_w 17
#define kXptBtn_h 13
#define kXptBtn_delta 1
#define kMiniBtn_w 11
#define kMiniBtn_h 11
#define kRewItem_l kXpt_delta
#define kRewItem_t kXptBtn_t
#define kStopItem_l (kRewItem_l +kXptBtn_w + kXptBtn_delta)
#define kStopItem_t kXptBtn_t
#define kPlayItem_l (kStopItem_l +kXptBtn_w + kXptBtn_delta)
#define kPlayItem_t kXptBtn_t
#define kFwdItem_l (kPlayItem_l + kXptBtn_w + kXptBtn_delta)
#define kFwdItem_t kXptBtn_t
#define kCueBackItem_l (kFwdItem_l + kXptBtn_w + kXptBtn_delta)
#define kCueBackItem_t kXptBtn_t
#define kCueFwdItem_l (kCueBackItem_l + kXptBtn_w + kXptBtn_delta)
#define kCueFwdItem_t kXptBtn_t
#define kXpt_w (kCueFwdItem_l + kXptBtn_w + kXpt_delta)
#define kCounterItem_w 64
#define kCounterItem_h 16
#define kCounterItem_l kXpt_delta
#define kCounterItem_t 5
#define kAutoCueItem_l (kCounterItem_l + kCounterItem_w + 5)
#define kAutoCueItem_t kCounterItem_t
#define kLoopEnableItem_l (kAutoCueItem_l + kMiniBtn_w + kXptBtn_delta)
#define kLoopEnableItem_t kAutoCueItem_t
typedef enum
{
kStopped,
kPlaying,
kFastPlay
} TransportState;
typedef enum
{
kRealTime,
kMidiTime
} CounterUnits;
typedef struct
{
TransportState fState; /* Contains the state of the transport. */
CounterUnits fCounterUnits;
char fIsLooping; /* TRUE if looping is enabled. */
char fAutoCue; /* TRUE if next sequence is cued during auto stop. */
UIPane fPane; /* Contains window pane data. */
UIItem fItemList[kNumXptItems]; /* A list of control items in this pane. */
} Transport;
void Xpt_Init (UIPane **ppPane);
void Xpt_Fini (void);
void Xpt_Play (void);
void Xpt_Stop (void);
void Xpt_AutoStop (void);
void Xpt_RTZ (void);
void Xpt_FastForward (void);
void Xpt_NormalForward (void);
void Xpt_CueBack (void);
void Xpt_CueForward (void);
void Xpt_SetLoopEnable (char enable);
#endif /* __transport__ */