Commit 8403fa0b authored by hartman's avatar hartman
Browse files

* modules/gui/macosx/macosx.m

  - added a macosx-float config option
  - changed 'opaqueness' into 'macosx-opaqueness'
* modules/gui/macosx/vout.?
  - let vout respect 'float' on top option.
  - added a toggle function to toggle float on top.
ALL:
  - menuitem and corresponding code for float on top.
parent 496c6c03
......@@ -22,6 +22,7 @@
deinterlace = id;
doubleWindow = id;
faster = id;
floatOnTop = id;
forward = id;
fullscreen = id;
halfWindow = id;
......@@ -108,6 +109,7 @@
"o_mi_device" = id;
"o_mi_double_window" = id;
"o_mi_faster" = id;
"o_mi_floatontop" = id;
"o_mi_fullscreen" = id;
"o_mi_fwd" = id;
"o_mi_half_window" = id;
......
......@@ -23,8 +23,8 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>1411</integer>
<integer>29</integer>
<integer>1411</integer>
</array>
<key>IBSystem Version</key>
<string>6L29</string>
......
......@@ -2,7 +2,7 @@
* controls.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: controls.h,v 1.1 2003/03/06 11:43:07 hartman Exp $
* $Id: controls.h,v 1.2 2003/05/01 01:11:17 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -56,6 +56,7 @@
- (IBAction)normalWindow:(id)sender;
- (IBAction)doubleWindow:(id)sender;
- (IBAction)fullscreen:(id)sender;
- (IBAction)floatOnTop:(id)sender;
- (IBAction)deinterlace:(id)sender;
- (IBAction)toggleProgram:(id)sender;
......
......@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: controls.m,v 1.33 2003/04/30 14:04:53 hartman Exp $
* $Id: controls.m,v 1.34 2003/05/01 01:11:17 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -385,6 +385,21 @@
}
}
- (IBAction)floatOnTop:(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 toggleFloatOnTop];
}
}
}
- (IBAction)deinterlace:(id)sender
{
intf_thread_t * p_intf = [NSApp getIntf];
......@@ -705,13 +720,21 @@
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")])
[[o_mi title] isEqualToString: _NS("Double Size")] ||
[[o_mi title] isEqualToString: _NS("Float On Top")] )
{
id o_window;
NSArray *o_windows = [NSApp windows];
NSEnumerator *o_enumerator = [o_windows objectEnumerator];
bEnabled = FALSE;
if ( [[o_mi title] isEqualToString: _NS("Float On Top")] )
{
int i_state = config_GetInt( p_playlist, "macosx-float" ) ?
NSOnState : NSOffState;
[o_mi setState: i_state];
}
while ((o_window = [o_enumerator nextObject]))
{
if( [[o_window className] isEqualToString: @"VLCWindow"] )
......@@ -721,6 +744,11 @@
}
}
}
else if( [[o_mi title] isEqualToString: _NS("Float On Top")] )
{
bEnabled = TRUE;
}
else if( o_menu != nil &&
[[o_menu title] isEqualToString: _NS("Deinterlace")] )
{
......
......@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.h,v 1.33 2003/04/06 23:21:13 massiot Exp $
* $Id: intf.h,v 1.34 2003/05/01 01:11:17 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -188,6 +188,7 @@ struct intf_sys_t
IBOutlet id o_mi_normal_window;
IBOutlet id o_mi_double_window;
IBOutlet id o_mi_fullscreen;
IBOutlet id o_mi_floatontop;
IBOutlet id o_mi_screen;
IBOutlet id o_mi_deinterlace;
IBOutlet id o_mu_deinterlace;
......
......@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.70 2003/04/15 14:05:13 hartman Exp $
* $Id: intf.m,v 1.71 2003/05/01 01:11:17 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -346,6 +346,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
[o_mi_normal_window setTitle: _NS("Normal Size")];
[o_mi_double_window setTitle: _NS("Double Size")];
[o_mi_fullscreen setTitle: _NS("Fullscreen")];
[o_mi_floatontop setTitle: _NS("Float On Top")];
[o_mi_screen setTitle: _NS("Screen")];
[o_mi_deinterlace setTitle: _NS("Deinterlace")];
[o_mu_deinterlace setTitle: _NS("Deinterlace")];
......
......@@ -2,7 +2,7 @@
* macosx.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: macosx.m,v 1.7 2003/04/19 13:55:56 hartman Exp $
* $Id: macosx.m,v 1.8 2003/05/01 01:11:17 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
......@@ -51,6 +51,10 @@ void E_(CloseVideo) ( vlc_object_t * );
"Set the transparency of the video output. 1 is non-transparent (default) " \
"0 is fully transparent.")
#define FLOAT_TEXT N_("float on top")
#define FLOAT_LONGTEXT N_( \
"Let the video window float on top of other windows.")
vlc_module_begin();
set_description( _("MacOS X interface, sound and video") );
add_submodule();
......@@ -61,6 +65,7 @@ vlc_module_begin();
set_callbacks( E_(OpenVideo), E_(CloseVideo) );
add_category_hint( N_("Video"), NULL, VLC_FALSE );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_TEXT, VLC_FALSE );
add_float( "opaqueness", 1, NULL, OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_FALSE );
add_float( "macosx-opaqueness", 1, NULL, OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_FALSE );
add_bool( "macosx-float", 0, NULL, FLOAT_TEXT, FLOAT_LONGTEXT, VLC_FALSE );
vlc_module_end();
......@@ -2,7 +2,7 @@
* vout.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.h,v 1.10 2003/03/06 11:43:07 hartman Exp $
* $Id: vout.h,v 1.11 2003/05/01 01:11:17 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -35,6 +35,7 @@
- (vout_thread_t *)getVout;
- (void)scaleWindowWithFactor: (float)factor;
- (void)toggleFloatOnTop;
- (void)toggleFullscreen;
- (BOOL)isFullscreen;
- (void)updateTitle;
......
......@@ -2,7 +2,7 @@
* vout.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.44 2003/04/19 13:55:56 hartman Exp $
* $Id: vout.m,v 1.45 2003/05/01 01:11:17 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -818,6 +818,20 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
}
}
- (void)toggleFloatOnTop
{
if( config_GetInt( p_vout, "macosx-float" ) )
{
config_PutInt( p_vout, "macosx-float", 0 );
[p_vout->p_sys->o_window setLevel: NSNormalWindowLevel];
}
else
{
config_PutInt( p_vout, "macosx-float", 1 );
[p_vout->p_sys->o_window setLevel: NSStatusWindowLevel];
}
}
- (void)toggleFullscreen
{
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
......@@ -1256,7 +1270,12 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
backing: NSBackingStoreBuffered
defer: NO screen: o_screen];
[p_vout->p_sys->o_window setAlphaValue: config_GetFloat( p_vout, "opaqueness" )];
[p_vout->p_sys->o_window setAlphaValue: config_GetFloat( p_vout, "macosx-opaqueness" )];
if( config_GetInt( p_vout, "macosx-float" ) )
{
[p_vout->p_sys->o_window setLevel: NSStatusWindowLevel];
}
if( !p_vout->p_sys->b_pos_saved )
{
......
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