Commit a2cc5e1a authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* added half, normal and full size videowindow menuitems.

  there seems to be a bug though somewhere. you end up with black bars in
  half and double size.
parent f8f366cc
...@@ -5,11 +5,14 @@ ...@@ -5,11 +5,14 @@
{ {
ACTIONS = { ACTIONS = {
deinterlace = id; deinterlace = id;
doubleWindow = id;
faster = id; faster = id;
fullscreen = id; fullscreen = id;
halfWindow = id;
loop = id; loop = id;
mute = id; mute = id;
next = id; next = id;
normalWindow = id;
pause = id; pause = id;
play = id; play = id;
prev = id; prev = id;
...@@ -77,8 +80,10 @@ ...@@ -77,8 +80,10 @@
"o_mi_cut" = id; "o_mi_cut" = id;
"o_mi_deinterlace" = id; "o_mi_deinterlace" = id;
"o_mi_device" = id; "o_mi_device" = id;
"o_mi_double_window" = id;
"o_mi_faster" = id; "o_mi_faster" = id;
"o_mi_fullscreen" = id; "o_mi_fullscreen" = id;
"o_mi_half_window" = id;
"o_mi_hide" = id; "o_mi_hide" = id;
"o_mi_hide_others" = id; "o_mi_hide_others" = id;
"o_mi_language" = id; "o_mi_language" = id;
...@@ -88,6 +93,7 @@ ...@@ -88,6 +93,7 @@
"o_mi_minimize" = id; "o_mi_minimize" = id;
"o_mi_mute" = id; "o_mi_mute" = id;
"o_mi_next" = id; "o_mi_next" = id;
"o_mi_normal_window" = id;
"o_mi_open_disc" = id; "o_mi_open_disc" = id;
"o_mi_open_file" = id; "o_mi_open_file" = id;
"o_mi_open_generic" = id; "o_mi_open_generic" = id;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>913 -102 365 441 0 0 1280 1002 </string> <string>590 112 365 441 0 0 1280 1002 </string>
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>29</key> <key>29</key>
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
</array> </array>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>21</integer>
<integer>29</integer> <integer>29</integer>
<integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>6G30</string> <string>6G30</string>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin * controls.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: controls.m,v 1.19 2003/01/31 02:53:52 jlj Exp $ * $Id: controls.m,v 1.20 2003/02/07 20:23:17 hartman 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>
...@@ -59,6 +59,9 @@ ...@@ -59,6 +59,9 @@
- (IBAction)volumeSliderUpdated:(id)sender; - (IBAction)volumeSliderUpdated:(id)sender;
- (void)updateVolumeSlider; - (void)updateVolumeSlider;
- (IBAction)halfWindow:(id)sender;
- (IBAction)normalWindow:(id)sender;
- (IBAction)doubleWindow:(id)sender;
- (IBAction)fullscreen:(id)sender; - (IBAction)fullscreen:(id)sender;
- (IBAction)deinterlace:(id)sender; - (IBAction)deinterlace:(id)sender;
...@@ -367,6 +370,52 @@ ...@@ -367,6 +370,52 @@
} }
} }
- (IBAction)halfWindow:(id)sender
{
id o_window = [NSApp keyWindow];
NSArray *o_windows = [NSApp windows];
NSEnumerator *o_enumerator = [o_windows objectEnumerator];
while ((o_window = [o_enumerator nextObject]))
{
if( [[o_window className] isEqualToString: @"VLCWindow"] )
{
[o_window halfWindow];
}
}
}
- (IBAction)normalWindow:(id)sender
{
id o_window = [NSApp keyWindow];
NSArray *o_windows = [NSApp windows];
NSEnumerator *o_enumerator = [o_windows objectEnumerator];
while ((o_window = [o_enumerator nextObject]))
{
if( [[o_window className] isEqualToString: @"VLCWindow"] )
{
[o_window normalWindow];
}
}
}
- (IBAction)doubleWindow:(id)sender
{
id o_window = [NSApp keyWindow];
NSArray *o_windows = [NSApp windows];
NSEnumerator *o_enumerator = [o_windows objectEnumerator];
while ((o_window = [o_enumerator nextObject]))
{
if( [[o_window className] isEqualToString: @"VLCWindow"] )
{
[o_window doubleWindow];
}
}
}
- (IBAction)fullscreen:(id)sender - (IBAction)fullscreen:(id)sender
{ {
id o_window = [NSApp keyWindow]; id o_window = [NSApp keyWindow];
...@@ -700,7 +749,10 @@ ...@@ -700,7 +749,10 @@
[o_mi setState: p_intf->p_sys->b_mute ? NSOnState : NSOffState]; [o_mi setState: p_intf->p_sys->b_mute ? NSOnState : NSOffState];
} }
else if( [[o_mi title] isEqualToString: _NS("Fullscreen")] ) else if( [[o_mi title] isEqualToString: _NS("Fullscreen")] ||
[[o_mi title] isEqualToString: _NS("Half Size")] ||
[[o_mi title] isEqualToString: _NS("Normal Size")] ||
[[o_mi title] isEqualToString: _NS("Double Size")])
{ {
id o_window; id o_window;
NSArray *o_windows = [NSApp windows]; NSArray *o_windows = [NSApp windows];
......
...@@ -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.22 2003/02/05 16:23:06 hartman Exp $ * $Id: intf.h,v 1.23 2003/02/07 20:23:17 hartman 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>
...@@ -172,6 +172,9 @@ struct intf_sys_t ...@@ -172,6 +172,9 @@ struct intf_sys_t
IBOutlet id o_mi_device; IBOutlet id o_mi_device;
IBOutlet id o_mu_video; IBOutlet id o_mu_video;
IBOutlet id o_mi_half_window;
IBOutlet id o_mi_normal_window;
IBOutlet id o_mi_double_window;
IBOutlet id o_mi_fullscreen; IBOutlet id o_mi_fullscreen;
IBOutlet id o_mi_screen; IBOutlet id o_mi_screen;
IBOutlet id o_mi_deinterlace; IBOutlet id o_mi_deinterlace;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.47 2003/02/06 23:55:28 massiot Exp $ * $Id: intf.m,v 1.48 2003/02/07 20:23:17 hartman 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>
...@@ -309,6 +309,9 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg ) ...@@ -309,6 +309,9 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
[o_mi_device setTitle: _NS("Device")]; [o_mi_device setTitle: _NS("Device")];
[o_mu_video setTitle: _NS("Video")]; [o_mu_video setTitle: _NS("Video")];
[o_mi_half_window setTitle: _NS("Half Size")];
[o_mi_normal_window setTitle: _NS("Normal Size")];
[o_mi_double_window setTitle: _NS("Double Size")];
[o_mi_fullscreen setTitle: _NS("Fullscreen")]; [o_mi_fullscreen setTitle: _NS("Fullscreen")];
[o_mi_screen setTitle: _NS("Screen")]; [o_mi_screen setTitle: _NS("Screen")];
[o_mi_deinterlace setTitle: _NS("Deinterlace")]; [o_mi_deinterlace setTitle: _NS("Deinterlace")];
......
...@@ -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.5 2003/01/31 02:53:52 jlj Exp $ * $Id: vout.h,v 1.6 2003/02/07 20:23:17 hartman 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>
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define WINDOW_TITLE_HEIGHT 21
/***************************************************************************** /*****************************************************************************
* VLCWindow interface * VLCWindow interface
*****************************************************************************/ *****************************************************************************/
...@@ -34,6 +36,9 @@ ...@@ -34,6 +36,9 @@
- (void)setVout:(vout_thread_t *)_p_vout; - (void)setVout:(vout_thread_t *)_p_vout;
- (vout_thread_t *)getVout; - (vout_thread_t *)getVout;
- (void)halfWindow;
- (void)normalWindow;
- (void)doubleWindow;
- (void)toggleFullscreen; - (void)toggleFullscreen;
- (BOOL)isFullscreen; - (BOOL)isFullscreen;
......
...@@ -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-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.23 2003/02/06 13:47:04 hartman Exp $ * $Id: vout.m,v 1.24 2003/02/07 20:23:17 hartman 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>
...@@ -725,6 +725,39 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -725,6 +725,39 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
return( p_vout ); return( p_vout );
} }
- (void)halfWindow
{
NSSize newsize;
newsize.width = (int) p_vout->render.i_width / 2 ;
newsize.height = ((int) p_vout->render.i_height / 2 ) + WINDOW_TITLE_HEIGHT ;
[self setContentSize: newsize];
//[[self contentView] setFrameSize: newsize];
p_vout->i_changes |= VOUT_SIZE_CHANGE;
}
- (void)normalWindow
{
NSSize newsize;
newsize.width = p_vout->render.i_width ;
newsize.height = p_vout->render.i_height + WINDOW_TITLE_HEIGHT ;
[self setContentSize: newsize];
//[[self contentView] setFrameSize: newsize];
p_vout->i_changes |= VOUT_SIZE_CHANGE;
}
- (void)doubleWindow
{
NSSize newsize;
newsize.width = p_vout->render.i_width * 2 ;
newsize.height = (p_vout->render.i_height * 2 ) + WINDOW_TITLE_HEIGHT;
[self setContentSize: newsize];
//[[self contentView] setFrameSize: newsize];
p_vout->i_changes |= VOUT_SIZE_CHANGE;
}
- (void)toggleFullscreen - (void)toggleFullscreen
{ {
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
......
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