Commit a7eb9fc8 authored by Christophe Massiot's avatar Christophe Massiot

* Added a Close Window and a close box to our QuickTime video output.

parent e1562106
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>29</key> <key>29</key>
<string>407 753 308 44 0 0 1600 1178 </string> <string>266 466 308 44 0 0 1152 746 </string>
<key>303</key> <key>303</key>
<string>93 566 72 114 0 0 1600 1178 </string> <string>93 566 72 114 0 0 1600 1178 </string>
</dict> </dict>
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
<string>291.0</string> <string>291.0</string>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>29</integer>
<integer>636</integer>
<integer>21</integer> <integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin * intf.h: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: intf.h,v 1.9 2003/01/04 04:11:08 jlj Exp $ * $Id: intf.h,v 1.10 2003/01/05 01:55:07 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -163,6 +163,7 @@ struct intf_sys_t ...@@ -163,6 +163,7 @@ struct intf_sys_t
IBOutlet id o_mu_window; IBOutlet id o_mu_window;
IBOutlet id o_mi_minimize; IBOutlet id o_mi_minimize;
IBOutlet id o_mi_close_window;
IBOutlet id o_mi_bring_atf; IBOutlet id o_mi_bring_atf;
/* dock menu */ /* dock menu */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: intf.m,v 1.17 2003/01/04 04:11:08 jlj Exp $ * $Id: intf.m,v 1.18 2003/01/05 01:55:07 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -249,7 +249,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -249,7 +249,8 @@ static void Run( intf_thread_t *p_intf )
[o_mi_subtitle setTitle: _NS("Subtitles")]; [o_mi_subtitle setTitle: _NS("Subtitles")];
[o_mu_window setTitle: _NS("Window")]; [o_mu_window setTitle: _NS("Window")];
[o_mi_minimize setTitle: _NS("Minimize")]; [o_mi_minimize setTitle: _NS("Minimize Window")];
[o_mi_close_window setTitle: _NS("Close Window")];
[o_mi_bring_atf setTitle: _NS("Bring All to Front")]; [o_mi_bring_atf setTitle: _NS("Bring All to Front")];
/* dock menu */ /* dock menu */
...@@ -304,8 +305,17 @@ static void Run( intf_thread_t *p_intf ) ...@@ -304,8 +305,17 @@ static void Run( intf_thread_t *p_intf )
} }
else if( p_intf->p_sys->p_input->b_dead ) else if( p_intf->p_sys->p_input->b_dead )
{ {
vout_thread_t * p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
vlc_object_release( p_intf->p_sys->p_input ); vlc_object_release( p_intf->p_sys->p_input );
p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_input = NULL;
if ( p_vout != NULL )
{
vlc_object_detach( p_vout );
vlc_object_release( p_vout );
vout_Destroy( p_vout );
}
} }
if( p_intf->p_sys->p_input != NULL ) if( p_intf->p_sys->p_input != NULL )
...@@ -461,6 +471,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -461,6 +471,12 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_input = NULL;
} }
if( o_prefs != nil )
{
[o_prefs release];
o_prefs = nil;
}
/* /*
* Free playlists * Free playlists
*/ */
...@@ -542,6 +558,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -542,6 +558,7 @@ static void Run( intf_thread_t *p_intf )
[o_mi_channels setEnabled: FALSE]; [o_mi_channels setEnabled: FALSE];
[o_mi_device setEnabled: FALSE]; [o_mi_device setEnabled: FALSE];
[o_mi_screen setEnabled: FALSE]; [o_mi_screen setEnabled: FALSE];
[o_mi_close_window setEnabled: FALSE];
} }
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
...@@ -801,6 +818,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -801,6 +818,8 @@ static void Run( intf_thread_t *p_intf )
var: "video-device" selector: @selector(toggleVar:)]; var: "video-device" selector: @selector(toggleVar:)];
vlc_object_release( (vlc_object_t *)p_vout ); vlc_object_release( (vlc_object_t *)p_vout );
[o_mi_close_window setEnabled: TRUE];
} }
p_intf->p_sys->b_vout_update = 0; p_intf->p_sys->b_vout_update = 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout.h: MacOS X interface plugin * vout.h: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: vout.h,v 1.3 2002/12/24 23:00:51 massiot Exp $ * $Id: vout.h,v 1.4 2003/01/05 01:55:07 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org> * Florian G. Pflug <fgp@phlo.org>
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
- (void)toggleFullscreen; - (void)toggleFullscreen;
- (BOOL)isFullscreen; - (BOOL)isFullscreen;
- (BOOL)windowShouldClose:(id)sender;
@end @end
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout.m: MacOS X video output plugin * vout.m: MacOS X video output plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: vout.m,v 1.9 2002/12/25 02:23:36 massiot Exp $ * $Id: vout.m,v 1.10 2003/01/05 01:55:07 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org> * Florian G. Pflug <fgp@phlo.org>
...@@ -317,6 +317,9 @@ void E_(CloseVideo) ( vlc_object_t *p_this ) ...@@ -317,6 +317,9 @@ void E_(CloseVideo) ( vlc_object_t *p_this )
msg_Err( p_vout, "unable to destroy window" ); msg_Err( p_vout, "unable to destroy window" );
} }
if ( p_vout->p_sys->p_fullscreen_state != NULL )
EndFullScreen ( p_vout->p_sys->p_fullscreen_state, NULL );
ExitMovies(); ExitMovies();
free( p_vout->p_sys->p_matrix ); free( p_vout->p_sys->p_matrix );
...@@ -858,6 +861,24 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -858,6 +861,24 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
} }
} }
/* This is actually the same as VLCControls::stop. */
- (BOOL)windowShouldClose:(id)sender
{
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return NO;
}
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
/* The window will be closed by the intf later. */
return NO;
}
@end @end
/***************************************************************************** /*****************************************************************************
...@@ -1016,6 +1037,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -1016,6 +1037,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
{ {
unsigned int i_stylemask = NSTitledWindowMask | unsigned int i_stylemask = NSTitledWindowMask |
NSMiniaturizableWindowMask | NSMiniaturizableWindowMask |
NSClosableWindowMask |
NSResizableWindowMask; NSResizableWindowMask;
[p_vout->p_sys->o_window [p_vout->p_sys->o_window
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment