VLCVideoView.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*****************************************************************************
  2. * VLCVideoView.h: VLC.framework VLCVideoView header
  3. *****************************************************************************
  4. * Copyright (C) 2007 Pierre d'Herbemont
  5. * Copyright (C) 2007 the VideoLAN team
  6. * $Id$
  7. *
  8. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  23. *****************************************************************************/
  24. #import <Cocoa/Cocoa.h>
  25. #import <VLC/VLCTime.h>
  26. #import <VLC/VLCPlaylist.h>
  27. @protocol VLCVideoViewDelegate;
  28. /* Notification */
  29. extern NSString * VLCVideoDidChangeVolume;
  30. extern NSString * VLCVideoDidChangeTime;
  31. extern NSString * VLCVideoDidChangeCurrentlyPlayingItem;
  32. extern NSString * VLCVideoDidStop;
  33. extern NSString * VLCVideoDidPause;
  34. extern NSString * VLCVideoDidPlay;
  35. @interface VLCVideoView : NSView
  36. {
  37. VLCPlaylist * playlist;
  38. NSConnection * connection;
  39. id delegate;
  40. BOOL stretchVideo;
  41. void * p_mi;
  42. void * p_mlp;
  43. }
  44. - (id)initWithFrame:(NSRect)frameRect;
  45. - (void)dealloc;
  46. - (void)setPlaylist: (VLCPlaylist *)newPlaylist;
  47. - (VLCPlaylist *)playlist;
  48. /* Play */
  49. - (void)play;
  50. - (void)playItemAtIndex:(int)index;
  51. - (void)playMedia:(VLCMedia *)media;
  52. - (void)pause;
  53. - (void)setCurrentTime:(VLCTime *)timeObj;
  54. /* State */
  55. - (BOOL)isPlaying;
  56. - (BOOL)isPaused;
  57. - (VLCTime *)currentTime;
  58. - (id)currentPlaylistItem;
  59. /* Video output property */
  60. - (void)setStretchesVideo:(BOOL)flag;
  61. - (BOOL)stretchesVideo;
  62. /* Fullscreen */
  63. - (void)enterFullscreen;
  64. - (void)leaveFullscreen;
  65. /* Delegate */
  66. - (void)setDelegate: (id)newDelegate;
  67. - (id)delegate;
  68. @end
  69. @protocol VLCVideoViewDelegate
  70. - (void)videoDidStop:(NSNotification *)notification;
  71. - (void)videoDidPlay:(NSNotification *)notification;
  72. - (void)videoDidPause:(NSNotification *)notification;
  73. - (void)videoDidPlayNextPlaylistElement:(NSNotification *)notification;
  74. - (void)videoDidChangeVolume:(NSNotification *)notification;
  75. /* Returns NO if the Video shouldn't be paused */
  76. - (BOOL)videoWillPause:(NSNotification *)notification;
  77. /* Returns NO if the Video shouldn't play next playlist element */
  78. - (BOOL)videoWillPlayNextPlaylistElement:(NSNotification *)notification;
  79. /* Posted when the progress of the video has reached a new step
  80. * (every second?).
  81. * The -object contained in the notification is the new VLCTime */
  82. - (void)videoDidChangeTime:(NSNotification *)notification;
  83. @end