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