annotate Gui/app.c @ 15152:4e9072d08d91

Sync with 1.934 1.934: remove x264 option "cabacidc", because the default is always best. 1.933: misc corrections and clarifications in x264 options.
author gpoirier
date Wed, 13 Apr 2005 19:42:43 +0000
parents 9635dcba8f29
children 0e1471d9da74
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8043
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
1
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3 #include <stdlib.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4 #include <stdio.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
5 #include <string.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
6
3586
a0009a534428 itt a skin nem van hibauzenet igy.
pontscho
parents: 1866
diff changeset
7 #include "../config.h"
a0009a534428 itt a skin nem van hibauzenet igy.
pontscho
parents: 1866
diff changeset
8 #include "../mp_msg.h"
a0009a534428 itt a skin nem van hibauzenet igy.
pontscho
parents: 1866
diff changeset
9 #include "../help_mp.h"
a0009a534428 itt a skin nem van hibauzenet igy.
pontscho
parents: 1866
diff changeset
10
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
11 #include "app.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
12 #include "wm/wskeys.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
13 #include "skin/skin.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
14 #include "mplayer/mplayer.h"
4979
27980a844961 PlayToPause bug with mouse fixed
pontscho
parents: 4818
diff changeset
15 #include "interface.h"
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
16
8043
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
17 evName evNames[] =
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
18 {
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
19 { evNone, "evNone" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
20 { evPlay, "evPlay" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
21 { evStop, "evStop" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
22 { evPause, "evPause" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
23 { evPrev, "evPrev" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
24 { evNext, "evNext" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
25 { evLoad, "evLoad" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
26 { evEqualizer, "evEqualizer" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
27 { evEqualizer, "evEqualeaser" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
28 { evPlayList, "evPlaylist" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
29 { evExit, "evExit" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
30 { evIconify, "evIconify" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
31 { evIncBalance, "evIncBalance" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
32 { evDecBalance, "evDecBalance" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
33 { evFullScreen, "evFullScreen" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
34 { evFName, "evFName" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
35 { evMovieTime, "evMovieTime" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
36 { evAbout, "evAbout" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
37 { evLoadPlay, "evLoadPlay" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
38 { evPreferences, "evPreferences" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
39 { evSkinBrowser, "evSkinBrowser" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
40 { evBackward10sec, "evBackward10sec" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
41 { evForward10sec, "evForward10sec" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
42 { evBackward1min, "evBackward1min" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
43 { evForward1min, "evForward1min" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
44 { evBackward10min, "evBackward10min" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
45 { evForward10min, "evForward10min" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
46 { evIncVolume, "evIncVolume" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
47 { evDecVolume, "evDecVolume" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
48 { evMute, "evMute" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
49 { evIncAudioBufDelay, "evIncAudioBufDelay" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
50 { evDecAudioBufDelay, "evDecAudioBufDelay" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
51 { evPlaySwitchToPause, "evPlaySwitchToPause" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
52 { evPauseSwitchToPlay, "evPauseSwitchToPlay" },
14589
9635dcba8f29 Add half size entry to the GMPlayer menu.
diego
parents: 9625
diff changeset
53 { evNormalSize, "evHalfSize" },
8043
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
54 { evNormalSize, "evNormalSize" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
55 { evDoubleSize, "evDoubleSize" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
56 { evSetMoviePosition, "evSetMoviePosition" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
57 { evSetVolume, "evSetVolume" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
58 { evSetBalance, "evSetBalance" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
59 { evHelp, "evHelp" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
60 { evLoadSubtitle, "evLoadSubtitle" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
61 { evPlayDVD, "evPlayDVD" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
62 { evPlayVCD, "evPlayVCD" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
63 { evSetURL, "evSetURL" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
64 { evLoadAudioFile, "evLoadAudioFile" },
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
65 { evDropSubtitle, "evDropSubtitle" },
9040
2a0619fd84f0 - add new entry's to hungarian skin howto (please Gabu translate)
pontscho
parents: 8973
diff changeset
66 { evSetAspect, "evSetAspect" }
8043
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
67 };
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
68
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
69 int evBoxs = sizeof( evNames ) / sizeof( evName );
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
70
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
71 // ---
e5dda05f9aab cleanup
pontscho
parents: 7092
diff changeset
72
7092
8e9607c5897e - warning fixes from Dominik Mierzejewski <dominik@rangers.eu.org>
pontscho
parents: 6218
diff changeset
73 extern char *get_path(char *);
8e9607c5897e - warning fixes from Dominik Mierzejewski <dominik@rangers.eu.org>
pontscho
parents: 6218
diff changeset
74
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
75 listItems appMPlayer;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
76
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
77 char * skinDirInHome=NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
78 char * skinMPlayerDir=NULL;
1866
32b1bb50a0e8 some bug fix, and add decoration item to skin conffile. faszom(C)
pontscho
parents: 1823
diff changeset
79 char * skinName = NULL;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 void appClearItem( wItem * item )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
83 item->type=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
84 // ---
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
85 item->x=0; item->y=0; item->width=0; item->height=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
86 // ---
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
87 item->px=0; item->py=0; item->psx=0; item->psy=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
88 // ---
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
89 item->msg=0; item->msg2=0;
4979
27980a844961 PlayToPause bug with mouse fixed
pontscho
parents: 4818
diff changeset
90 item->pressed=btnReleased;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
91 item->tmp=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
92 item->key=0; item->key2=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
93 item->Bitmap.Width=0; item->Bitmap.Height=0; item->Bitmap.BPP=0; item->Bitmap.ImageSize=0;
4979
27980a844961 PlayToPause bug with mouse fixed
pontscho
parents: 4818
diff changeset
94 if ( item->Bitmap.Image ) free( item->Bitmap.Image );
27980a844961 PlayToPause bug with mouse fixed
pontscho
parents: 4818
diff changeset
95 item->Bitmap.Image=NULL;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
96 // ---
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
97 item->fontid=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
98 if ( item->label ) free( item->label ); item->label=NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
99 item->event=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
100 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
101
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
102 void appCopy( listItems * dest,listItems * source )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
103 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
104 dest->NumberOfItems=source->NumberOfItems;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
105 memcpy( &dest->Items,&source->Items,128 * sizeof( wItem ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
106
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
107 dest->NumberOfMenuItems=source->NumberOfMenuItems;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
108 memcpy( &dest->MenuItems,&source->MenuItems,32 * sizeof( wItem ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
109
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
110 memcpy( &dest->main,&source->main,sizeof( wItem ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
111 memcpy( &dest->sub,&source->sub,sizeof( wItem ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
112 memcpy( &dest->menuBase,&source->menuBase,sizeof( wItem ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
113 memcpy( &dest->menuSelected,&source->menuSelected,sizeof( wItem ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
114 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
115
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
116 void appInitStruct( listItems * item )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
117 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
118 int i;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
119 for ( i=0;i<item->NumberOfItems;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
120 appClearItem( &item->Items[i] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
121 for ( i=0;i<item->NumberOfMenuItems;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
122 appClearItem( &item->MenuItems[i] );
9625
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9202
diff changeset
123 for ( i=0;i<item->NumberOfBarItems;i++ )
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9202
diff changeset
124 appClearItem( &item->barItems[i] );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
125
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
126 item->NumberOfItems=-1;
9625
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9202
diff changeset
127 memset( item->Items,0,256 * sizeof( wItem ) );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
128 item->NumberOfMenuItems=-1;
9625
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9202
diff changeset
129 memset( item->MenuItems,0,64 * sizeof( wItem ) );
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9202
diff changeset
130 item->NumberOfBarItems=-1;
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9202
diff changeset
131 memset( item->barItems,0,256 * sizeof( wItem ) );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
132
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
133 appClearItem( &item->main );
1866
32b1bb50a0e8 some bug fix, and add decoration item to skin conffile. faszom(C)
pontscho
parents: 1823
diff changeset
134 item->mainDecoration=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
135 appClearItem( &item->sub );
9625
bc24dd70c6e2 many 10l for me ...
pontscho
parents: 9202
diff changeset
136 item->sub.width=0; item->sub.height=0;
1823
a6c67352ccac fix some bug.
pontscho
parents: 1729
diff changeset
137 item->sub.x=-1; item->sub.y=-1;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
138 appClearItem( &item->menuBase );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
139 appClearItem( &item->menuSelected );
8973
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
140 item->sub.R=item->sub.G=item->sub.B=0;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
141 item->bar.R=item->bar.G=item->bar.B=0;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
142 item->main.R=item->main.G=item->main.B=0;
8949
d07ab8e088a9 correct skin changing
pontscho
parents: 8312
diff changeset
143 item->barIsPresent=0;
d07ab8e088a9 correct skin changing
pontscho
parents: 8312
diff changeset
144 item->menuIsPresent=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
145 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
146
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
147 int appFindKey( unsigned char * name )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
148 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
149 int i;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
150 for ( i=0;i<wsKeyNumber;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
151 if ( !strcmp( wsKeyNames[i].name,name ) ) return wsKeyNames[i].code;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
152 return -1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
153 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
154
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
155 int appFindMessage( unsigned char * str )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
156 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
157 int i;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
158 for ( i=0;i<evBoxs;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
159 if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
160 return -1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
161 }
8280
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
162
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
163 void btnModify( int event,float state )
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
164 {
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
165 int j;
8973
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
166 for ( j=0;j < appMPlayer.NumberOfItems + 1;j++ )
8280
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
167 if ( appMPlayer.Items[j].msg == event )
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
168 {
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
169 switch ( appMPlayer.Items[j].type )
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
170 {
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
171 case itButton:
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
172 appMPlayer.Items[j].pressed=(int)state;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
173 appMPlayer.Items[j].tmp=(int)state;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
174 break;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
175 case itPotmeter:
8973
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
176 case itVPotmeter:
8280
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
177 case itHPotmeter:
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
178 if ( state < 0.0f ) state=0.0f;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
179 if ( state > 100.f ) state=100.0f;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
180 appMPlayer.Items[j].value=state;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
181 break;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
182 }
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
183 }
8973
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
184
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
185 for ( j=0;j < appMPlayer.NumberOfBarItems + 1;j++ )
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
186 if ( appMPlayer.barItems[j].msg == event )
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
187 {
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
188 switch ( appMPlayer.barItems[j].type )
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
189 {
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
190 case itButton:
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
191 appMPlayer.barItems[j].pressed=(int)state;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
192 appMPlayer.barItems[j].tmp=(int)state;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
193 break;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
194 case itPotmeter:
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
195 case itVPotmeter:
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
196 case itHPotmeter:
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
197 if ( state < 0.0f ) state=0.0f;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
198 if ( state > 100.f ) state=100.0f;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
199 appMPlayer.barItems[j].value=state;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
200 break;
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
201 }
0a665389cf2b - add playbar
pontscho
parents: 8949
diff changeset
202 }
8280
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
203 }
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
204
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
205 float btnGetValue( int event )
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
206 {
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
207 int j;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
208 for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
209 if ( appMPlayer.Items[j].msg == event ) return appMPlayer.Items[j].value;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
210 return 0;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
211 }
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
212
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
213 void btnSet( int event,int set )
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
214 {
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
215 int j;
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
216 for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
9202
c2f31ca14a92 - rewrite Jan Spitalnik's patch
pontscho
parents: 9040
diff changeset
217 if ( appMPlayer.Items[j].msg == event )
c2f31ca14a92 - rewrite Jan Spitalnik's patch
pontscho
parents: 9040
diff changeset
218 { appMPlayer.Items[j].pressed=set; appMPlayer.barItems[j].tmp=0; }
c2f31ca14a92 - rewrite Jan Spitalnik's patch
pontscho
parents: 9040
diff changeset
219 for ( j=0;j<appMPlayer.NumberOfBarItems + 1;j++ )
c2f31ca14a92 - rewrite Jan Spitalnik's patch
pontscho
parents: 9040
diff changeset
220 if ( appMPlayer.barItems[j].msg == event )
c2f31ca14a92 - rewrite Jan Spitalnik's patch
pontscho
parents: 9040
diff changeset
221 { appMPlayer.barItems[j].pressed=set; appMPlayer.barItems[j].tmp=0; }
8280
72700fefd3dc no seeking if stream is STREAMTYPE_STREAM (net/stdin)
pontscho
parents: 8043
diff changeset
222 }