annotate gui/app.h @ 26448:0ded60b8e92e

Add $(EXESUF) to netstream rule.
author diego
date Sun, 20 Apr 2008 22:11:38 +0000
parents 4129c8cfa742
children b0a7b35b78d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
1 #ifndef MPLAYER_GUI_APP_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
2 #define MPLAYER_GUI_APP_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
4 #include "bitmap.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
5 #include "wm/ws.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
6 #include "wm/wskeys.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
8 // --- User events ------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
9
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
10 #define evNone 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
11 #define evPlay 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
12 #define evStop 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
13 #define evPause 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
14 #define evPrev 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
15 #define evNext 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
16 #define evLoad 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
17 #define evEqualizer 9
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
18 #define evPlayList 10
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
19 #define evIconify 11
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
20 #define evAbout 12
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21 #define evLoadPlay 13
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
22 #define evPreferences 14
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23 #define evSkinBrowser 15
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24 #define evPlaySwitchToPause 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25 #define evPauseSwitchToPlay 17
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 #define evBackward10sec 18
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 #define evForward10sec 19
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 #define evBackward1min 20
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 #define evForward1min 21
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 #define evBackward10min 22
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 #define evForward10min 23
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 #define evHalfSize 301
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 #define evNormalSize 24
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 #define evDoubleSize 25
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 #define evFullScreen 26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 #define evSetMoviePosition 27
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 #define evSetVolume 28
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 #define evSetBalance 29
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 #define evMute 30
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 #define evIncVolume 31
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 #define evDecVolume 32
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 #define evIncAudioBufDelay 33
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 #define evDecAudioBufDelay 34
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 #define evIncBalance 35
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 #define evDecBalance 36
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 #define evHelp 37
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 #define evLoadSubtitle 38
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 #define evDropSubtitle 43
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 #define evPlayDVD 39
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 #define evPlayVCD 40
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 #define evPlayNetwork 41
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 #define evLoadAudioFile 42
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 #define evSetAspect 44
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 #define evSetAudio 45
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 #define evSetVideo 46
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 #define evSetSubtitle 47
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 // 48 ...
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 #define evExit 1000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 // --- General events ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 #define evFileLoaded 5000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 #define evHideMouseCursor 5001
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 #define evMessageBox 5002
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 #define evGeneralTimer 5003
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 #define evGtkIsOk 5004
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 #define evShowPopUpMenu 5005
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 #define evHidePopUpMenu 5006
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 #define evSetDVDAudio 5007
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 #define evSetDVDSubtitle 5008
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 #define evSetDVDTitle 5009
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 #define evSetDVDChapter 5010
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 #define evSubtitleLoaded 5011
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 #define evSetVCDTrack 5012
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 #define evSetURL 5013
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 #define evFName 7000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 #define evMovieTime 7001
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 #define evRedraw 7002
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 #define evHideWindow 7003
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 #define evShowWindow 7004
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 #define evFirstLoad 7005
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 // ----------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 int msg;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 const char * name;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 } evName;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 #define itNULL 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 #define itButton 101 // button
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 #define itHPotmeter 102 // horizontal potmeter
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 #define itVPotmeter 103 // vertical potmeter
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 #define itSLabel 104 // static label
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 #define itDLabel 105 // dynamic label
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 #define itBase 106
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 #define itPotmeter 107
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107 #define itFont 108
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 #define btnPressed 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 #define btnReleased 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 #define btnDisabled 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115 int type;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 int x,y;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 int width,height;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 int px,py,psx,psy;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 int msg,msg2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 int pressed,tmp;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 int key,key2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 int phases;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126 float value;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127 txSample Bitmap;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 txSample Mask;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130 int fontid;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 int align;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132 char * label;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134 int event;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 int R,G,B;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 } wItem;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 wItem main;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 wsTWindow mainWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 int mainDecoration;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 wItem sub;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 wsTWindow subWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 wItem bar;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 wsTWindow barWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150 int barIsPresent;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 wItem menuBase;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 wItem menuSelected;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154 wsTWindow menuWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 int menuIsPresent;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 int NumberOfItems;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 wItem Items[256];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 int NumberOfMenuItems;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162 wItem MenuItems[64];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 int NumberOfBarItems;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 wItem barItems[256];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 } listItems;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
168 extern listItems appMPlayer;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 extern char * skinDirInHome;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 extern char * skinDirInHome_obsolete;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 extern char * skinMPlayerDir;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 extern char * skinMPlayerDir_obsolete;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174 extern char * skinName;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176 extern void appInitStruct( listItems * item );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 extern void appClearItem( wItem * item );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 extern void appCopy( listItems * item1,listItems * item2 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 extern int appFindMessage( unsigned char * str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 extern int appFindKey( unsigned char * name );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182 extern void btnModify( int event,float state );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 extern float btnGetValue( int event );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
184 extern void btnSet( int event,int set );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
186 #endif /* MPLAYER_GUI_APP_H */