annotate gui/app.c @ 24424:0c4f1a88eaae

warning fixes: input.c: In function 'mp_input_set_section': input.c:1640: warning: suggest parentheses around assignment used as truth value input.c:1643: warning: suggest parentheses around assignment used as truth value mga_common.c: In function 'mga_init': mga_common.c:394: warning: suggest parentheses around assignment used as truth value playtreeparser.c: In function 'parse_smil': playtreeparser.c:523: warning: suggest parentheses around assignment used as truth value libmpdemux/demux_ts.c: In function 'ts_parse': libmpdemux/demux_ts.c:2795: warning: suggest parentheses around assignment used as truth value libmpdemux/demux_ts.c: In function 'demux_open_ts': libmpdemux/demux_ts.c:591: warning: 'frame_length' may be used uninitialized in this function
author diego
date Thu, 13 Sep 2007 13:16:30 +0000
parents 358aa103e796
children 2dee54f0d8a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
3 #include <stdlib.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
4 #include <stdio.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
5 #include <string.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
7 #include "config.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
8 #include "mp_msg.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
9 #include "help_mp.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
10
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
11 #include "app.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
12 #include "wm/wskeys.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
13 #include "skin/skin.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
14 #include "mplayer/gmplayer.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
15 #include "interface.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
17 evName evNames[] =
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
18 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
19 { evNone, "evNone" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
20 { evPlay, "evPlay" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21 { evStop, "evStop" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
22 { evPause, "evPause" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23 { evPrev, "evPrev" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24 { evNext, "evNext" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25 { evLoad, "evLoad" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26 { evEqualizer, "evEqualizer" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 { evEqualizer, "evEqualeaser" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 { evPlayList, "evPlaylist" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 { evExit, "evExit" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 { evIconify, "evIconify" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 { evIncBalance, "evIncBalance" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 { evDecBalance, "evDecBalance" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33 { evFullScreen, "evFullScreen" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 { evFName, "evFName" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 { evMovieTime, "evMovieTime" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 { evAbout, "evAbout" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 { evLoadPlay, "evLoadPlay" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 { evPreferences, "evPreferences" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 { evSkinBrowser, "evSkinBrowser" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 { evBackward10sec, "evBackward10sec" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 { evForward10sec, "evForward10sec" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 { evBackward1min, "evBackward1min" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 { evForward1min, "evForward1min" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 { evBackward10min, "evBackward10min" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 { evForward10min, "evForward10min" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 { evIncVolume, "evIncVolume" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 { evDecVolume, "evDecVolume" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 { evMute, "evMute" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 { evIncAudioBufDelay, "evIncAudioBufDelay" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 { evDecAudioBufDelay, "evDecAudioBufDelay" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 { evPlaySwitchToPause, "evPlaySwitchToPause" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 { evPauseSwitchToPlay, "evPauseSwitchToPlay" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 { evNormalSize, "evHalfSize" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 { evNormalSize, "evNormalSize" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 { evDoubleSize, "evDoubleSize" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 { evSetMoviePosition, "evSetMoviePosition" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 { evSetVolume, "evSetVolume" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 { evSetBalance, "evSetBalance" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 { evHelp, "evHelp" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 { evLoadSubtitle, "evLoadSubtitle" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 { evPlayDVD, "evPlayDVD" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 { evPlayVCD, "evPlayVCD" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 { evSetURL, "evSetURL" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 { evLoadAudioFile, "evLoadAudioFile" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 { evDropSubtitle, "evDropSubtitle" },
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 { evSetAspect, "evSetAspect" }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 int evBoxs = sizeof( evNames ) / sizeof( evName );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 listItems appMPlayer;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 /* FIXME: Eventually remove the obsolete directory names. */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 char * skinDirInHome=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 char * skinDirInHome_obsolete=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 char * skinMPlayerDir=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 char * skinMPlayerDir_obsolete=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 char * skinName = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 void appClearItem( wItem * item )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 item->type=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 item->x=0; item->y=0; item->width=0; item->height=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 item->px=0; item->py=0; item->psx=0; item->psy=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 item->msg=0; item->msg2=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 item->pressed=btnReleased;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 item->tmp=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 item->key=0; item->key2=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 item->Bitmap.Width=0; item->Bitmap.Height=0; item->Bitmap.BPP=0; item->Bitmap.ImageSize=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 if ( item->Bitmap.Image ) free( item->Bitmap.Image );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 item->Bitmap.Image=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 item->fontid=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 if ( item->label ) free( item->label ); item->label=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 item->event=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 void appCopy( listItems * dest,listItems * source )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 dest->NumberOfItems=source->NumberOfItems;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 memcpy( &dest->Items,&source->Items,128 * sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 dest->NumberOfMenuItems=source->NumberOfMenuItems;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 memcpy( &dest->MenuItems,&source->MenuItems,32 * sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 memcpy( &dest->main,&source->main,sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 memcpy( &dest->sub,&source->sub,sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113 memcpy( &dest->menuBase,&source->menuBase,sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 memcpy( &dest->menuSelected,&source->menuSelected,sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 void appInitStruct( listItems * item )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 int i;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 for ( i=0;i<item->NumberOfItems;i++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 appClearItem( &item->Items[i] );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 for ( i=0;i<item->NumberOfMenuItems;i++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 appClearItem( &item->MenuItems[i] );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 for ( i=0;i<item->NumberOfBarItems;i++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 appClearItem( &item->barItems[i] );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127 item->NumberOfItems=-1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 memset( item->Items,0,256 * sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 item->NumberOfMenuItems=-1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130 memset( item->MenuItems,0,64 * sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 item->NumberOfBarItems=-1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132 memset( item->barItems,0,256 * sizeof( wItem ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134 appClearItem( &item->main );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 item->mainDecoration=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 appClearItem( &item->sub );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 item->sub.width=0; item->sub.height=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138 item->sub.x=-1; item->sub.y=-1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139 appClearItem( &item->menuBase );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 appClearItem( &item->menuSelected );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 item->sub.R=item->sub.G=item->sub.B=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 item->bar.R=item->bar.G=item->bar.B=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 item->main.R=item->main.G=item->main.B=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144 item->barIsPresent=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 item->menuIsPresent=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 int appFindKey( unsigned char * name )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150 int i;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 for ( i=0;i<wsKeyNumber;i++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 if ( !strcmp( wsKeyNames[i].name,name ) ) return wsKeyNames[i].code;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 return -1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156 int appFindMessage( unsigned char * str )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 int i;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 for ( i=0;i<evBoxs;i++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 return -1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 void btnModify( int event,float state )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 int j;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167 for ( j=0;j < appMPlayer.NumberOfItems + 1;j++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
168 if ( appMPlayer.Items[j].msg == event )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 switch ( appMPlayer.Items[j].type )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 case itButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 appMPlayer.Items[j].pressed=(int)state;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174 appMPlayer.Items[j].tmp=(int)state;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176 case itPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 case itVPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 case itHPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 if ( state < 0.0f ) state=0.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 if ( state > 100.f ) state=100.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181 appMPlayer.Items[j].value=state;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
184 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186 for ( j=0;j < appMPlayer.NumberOfBarItems + 1;j++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 if ( appMPlayer.barItems[j].msg == event )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189 switch ( appMPlayer.barItems[j].type )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191 case itButton:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
192 appMPlayer.barItems[j].pressed=(int)state;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
193 appMPlayer.barItems[j].tmp=(int)state;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
194 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
195 case itPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196 case itVPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197 case itHPotmeter:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198 if ( state < 0.0f ) state=0.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 if ( state > 100.f ) state=100.0f;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200 appMPlayer.barItems[j].value=state;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
202 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
206 float btnGetValue( int event )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 int j;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209 for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 if ( appMPlayer.Items[j].msg == event ) return appMPlayer.Items[j].value;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 return 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
213
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
214 void btnSet( int event,int set )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
215 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
216 int j;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
217 for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
218 if ( appMPlayer.Items[j].msg == event )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
219 { appMPlayer.Items[j].pressed=set; appMPlayer.barItems[j].tmp=0; }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
220 for ( j=0;j<appMPlayer.NumberOfBarItems + 1;j++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
221 if ( appMPlayer.barItems[j].msg == event )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
222 { appMPlayer.barItems[j].pressed=set; appMPlayer.barItems[j].tmp=0; }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
223 }