}
}
+/* change the opaqueness of the vouts */
- (IBAction)adjImg_opaque:(id)sender
{
- /* change the opaqueness of the vouts */
+ vlc_value_t val;
+ id o_window = [NSApp keyWindow];
+ NSArray *o_windows = [NSApp orderedWindows];
+ NSEnumerator *o_enumerator = [o_windows objectEnumerator];
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, \
FIND_ANYWHERE );
- vout_thread_t * p_vout = (vout_thread_t *)vlc_object_find( p_playlist, \
- VLC_OBJECT_VOUT, FIND_ANYWHERE );
- vout_thread_t * p_real_vout;
+ vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
+ vout_thread_t *p_real_vout;
- vlc_value_t val;
val.f_float = [o_sld_opaque floatValue] / 100;
- /* Try to set on the fly */
- if( p_vout )
+ if( p_vout != NULL )
{
if( p_vout->i_object_type == VLC_OBJECT_OPENGL )
{
{
p_real_vout = p_vout;
}
-
- /* FIXME: insert the correct pointer here */
- /*[p_vout->p_sys->o_window setAlpha: var_CreateGetFloat( p_vout, \
- "macosx-opaqueness")];*/
-
- var_Set( p_vout, "macosx-opaqueness", val );
- vlc_object_release( p_real_vout );
+ var_Set( p_real_vout, "macosx-opaqueness", val );
+
+ while ((o_window = [o_enumerator nextObject]))
+ {
+ if( [[o_window className] isEqualToString: @"VLCWindow"] )
+ {
+ [o_window setAlphaValue: val.f_float];
+ }
+ }
vlc_object_release( p_vout );
}