]> git.sesse.net Git - vlc/commitdiff
* added half, normal and full size videowindow menuitems.
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 7 Feb 2003 20:23:17 +0000 (20:23 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 7 Feb 2003 20:23:17 +0000 (20:23 +0000)
  there seems to be a bug though somewhere. you end up with black bars in
  half and double size.

extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
modules/gui/macosx/controls.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/vout.h
modules/gui/macosx/vout.m

index 3963a31b712c7e7654ead563a6c9d84eb591bf28..c82772e4a804ebce3221e580ce1daa429a248060 100644 (file)
@@ -5,11 +5,14 @@
         {
             ACTIONS = {
                 deinterlace = id; 
+                doubleWindow = id; 
                 faster = id; 
                 fullscreen = id; 
+                halfWindow = id; 
                 loop = id; 
                 mute = id; 
                 next = id; 
+                normalWindow = id; 
                 pause = id; 
                 play = id; 
                 prev = id; 
                 "o_mi_cut" = id; 
                 "o_mi_deinterlace" = id; 
                 "o_mi_device" = id; 
+                "o_mi_double_window" = id; 
                 "o_mi_faster" = id; 
                 "o_mi_fullscreen" = id; 
+                "o_mi_half_window" = id; 
                 "o_mi_hide" = id; 
                 "o_mi_hide_others" = id; 
                 "o_mi_language" = id; 
@@ -88,6 +93,7 @@
                 "o_mi_minimize" = id; 
                 "o_mi_mute" = id; 
                 "o_mi_next" = id; 
+                "o_mi_normal_window" = id; 
                 "o_mi_open_disc" = id; 
                 "o_mi_open_file" = id; 
                 "o_mi_open_generic" = id; 
index 41170b74fe75adf93ca8817792d7a6aac722f979..ffd76159721ab112e7684bcfe66398f42ba9d1a5 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <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>
        <dict>
                <key>29</key>
@@ -23,8 +23,8 @@
        </array>
        <key>IBOpenObjects</key>
        <array>
-               <integer>21</integer>
                <integer>29</integer>
+               <integer>21</integer>
        </array>
        <key>IBSystem Version</key>
        <string>6G30</string>
index f0d435a4b079605303b4679256b6f92c8174f030..bb006f3ff59b7b3ac4cd7ed74384603e0baf4893 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib differ
index a1e0ec558ea2eb612749c8ffea861fc5e94e7e00..a8628c02f51c8ee5fa1430510109619410145e40 100644 (file)
@@ -2,7 +2,7 @@
  * controls.m: MacOS X interface plugin
  *****************************************************************************
  * 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>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -59,6 +59,9 @@
 - (IBAction)volumeSliderUpdated:(id)sender;
 - (void)updateVolumeSlider;
 
+- (IBAction)halfWindow:(id)sender;
+- (IBAction)normalWindow:(id)sender;
+- (IBAction)doubleWindow:(id)sender;
 - (IBAction)fullscreen:(id)sender;
 - (IBAction)deinterlace:(id)sender;
 
     }
 }
 
+- (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
 {
     id o_window = [NSApp keyWindow];
 
         [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;
         NSArray *o_windows = [NSApp windows];
index fd67f5fdc17114a0012f443d02d475bb020d2981..9f523d17cc0e16dc8c471c31f9badcf763a852ed 100644 (file)
@@ -2,7 +2,7 @@
  * intf.h: MacOS X interface plugin
  *****************************************************************************
  * 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>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -172,6 +172,9 @@ struct intf_sys_t
     IBOutlet id o_mi_device;
 
     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_screen;
     IBOutlet id o_mi_deinterlace;
index 2b36805f40260466dad52c61d4159f6e0d4e075b..c3645bccfde4e7d1ba776eb187117475d3e90809 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface plugin
  *****************************************************************************
  * 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>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -309,6 +309,9 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
     [o_mi_device setTitle: _NS("Device")];
     
     [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_screen setTitle: _NS("Screen")];
     [o_mi_deinterlace setTitle: _NS("Deinterlace")];
index 715d7c13de5e3b4bccea3faa101572fa82326ce4..c8a66c757cae69d82d4abb738c33f9e6c8ab9aa2 100644 (file)
@@ -2,7 +2,7 @@
  * vout.h: MacOS X interface plugin
  *****************************************************************************
  * 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>
  *          Florian G. Pflug <fgp@phlo.org>
@@ -23,6 +23,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#define WINDOW_TITLE_HEIGHT 21
+
 /*****************************************************************************
  * VLCWindow interface
  *****************************************************************************/
@@ -34,6 +36,9 @@
 - (void)setVout:(vout_thread_t *)_p_vout;
 - (vout_thread_t *)getVout;
 
+- (void)halfWindow;
+- (void)normalWindow;
+- (void)doubleWindow;
 - (void)toggleFullscreen;
 - (BOOL)isFullscreen;
 
index 1167246bdbad12ba059459f612fa2505344aed4f..a501c3aab99379dcd7e14f267311eee2c9500321 100644 (file)
@@ -2,7 +2,7 @@
  * vout.m: MacOS X video output plugin
  *****************************************************************************
  * 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>
  *          Florian G. Pflug <fgp@phlo.org>
@@ -725,6 +725,39 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
     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
 {
     p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;