annotate gui/app.h @ 32926:7c205a5c2a9b

Remove parameter from appInitStruct() function. Since there is only one listItems structure variable (the global appMPlayer), there is no need to pass it to the function.
author ib
date Thu, 03 Mar 2011 13:13:20 +0000
parents 8661ae44ef39
children edb972e22021
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
1 /*
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
2 * This file is part of MPlayer.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
3 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
5 * it under the terms of the GNU General Public License as published by
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
7 * (at your option) any later version.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
8 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
12 * GNU General Public License for more details.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
13 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
14 * You should have received a copy of the GNU General Public License along
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
17 */
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
19 #ifndef MPLAYER_GUI_APP_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
20 #define MPLAYER_GUI_APP_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
22 #include "bitmap.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23 #include "wm/ws.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
25 // User events
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 #define evNone 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 #define evPlay 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 #define evStop 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 #define evPause 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 #define evPrev 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 #define evNext 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33 #define evLoad 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 #define evEqualizer 9
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 #define evPlayList 10
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 #define evIconify 11
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 #define evAbout 12
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 #define evLoadPlay 13
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 #define evPreferences 14
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 #define evSkinBrowser 15
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 #define evPlaySwitchToPause 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 #define evPauseSwitchToPlay 17
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 #define evBackward10sec 18
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 #define evForward10sec 19
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 #define evBackward1min 20
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 #define evForward1min 21
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 #define evBackward10min 22
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 #define evForward10min 23
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 #define evHalfSize 301
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 #define evNormalSize 24
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 #define evDoubleSize 25
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 #define evFullScreen 26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 #define evSetMoviePosition 27
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 #define evSetVolume 28
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 #define evSetBalance 29
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 #define evMute 30
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 #define evIncVolume 31
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 #define evDecVolume 32
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
63 #define evIncAudioBufDelay 33 // NOTE TO MYSELF: not all of these events
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
64 #define evDecAudioBufDelay 34 // are actually implemented, and update doc
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 #define evIncBalance 35
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 #define evDecBalance 36
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 #define evHelp 37
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 #define evLoadSubtitle 38
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 #define evDropSubtitle 43
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 #define evPlayDVD 39
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
73 #define evPlayVCD 40
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 #define evPlayNetwork 41
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
75 #define evLoadAudioFile 42
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 #define evSetAspect 44
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
77 #define evSetAudio 45
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
78 #define evSetVideo 46
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 #define evSetSubtitle 47
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 #define evExit 1000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
83 // General events
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 #define evFileLoaded 5000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 #define evHideMouseCursor 5001
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 #define evMessageBox 5002
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 #define evGeneralTimer 5003
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 #define evGtkIsOk 5004
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 #define evShowPopUpMenu 5005
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 #define evHidePopUpMenu 5006
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 #define evSetDVDAudio 5007
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 #define evSetDVDSubtitle 5008
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 #define evSetDVDTitle 5009
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 #define evSetDVDChapter 5010
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 #define evSubtitleLoaded 5011
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 #define evSetVCDTrack 5012
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 #define evSetURL 5013
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 #define evFName 7000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 #define evMovieTime 7001
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 #define evRedraw 7002
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 #define evHideWindow 7003
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 #define evShowWindow 7004
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 #define evFirstLoad 7005
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
107 typedef struct {
32911
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
108 int message;
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
109 const char *name;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 } evName;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
112 // Skin items
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
113
32919
933e784fb598 Cosmetic: Adjust item definitions.
ib
parents: 32912
diff changeset
114 #define itNone 0
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
115 #define itButton 101
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
116 #define itHPotmeter 102
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
117 #define itVPotmeter 103
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
118 #define itSLabel 104
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
119 #define itDLabel 105
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 #define itBase 106
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 #define itPotmeter 107
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 #define itFont 108
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
123
32919
933e784fb598 Cosmetic: Adjust item definitions.
ib
parents: 32912
diff changeset
124 #define itPLMButton (itNone - 1)
933e784fb598 Cosmetic: Adjust item definitions.
ib
parents: 32912
diff changeset
125 #define itPRMButton (itNone - 2)
933e784fb598 Cosmetic: Adjust item definitions.
ib
parents: 32912
diff changeset
126
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
127 // Button states
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
128
32920
8661ae44ef39 Redefine button states.
ib
parents: 32919
diff changeset
129 #define btnDisabled 0
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130 #define btnReleased 1
32920
8661ae44ef39 Redefine button states.
ib
parents: 32919
diff changeset
131 #define btnPressed 2
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
132
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
133 typedef struct {
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
134 int type;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
135
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
136 int x, y;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
137 int width, height;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
138
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
139 txSample Bitmap;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
140 txSample Mask;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
141
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
142 int fontid;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
143 int align;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
144 char *label;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
145
32911
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
146 int pwidth, pheight;
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
147 int numphases;
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
148 float value;
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
149
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
150 int message;
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
151
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
152 int R, G, B;
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
153
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
154 char *text;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
155 int textwidth;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
156 unsigned int starttime;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
157 int last_x;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
158
32911
e06fbdd8eb46 Clean up the wItem structure.
ib
parents: 32900
diff changeset
159 int pressed, tmp;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 } wItem;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
162 typedef struct {
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
163 wItem main;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
164 wsTWindow mainWindow;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
165 int mainDecoration;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
167 wItem sub;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
168 wsTWindow subWindow;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
170 wItem bar;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
171 wsTWindow barWindow;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
172 int barIsPresent;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28051
diff changeset
173
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
174 wItem menuBase;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
175 wItem menuSelected;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
176 wsTWindow menuWindow;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
177 int menuIsPresent;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178
32912
ca4d3fa55e43 Adjust the listItems structure.
ib
parents: 32911
diff changeset
179 int NumberOfMainItems;
ca4d3fa55e43 Adjust the listItems structure.
ib
parents: 32911
diff changeset
180 wItem mainItems[256];
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
181
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
182 int NumberOfBarItems;
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
183 wItem barItems[256];
32912
ca4d3fa55e43 Adjust the listItems structure.
ib
parents: 32911
diff changeset
184
ca4d3fa55e43 Adjust the listItems structure.
ib
parents: 32911
diff changeset
185 int NumberOfMenuItems;
ca4d3fa55e43 Adjust the listItems structure.
ib
parents: 32911
diff changeset
186 wItem menuItems[64];
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 } listItems;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
189 extern listItems appMPlayer;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
191 int appFindMessage(unsigned char *);
32926
7c205a5c2a9b Remove parameter from appInitStruct() function.
ib
parents: 32920
diff changeset
192 void appInitStruct(void);
32897
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
193 void btnModify(int, float);
14af78beac02 Cosmetic: Format to MPlayer coding style.
ib
parents: 32847
diff changeset
194 void btnSet(int, int);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
195
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
196 #endif /* MPLAYER_GUI_APP_H */