#define FILL_LONGTEXT N_("In fullscreen mode, crop the picture if " \
"necessary in order to fill the screen without black " \
"borders (OpenGL only)." )
+
+#define BACKGROUND_TEXT N_("Use as Desktop Background")
+#define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
+ "of the Finder. Desktop icons cannot be interacted with in this mode." )
vlc_module_begin();
set_description( _("Mac OS X interface") );
OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
add_bool( "macosx-fill", 0, NULL, FILL_TEXT, FILL_LONGTEXT,
VLC_TRUE );
+ add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
+ VLC_FALSE );
add_submodule();
set_description( "Mac OS X OpenGL" );
set_capability( "opengl provider", 100 );
var_Create( p_vout, "macosx-fill", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Create( p_vout, "macosx-stretch", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Create( p_vout, "macosx-opaqueness", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
+ var_Create( p_vout, "macosx-background", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
/* Get the pref value when this is the first time, otherwise retrieve the device from the top level video-device var */
if( var_Type( p_real_vout->p_vlc, "video-device" ) == 0 )
NULL, NULL, fullScreenAllowEvents );
}
}
+ else if( var_GetBool( p_real_vout, "macosx-background" ) )
+ {
+ NSRect screen_rect = [o_screen frame];
+ screen_rect.origin.x = screen_rect.origin.y = 0;
+
+ /* Creates a window with size: screen_rect on o_screen */
+ [self initWithContentRect: screen_rect
+ styleMask: NSBorderlessWindowMask
+ backing: NSBackingStoreBuffered
+ defer: YES screen: o_screen];
+
+ [self setLevel: CGWindowLevelForKey(kCGDesktopWindowLevelKey)];
+ }
else
{
unsigned int i_stylemask = NSTitledWindowMask |