Mercurial > mplayer.hg
comparison gui/win32/interface.c @ 33614:79743a5cf4f0
Rename the symbolic playback state constants.
They should not be confused with the guiGetEvent types.
Upper case charcaters shall reflect that they are (integer) constants.
Additionally, adjust their casts.
author | ib |
---|---|
date | Wed, 22 Jun 2011 12:12:50 +0000 |
parents | 6aa251adfba0 |
children | 1f9a31d4f114 |
comparison
equal
deleted
inserted
replaced
33613:5660f163ea79 | 33614:79743a5cf4f0 |
---|---|
216 mp_input_queue_cmd(mp_input_parse_cmd("quit")); | 216 mp_input_queue_cmd(mp_input_parse_cmd("quit")); |
217 break; | 217 break; |
218 } | 218 } |
219 case evStop: | 219 case evStop: |
220 if(guiInfo.Playing) | 220 if(guiInfo.Playing) |
221 guiGetEvent(guiSetState, (void *) guiSetStop); | 221 guiGetEvent(guiSetState, (void *) GUI_STOP); |
222 break; | 222 break; |
223 case evSetMoviePosition: | 223 case evSetMoviePosition: |
224 { | 224 { |
225 rel_seek_secs = guiInfo.Position / 100.0f; | 225 rel_seek_secs = guiInfo.Position / 100.0f; |
226 abs_seek_pos = 3; | 226 abs_seek_pos = 3; |
286 { | 286 { |
287 guiInfo.Title = guiInfo.DVD.current_title; | 287 guiInfo.Title = guiInfo.DVD.current_title; |
288 guiInfo.Chapter = guiInfo.DVD.current_chapter; | 288 guiInfo.Chapter = guiInfo.DVD.current_chapter; |
289 guiInfo.Angle = guiInfo.DVD.current_angle; | 289 guiInfo.Angle = guiInfo.DVD.current_angle; |
290 guiInfo.DiskChanged = 1; | 290 guiInfo.DiskChanged = 1; |
291 guiGetEvent(guiSetState, (void *) guiSetPlay); | 291 guiGetEvent(guiSetState, (void *) GUI_PLAY); |
292 break; | 292 break; |
293 } | 293 } |
294 #endif | 294 #endif |
295 default: | 295 default: |
296 { | 296 { |
297 guiInfo.FilenameChanged = guiInfo.NewPlay = 1; | 297 guiInfo.FilenameChanged = guiInfo.NewPlay = 1; |
298 update_playlistwindow(); | 298 update_playlistwindow(); |
299 uiGotoTheNext = guiInfo.Playing? 0 : 1; | 299 uiGotoTheNext = guiInfo.Playing? 0 : 1; |
300 guiGetEvent(guiSetState, (void *) guiSetStop); | 300 guiGetEvent(guiSetState, (void *) GUI_STOP); |
301 guiGetEvent(guiSetState, (void *) guiSetPlay); | 301 guiGetEvent(guiSetState, (void *) GUI_PLAY); |
302 break; | 302 break; |
303 } | 303 } |
304 } | 304 } |
305 break; | 305 break; |
306 } | 306 } |
322 { | 322 { |
323 uiPause(); | 323 uiPause(); |
324 return; | 324 return; |
325 } | 325 } |
326 guiInfo.NewPlay = 1; | 326 guiInfo.NewPlay = 1; |
327 guiGetEvent(guiSetState, (void *) guiSetPlay); | 327 guiGetEvent(guiSetState, (void *) GUI_PLAY); |
328 } | 328 } |
329 | 329 |
330 void uiPause( void ) | 330 void uiPause( void ) |
331 { | 331 { |
332 if(!guiInfo.Playing) return; | 332 if(!guiInfo.Playing) return; |
426 if(style == WS_VISIBLE | WS_POPUP) | 426 if(style == WS_VISIBLE | WS_POPUP) |
427 { | 427 { |
428 style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; | 428 style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; |
429 SetWindowLong(mygui->subwindow, GWL_STYLE, style); | 429 SetWindowLong(mygui->subwindow, GWL_STYLE, style); |
430 } | 430 } |
431 guiGetEvent(guiSetState, (void *) guiSetStop); | 431 guiGetEvent(guiSetState, (void *) GUI_STOP); |
432 } | 432 } |
433 | 433 |
434 void uiStop(void) | 434 void uiStop(void) |
435 { | 435 { |
436 guiGetEvent(guiSetState, (void *) guiSetStop); | 436 guiGetEvent(guiSetState, (void *) GUI_STOP); |
437 } | 437 } |
438 | 438 |
439 void uiSetFileName(char *dir, char *name, int type) | 439 void uiSetFileName(char *dir, char *name, int type) |
440 { | 440 { |
441 if(!name) return; | 441 if(!name) return; |
663 case guiSetState: | 663 case guiSetState: |
664 { | 664 { |
665 guiInfo.Playing = (int) arg; | 665 guiInfo.Playing = (int) arg; |
666 switch (guiInfo.Playing) | 666 switch (guiInfo.Playing) |
667 { | 667 { |
668 case guiSetPlay: | 668 case GUI_PLAY: |
669 { | 669 { |
670 guiInfo.Playing = 1; | 670 guiInfo.Playing = 1; |
671 break; | 671 break; |
672 } | 672 } |
673 case guiSetStop: | 673 case GUI_STOP: |
674 { | 674 { |
675 guiInfo.Playing = 0; | 675 guiInfo.Playing = 0; |
676 if(movie_aspect >= 0) | 676 if(movie_aspect >= 0) |
677 movie_aspect = -1; | 677 movie_aspect = -1; |
678 update_subwindow(); | 678 update_subwindow(); |
679 break; | 679 break; |
680 } | 680 } |
681 case guiSetPause: | 681 case GUI_PAUSE: |
682 guiInfo.Playing = 2; | 682 guiInfo.Playing = 2; |
683 break; | 683 break; |
684 } | 684 } |
685 break; | 685 break; |
686 } | 686 } |