Commit e7f79118 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Mac OS X gui: Backport part of [19115], in order to work around leopard...

Mac OS X gui: Backport part of [19115], in order to work around leopard glitches. (quickdraw part ignored for now). (We may need to also back port [19128] "Close the embedded window only when playlist stop.").
parent 03375ecf
{ <?xml version="1.0" encoding="UTF-8"?>
IBClasses = ( <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, <plist version="1.0">
{CLASS = ITSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; }, <dict>
{CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; }, <key>IBClasses</key>
{CLASS = VLBrushedMetalImageView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; }, <array>
{CLASS = VLCApplication; LANGUAGE = ObjC; SUPERCLASS = NSApplication; }, <dict>
{CLASS = VLCControllerView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, <key>CLASS</key>
{CLASS = VLCControllerWindow; LANGUAGE = ObjC; SUPERCLASS = NSWindow; }, <string>VLCTimeField</string>
{ <key>LANGUAGE</key>
ACTIONS = { <string>ObjC</string>
backward = id; <key>SUPERCLASS</key>
faster = id; <string>NSTextField</string>
forward = id; </dict>
goToSpecificTime = id; <dict>
loop = id; <key>CLASS</key>
mute = id; <string>VLCControllerView</string>
next = id; <key>LANGUAGE</key>
pause = id; <string>ObjC</string>
play = id; <key>SUPERCLASS</key>
position = id; <string>NSView</string>
prev = id; </dict>
random = id; <dict>
repeat = id; <key>CLASS</key>
repeatButtonAction = id; <string>VLCEmbeddedWindow</string>
slower = id; <key>LANGUAGE</key>
stop = id; <string>ObjC</string>
toggleVar = id; <key>OUTLETS</key>
volumeDown = id; <dict>
volumeSliderUpdated = id; <key>o_btn_backward</key>
volumeUp = id; <string>id</string>
windowAction = id; <key>o_btn_forward</key>
}; <string>id</string>
CLASS = VLCControls; <key>o_btn_fullscreen</key>
LANGUAGE = ObjC; <string>id</string>
OUTLETS = { <key>o_btn_play</key>
"o_btn_addNode" = id; <string>id</string>
"o_btn_repeat" = id; <key>o_slider</key>
"o_btn_shuffle" = id; <string>id</string>
"o_fs_panel" = id; <key>o_time</key>
"o_main" = id; <string>id</string>
"o_specificTime_cancel_btn" = id; <key>o_view</key>
"o_specificTime_enter_fld" = id; <string>id</string>
"o_specificTime_goTo_lbl" = id; </dict>
"o_specificTime_mi" = id; <key>SUPERCLASS</key>
"o_specificTime_ok_btn" = id; <string>NSWindow</string>
"o_specificTime_sec_lbl" = id; </dict>
"o_specificTime_stepper" = id; <dict>
"o_specificTime_win" = id; <key>ACTIONS</key>
"o_volumeslider" = id; <dict>
}; <key>checkForUpdate</key>
SUPERCLASS = NSObject; <string>id</string>
}, <key>clearRecentItems</key>
{ <string>id</string>
CLASS = VLCDetachedEmbeddedVoutView; <key>closeError</key>
LANGUAGE = ObjC; <string>id</string>
SUPERCLASS = VLCEmbeddedVoutView; <key>intfOpenDisc</key>
}, <string>id</string>
{CLASS = VLCEmbeddedVoutView; LANGUAGE = ObjC; SUPERCLASS = VLCVoutView; }, <key>intfOpenFile</key>
{ <string>id</string>
CLASS = VLCEmbeddedWindow; <key>intfOpenFileGeneric</key>
LANGUAGE = ObjC; <string>id</string>
OUTLETS = { <key>intfOpenNet</key>
"o_btn_backward" = id; <string>id</string>
"o_btn_forward" = id; <key>openCrashLog</key>
"o_btn_fullscreen" = id; <string>id</string>
"o_btn_play" = id; <key>openDocumentation</key>
"o_slider" = id; <string>id</string>
"o_time" = id; <key>openDonate</key>
}; <string>id</string>
SUPERCLASS = NSWindow; <key>openForum</key>
}, <string>id</string>
{ <key>openLicense</key>
ACTIONS = { <string>id</string>
bandSliderUpdated = id; <key>openReadMe</key>
changePreset = id; <string>id</string>
enable = id; <key>openRecentItem</key>
preampSliderUpdated = id; <string>id</string>
toggleWindow = id; <key>openWebsite</key>
twopass = id; <string>id</string>
}; <key>reportABug</key>
CLASS = VLCEqualizer; <string>id</string>
LANGUAGE = ObjC; <key>showBookmarks</key>
OUTLETS = { <string>id</string>
"o_btn_equalizer" = id; <key>showExtended</key>
"o_ckb_2pass" = id; <string>id</string>
"o_ckb_enable" = id; <key>showWizard</key>
"o_fld_preamp" = id; <string>id</string>
"o_popup_presets" = id; <key>timesliderUpdate</key>
"o_slider_band1" = id; <string>id</string>
"o_slider_band10" = id; <key>togglePlaylist</key>
"o_slider_band2" = id; <string>id</string>
"o_slider_band3" = id; <key>viewAbout</key>
"o_slider_band4" = id; <string>id</string>
"o_slider_band5" = id; <key>viewPreferences</key>
"o_slider_band6" = id; <string>id</string>
"o_slider_band7" = id; </dict>
"o_slider_band8" = id; <key>CLASS</key>
"o_slider_band9" = id; <string>VLCMain</string>
"o_slider_preamp" = id; <key>LANGUAGE</key>
"o_window" = id; <string>ObjC</string>
}; <key>OUTLETS</key>
SUPERCLASS = NSObject; <dict>
}, <key>o_btn_ff</key>
{CLASS = VLCFSPanel; LANGUAGE = ObjC; SUPERCLASS = NSWindow; }, <string>id</string>
{ <key>o_btn_next</key>
ACTIONS = {faster = id; next = id; play = id; prev = id; slower = id; }; <string>id</string>
CLASS = VLCFSPanelView; <key>o_btn_play</key>
LANGUAGE = ObjC; <string>id</string>
SUPERCLASS = NSView; <key>o_btn_playlist</key>
}, <string>id</string>
{CLASS = VLCFSTimeSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; }, <key>o_btn_prev</key>
{ <string>id</string>
ACTIONS = { <key>o_btn_rewind</key>
createOutlineGroup = id; <string>id</string>
deleteOutlineGroup = id; <key>o_btn_stop</key>
infoCancel = id; <string>id</string>
infoOk = id; <key>o_controls</key>
toggleInfoPanel = id; <string>id</string>
togglePlaylistInfoPanel = id; <key>o_dmi_mute</key>
}; <string>id</string>
CLASS = VLCInfo; <key>o_dmi_next</key>
LANGUAGE = ObjC; <string>id</string>
OUTLETS = { <key>o_dmi_play</key>
"o_audio_box" = id; <string>id</string>
"o_audio_decoded_lbl" = id; <key>o_dmi_previous</key>
"o_audio_decoded_txt" = id; <string>id</string>
"o_author_lbl" = id; <key>o_dmi_stop</key>
"o_author_txt" = id; <string>id</string>
"o_btn_cancel" = id; <key>o_embedded_window</key>
"o_btn_ok" = id; <string>id</string>
"o_collection_lbl" = id; <key>o_err_btn_dismiss</key>
"o_collection_txt" = id; <string>id</string>
"o_copyright_lbl" = id; <key>o_err_btn_msgs</key>
"o_copyright_txt" = id; <string>id</string>
"o_date_lbl" = id; <key>o_err_bug_lbl</key>
"o_date_txt" = id; <string>id</string>
"o_demux_bitrate_lbl" = id; <key>o_err_ckbk_surpress</key>
"o_demux_bitrate_txt" = id; <string>id</string>
"o_demux_bytes_lbl" = id; <key>o_err_lbl</key>
"o_demux_bytes_txt" = id; <string>id</string>
"o_description_lbl" = id; <key>o_err_msg</key>
"o_description_txt" = id; <string>id</string>
"o_displayed_lbl" = id; <key>o_error</key>
"o_displayed_txt" = id; <string>id</string>
"o_genre_lbl" = id; <key>o_info</key>
"o_genre_txt" = id; <string>id</string>
"o_info_window" = id; <key>o_main_pgbar</key>
"o_input_bitrate_lbl" = id; <string>id</string>
"o_input_bitrate_txt" = id; <key>o_messages</key>
"o_input_box" = id; <string>id</string>
"o_language_lbl" = id; <key>o_mi_about</key>
"o_language_txt" = id; <string>id</string>
"o_lost_abuffers_lbl" = id; <key>o_mi_add_intf</key>
"o_lost_abuffers_txt" = id; <string>id</string>
"o_lost_frames_lbl" = id; <key>o_mi_aspect_ratio</key>
"o_lost_frames_txt" = id; <string>id</string>
"o_nowPlaying_lbl" = id; <key>o_mi_audiotrack</key>
"o_nowPlaying_txt" = id; <string>id</string>
"o_outline_view" = id; <key>o_mi_bookmarks</key>
"o_played_abuffers_lbl" = id; <string>id</string>
"o_played_abuffers_txt" = id; <key>o_mi_bring_atf</key>
"o_publisher_lbl" = id; <string>id</string>
"o_publisher_txt" = id; <key>o_mi_bwd</key>
"o_rating_lbl" = id; <string>id</string>
"o_rating_txt" = id; <key>o_mi_channels</key>
"o_read_bytes_lbl" = id; <string>id</string>
"o_read_bytes_txt" = id; <key>o_mi_chapter</key>
"o_sent_bitrate_lbl" = id; <string>id</string>
"o_sent_bitrate_txt" = id; <key>o_mi_checkForUpdate</key>
"o_sent_bytes_lbl" = id; <string>id</string>
"o_sent_bytes_txt" = id; <key>o_mi_clear</key>
"o_sent_packets_lbl" = id; <string>id</string>
"o_sent_packets_txt" = id; <key>o_mi_close_window</key>
"o_seqNum_lbl" = id; <string>id</string>
"o_seqNum_txt" = id; <key>o_mi_controller</key>
"o_sout_box" = id; <string>id</string>
"o_tab_view" = id; <key>o_mi_copy</key>
"o_title_lbl" = id; <string>id</string>
"o_title_txt" = id; <key>o_mi_crop</key>
"o_uri_lbl" = id; <string>id</string>
"o_uri_txt" = id; <key>o_mi_cut</key>
"o_video_box" = id; <string>id</string>
"o_video_decoded_lbl" = id; <key>o_mi_deinterlace</key>
"o_video_decoded_txt" = id; <string>id</string>
}; <key>o_mi_device</key>
SUPERCLASS = NSObject; <string>id</string>
}, <key>o_mi_documentation</key>
{ <string>id</string>
ACTIONS = { <key>o_mi_donation</key>
checkForUpdate = id; <string>id</string>
clearRecentItems = id; <key>o_mi_double_window</key>
closeError = id; <string>id</string>
intfOpenDisc = id; <key>o_mi_equalizer</key>
intfOpenFile = id; <string>id</string>
intfOpenFileGeneric = id; <key>o_mi_extended</key>
intfOpenNet = id; <string>id</string>
openCrashLog = id; <key>o_mi_faster</key>
openDocumentation = id; <string>id</string>
openDonate = id; <key>o_mi_ffmpeg_pp</key>
openForum = id; <string>id</string>
openLicense = id; <key>o_mi_fittoscreen</key>
openReadMe = id; <string>id</string>
openRecentItem = id; <key>o_mi_floatontop</key>
openWebsite = id; <string>id</string>
reportABug = id; <key>o_mi_forum</key>
showBookmarks = id; <string>id</string>
showExtended = id; <key>o_mi_fullscreen</key>
showWizard = id; <string>id</string>
timesliderUpdate = id; <key>o_mi_fwd</key>
togglePlaylist = id; <string>id</string>
viewAbout = id; <key>o_mi_half_window</key>
viewPreferences = id; <string>id</string>
}; <key>o_mi_hide</key>
CLASS = VLCMain; <string>id</string>
LANGUAGE = ObjC; <key>o_mi_hide_others</key>
OUTLETS = { <string>id</string>
"o_btn_ff" = id; <key>o_mi_info</key>
"o_btn_next" = id; <string>id</string>
"o_btn_play" = id; <key>o_mi_license</key>
"o_btn_playlist" = id; <string>id</string>
"o_btn_prev" = id; <key>o_mi_loop</key>
"o_btn_rewind" = id; <string>id</string>
"o_btn_stop" = id; <key>o_mi_messages</key>
"o_controls" = id; <string>id</string>
"o_dmi_mute" = id; <key>o_mi_minimize</key>
"o_dmi_next" = id; <string>id</string>
"o_dmi_play" = id; <key>o_mi_mute</key>
"o_dmi_previous" = id; <string>id</string>
"o_dmi_stop" = id; <key>o_mi_next</key>
"o_embedded_window" = id; <string>id</string>
"o_err_btn_dismiss" = id; <key>o_mi_normal_window</key>
"o_err_btn_msgs" = id; <string>id</string>
"o_err_bug_lbl" = id; <key>o_mi_open_disc</key>
"o_err_ckbk_surpress" = id; <string>id</string>
"o_err_lbl" = id; <key>o_mi_open_file</key>
"o_err_msg" = id; <string>id</string>
"o_error" = id; <key>o_mi_open_generic</key>
"o_info" = id; <string>id</string>
"o_main_pgbar" = id; <key>o_mi_open_net</key>
"o_messages" = id; <string>id</string>
"o_mi_about" = id; <key>o_mi_open_recent</key>
"o_mi_add_intf" = id; <string>id</string>
"o_mi_aspect_ratio" = id; <key>o_mi_open_recent_cm</key>
"o_mi_audiotrack" = id; <string>id</string>
"o_mi_bookmarks" = id; <key>o_mi_paste</key>
"o_mi_bring_atf" = id; <string>id</string>
"o_mi_bwd" = id; <key>o_mi_play</key>
"o_mi_channels" = id; <string>id</string>
"o_mi_chapter" = id; <key>o_mi_playlist</key>
"o_mi_checkForUpdate" = id; <string>id</string>
"o_mi_clear" = id; <key>o_mi_prefs</key>
"o_mi_close_window" = id; <string>id</string>
"o_mi_controller" = id; <key>o_mi_previous</key>
"o_mi_copy" = id; <string>id</string>
"o_mi_crop" = id; <key>o_mi_program</key>
"o_mi_cut" = id; <string>id</string>
"o_mi_deinterlace" = id; <key>o_mi_quit</key>
"o_mi_device" = id; <string>id</string>
"o_mi_documentation" = id; <key>o_mi_random</key>
"o_mi_donation" = id; <string>id</string>
"o_mi_double_window" = id; <key>o_mi_readme</key>
"o_mi_equalizer" = id; <string>id</string>
"o_mi_extended" = id; <key>o_mi_repeat</key>
"o_mi_faster" = id; <string>id</string>
"o_mi_ffmpeg_pp" = id; <key>o_mi_reportabug</key>
"o_mi_fittoscreen" = id; <string>id</string>
"o_mi_floatontop" = id; <key>o_mi_screen</key>
"o_mi_forum" = id; <string>id</string>
"o_mi_fullscreen" = id; <key>o_mi_select_all</key>
"o_mi_fwd" = id; <string>id</string>
"o_mi_half_window" = id; <key>o_mi_services</key>
"o_mi_hide" = id; <string>id</string>
"o_mi_hide_others" = id; <key>o_mi_show_all</key>
"o_mi_info" = id; <string>id</string>
"o_mi_license" = id; <key>o_mi_slower</key>
"o_mi_loop" = id; <string>id</string>
"o_mi_messages" = id; <key>o_mi_snapshot</key>
"o_mi_minimize" = id; <string>id</string>
"o_mi_mute" = id; <key>o_mi_stop</key>
"o_mi_next" = id; <string>id</string>
"o_mi_normal_window" = id; <key>o_mi_subtitle</key>
"o_mi_open_disc" = id; <string>id</string>
"o_mi_open_file" = id; <key>o_mi_title</key>
"o_mi_open_generic" = id; <string>id</string>
"o_mi_open_net" = id; <key>o_mi_videotrack</key>
"o_mi_open_recent" = id; <string>id</string>
"o_mi_open_recent_cm" = id; <key>o_mi_visual</key>
"o_mi_paste" = id; <string>id</string>
"o_mi_play" = id; <key>o_mi_vol_down</key>
"o_mi_playlist" = id; <string>id</string>
"o_mi_prefs" = id; <key>o_mi_vol_up</key>
"o_mi_previous" = id; <string>id</string>
"o_mi_program" = id; <key>o_mi_website</key>
"o_mi_quit" = id; <string>id</string>
"o_mi_random" = id; <key>o_msgs_btn_crashlog</key>
"o_mi_readme" = id; <string>id</string>
"o_mi_repeat" = id; <key>o_msgs_panel</key>
"o_mi_reportabug" = id; <string>id</string>
"o_mi_screen" = id; <key>o_mu_add_intf</key>
"o_mi_select_all" = id; <string>id</string>
"o_mi_services" = id; <key>o_mu_aspect_ratio</key>
"o_mi_show_all" = id; <string>id</string>
"o_mi_slower" = id; <key>o_mu_audio</key>
"o_mi_snapshot" = id; <string>id</string>
"o_mi_stop" = id; <key>o_mu_audiotrack</key>
"o_mi_subtitle" = id; <string>id</string>
"o_mi_title" = id; <key>o_mu_channels</key>
"o_mi_videotrack" = id; <string>id</string>
"o_mi_visual" = id; <key>o_mu_chapter</key>
"o_mi_vol_down" = id; <string>id</string>
"o_mi_vol_up" = id; <key>o_mu_controls</key>
"o_mi_website" = id; <string>id</string>
"o_msgs_btn_crashlog" = id; <key>o_mu_crop</key>
"o_msgs_panel" = id; <string>id</string>
"o_mu_add_intf" = id; <key>o_mu_deinterlace</key>
"o_mu_aspect_ratio" = id; <string>id</string>
"o_mu_audio" = id; <key>o_mu_device</key>
"o_mu_audiotrack" = id; <string>id</string>
"o_mu_channels" = id; <key>o_mu_edit</key>
"o_mu_chapter" = id; <string>id</string>
"o_mu_controls" = id; <key>o_mu_ffmpeg_pp</key>
"o_mu_crop" = id; <string>id</string>
"o_mu_deinterlace" = id; <key>o_mu_file</key>
"o_mu_device" = id; <string>id</string>
"o_mu_edit" = id; <key>o_mu_help</key>
"o_mu_ffmpeg_pp" = id; <string>id</string>
"o_mu_file" = id; <key>o_mu_program</key>
"o_mu_help" = id; <string>id</string>
"o_mu_program" = id; <key>o_mu_screen</key>
"o_mu_screen" = id; <string>id</string>
"o_mu_subtitle" = id; <key>o_mu_subtitle</key>
"o_mu_title" = id; <string>id</string>
"o_mu_video" = id; <key>o_mu_title</key>
"o_mu_videotrack" = id; <string>id</string>
"o_mu_visual" = id; <key>o_mu_video</key>
"o_mu_window" = id; <string>id</string>
"o_playlist" = id; <key>o_mu_videotrack</key>
"o_playlist_view" = id; <string>id</string>
"o_scrollfield" = id; <key>o_mu_visual</key>
"o_timefield" = id; <string>id</string>
"o_timeslider" = id; <key>o_mu_window</key>
"o_vmi_fullscreen" = id; <string>id</string>
"o_vmi_mute" = id; <key>o_playlist</key>
"o_vmi_next" = id; <string>id</string>
"o_vmi_play" = id; <key>o_playlist_view</key>
"o_vmi_prev" = id; <string>id</string>
"o_vmi_snapshot" = id; <key>o_scrollfield</key>
"o_vmi_stop" = id; <string>id</string>
"o_vmi_voldown" = id; <key>o_timefield</key>
"o_vmi_volup" = id; <string>id</string>
"o_volumeslider" = id; <key>o_timeslider</key>
"o_vout_menu" = id; <string>id</string>
"o_window" = id; <key>o_vmi_fullscreen</key>
}; <string>id</string>
SUPERCLASS = NSObject; <key>o_vmi_mute</key>
}, <string>id</string>
{ <key>o_vmi_next</key>
ACTIONS = { <string>id</string>
addNode = id; <key>o_vmi_play</key>
deleteItem = id; <string>id</string>
playItem = id; <key>o_vmi_prev</key>
preparseItem = id; <string>id</string>
recursiveExpandNode = id; <key>o_vmi_snapshot</key>
savePlaylist = id; <string>id</string>
searchItem = id; <key>o_vmi_stop</key>
selectAll = id; <string>id</string>
sortNodeByAuthor = id; <key>o_vmi_voldown</key>
sortNodeByName = id; <string>id</string>
}; <key>o_vmi_volup</key>
CLASS = VLCPlaylist; <string>id</string>
LANGUAGE = ObjC; <key>o_volumeslider</key>
OUTLETS = { <string>id</string>
"o_btn_addNode" = id; <key>o_vout_menu</key>
"o_controller" = id; <string>id</string>
"o_ctx_menu" = id; <key>o_window</key>
"o_mi_addNode" = id; <string>id</string>
"o_mi_delete" = id; </dict>
"o_mi_info" = id; <key>SUPERCLASS</key>
"o_mi_play" = id; <string>NSObject</string>
"o_mi_preparse" = id; </dict>
"o_mi_recursive_expand" = id; <dict>
"o_mi_save_playlist" = id; <key>CLASS</key>
"o_mi_selectall" = id; <string>FirstResponder</string>
"o_mi_services" = id; <key>LANGUAGE</key>
"o_mi_sort_author" = id; <string>ObjC</string>
"o_mi_sort_name" = id; <key>SUPERCLASS</key>
"o_mm_mi_services" = id; <string>NSObject</string>
"o_mm_mu_services" = id; </dict>
"o_mu_services" = id; <dict>
"o_outline_view" = id; <key>CLASS</key>
"o_playlist_view" = id; <string>ITSlider</string>
"o_random_ckb" = id; <key>LANGUAGE</key>
"o_save_accessory_popup" = id; <string>ObjC</string>
"o_save_accessory_text" = id; <key>SUPERCLASS</key>
"o_save_accessory_view" = id; <string>NSSlider</string>
"o_search_field" = id; </dict>
"o_status_field" = id; <dict>
"o_tc_author" = id; <key>ACTIONS</key>
"o_tc_duration" = id; <dict>
"o_tc_name" = id; <key>createOutlineGroup</key>
}; <string>id</string>
SUPERCLASS = NSObject; <key>deleteOutlineGroup</key>
}, <string>id</string>
{CLASS = VLCPlaylistView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, <key>infoCancel</key>
{CLASS = VLCTimeField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; }, <string>id</string>
{CLASS = VLCVoutView; LANGUAGE = ObjC; SUPERCLASS = NSView; } <key>infoOk</key>
); <string>id</string>
IBVersion = 1; <key>toggleInfoPanel</key>
} <string>id</string>
\ No newline at end of file <key>togglePlaylistInfoPanel</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCInfo</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_audio_box</key>
<string>id</string>
<key>o_audio_decoded_lbl</key>
<string>id</string>
<key>o_audio_decoded_txt</key>
<string>id</string>
<key>o_author_lbl</key>
<string>id</string>
<key>o_author_txt</key>
<string>id</string>
<key>o_btn_cancel</key>
<string>id</string>
<key>o_btn_ok</key>
<string>id</string>
<key>o_collection_lbl</key>
<string>id</string>
<key>o_collection_txt</key>
<string>id</string>
<key>o_copyright_lbl</key>
<string>id</string>
<key>o_copyright_txt</key>
<string>id</string>
<key>o_date_lbl</key>
<string>id</string>
<key>o_date_txt</key>
<string>id</string>
<key>o_demux_bitrate_lbl</key>
<string>id</string>
<key>o_demux_bitrate_txt</key>
<string>id</string>
<key>o_demux_bytes_lbl</key>
<string>id</string>
<key>o_demux_bytes_txt</key>
<string>id</string>
<key>o_description_lbl</key>
<string>id</string>
<key>o_description_txt</key>
<string>id</string>
<key>o_displayed_lbl</key>
<string>id</string>
<key>o_displayed_txt</key>
<string>id</string>
<key>o_genre_lbl</key>
<string>id</string>
<key>o_genre_txt</key>
<string>id</string>
<key>o_info_window</key>
<string>id</string>
<key>o_input_bitrate_lbl</key>
<string>id</string>
<key>o_input_bitrate_txt</key>
<string>id</string>
<key>o_input_box</key>
<string>id</string>
<key>o_language_lbl</key>
<string>id</string>
<key>o_language_txt</key>
<string>id</string>
<key>o_lost_abuffers_lbl</key>
<string>id</string>
<key>o_lost_abuffers_txt</key>
<string>id</string>
<key>o_lost_frames_lbl</key>
<string>id</string>
<key>o_lost_frames_txt</key>
<string>id</string>
<key>o_nowPlaying_lbl</key>
<string>id</string>
<key>o_nowPlaying_txt</key>
<string>id</string>
<key>o_outline_view</key>
<string>id</string>
<key>o_played_abuffers_lbl</key>
<string>id</string>
<key>o_played_abuffers_txt</key>
<string>id</string>
<key>o_publisher_lbl</key>
<string>id</string>
<key>o_publisher_txt</key>
<string>id</string>
<key>o_rating_lbl</key>
<string>id</string>
<key>o_rating_txt</key>
<string>id</string>
<key>o_read_bytes_lbl</key>
<string>id</string>
<key>o_read_bytes_txt</key>
<string>id</string>
<key>o_sent_bitrate_lbl</key>
<string>id</string>
<key>o_sent_bitrate_txt</key>
<string>id</string>
<key>o_sent_bytes_lbl</key>
<string>id</string>
<key>o_sent_bytes_txt</key>
<string>id</string>
<key>o_sent_packets_lbl</key>
<string>id</string>
<key>o_sent_packets_txt</key>
<string>id</string>
<key>o_seqNum_lbl</key>
<string>id</string>
<key>o_seqNum_txt</key>
<string>id</string>
<key>o_sout_box</key>
<string>id</string>
<key>o_tab_view</key>
<string>id</string>
<key>o_title_lbl</key>
<string>id</string>
<key>o_title_txt</key>
<string>id</string>
<key>o_uri_lbl</key>
<string>id</string>
<key>o_uri_txt</key>
<string>id</string>
<key>o_video_box</key>
<string>id</string>
<key>o_video_decoded_lbl</key>
<string>id</string>
<key>o_video_decoded_txt</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>backward</key>
<string>id</string>
<key>faster</key>
<string>id</string>
<key>forward</key>
<string>id</string>
<key>goToSpecificTime</key>
<string>id</string>
<key>loop</key>
<string>id</string>
<key>mute</key>
<string>id</string>
<key>next</key>
<string>id</string>
<key>pause</key>
<string>id</string>
<key>play</key>
<string>id</string>
<key>position</key>
<string>id</string>
<key>prev</key>
<string>id</string>
<key>random</key>
<string>id</string>
<key>repeat</key>
<string>id</string>
<key>repeatButtonAction</key>
<string>id</string>
<key>slower</key>
<string>id</string>
<key>stop</key>
<string>id</string>
<key>toggleVar</key>
<string>id</string>
<key>volumeDown</key>
<string>id</string>
<key>volumeSliderUpdated</key>
<string>id</string>
<key>volumeUp</key>
<string>id</string>
<key>windowAction</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCControls</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_addNode</key>
<string>id</string>
<key>o_btn_repeat</key>
<string>id</string>
<key>o_btn_shuffle</key>
<string>id</string>
<key>o_fs_panel</key>
<string>id</string>
<key>o_main</key>
<string>id</string>
<key>o_specificTime_cancel_btn</key>
<string>id</string>
<key>o_specificTime_enter_fld</key>
<string>id</string>
<key>o_specificTime_goTo_lbl</key>
<string>id</string>
<key>o_specificTime_mi</key>
<string>id</string>
<key>o_specificTime_ok_btn</key>
<string>id</string>
<key>o_specificTime_sec_lbl</key>
<string>id</string>
<key>o_specificTime_stepper</key>
<string>id</string>
<key>o_specificTime_win</key>
<string>id</string>
<key>o_volumeslider</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCPlaylistView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSOutlineView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCVoutView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCControllerWindow</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSWindow</string>
</dict>
<dict>
<key>CLASS</key>
<string>MPSlider</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCFSPanel</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSWindow</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCEmbeddedVoutView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>VLCVoutView</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>bandSliderUpdated</key>
<string>id</string>
<key>changePreset</key>
<string>id</string>
<key>enable</key>
<string>id</string>
<key>preampSliderUpdated</key>
<string>id</string>
<key>toggleWindow</key>
<string>id</string>
<key>twopass</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCEqualizer</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_equalizer</key>
<string>id</string>
<key>o_ckb_2pass</key>
<string>id</string>
<key>o_ckb_enable</key>
<string>id</string>
<key>o_fld_preamp</key>
<string>id</string>
<key>o_popup_presets</key>
<string>id</string>
<key>o_slider_band1</key>
<string>id</string>
<key>o_slider_band10</key>
<string>id</string>
<key>o_slider_band2</key>
<string>id</string>
<key>o_slider_band3</key>
<string>id</string>
<key>o_slider_band4</key>
<string>id</string>
<key>o_slider_band5</key>
<string>id</string>
<key>o_slider_band6</key>
<string>id</string>
<key>o_slider_band7</key>
<string>id</string>
<key>o_slider_band8</key>
<string>id</string>
<key>o_slider_band9</key>
<string>id</string>
<key>o_slider_preamp</key>
<string>id</string>
<key>o_window</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCDetachedEmbeddedVoutView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>VLCEmbeddedVoutView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLBrushedMetalImageView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSImageView</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>addNode</key>
<string>id</string>
<key>deleteItem</key>
<string>id</string>
<key>playItem</key>
<string>id</string>
<key>preparseItem</key>
<string>id</string>
<key>recursiveExpandNode</key>
<string>id</string>
<key>savePlaylist</key>
<string>id</string>
<key>searchItem</key>
<string>id</string>
<key>selectAll</key>
<string>id</string>
<key>sortNodeByAuthor</key>
<string>id</string>
<key>sortNodeByName</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCPlaylist</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_addNode</key>
<string>id</string>
<key>o_controller</key>
<string>id</string>
<key>o_ctx_menu</key>
<string>id</string>
<key>o_mi_addNode</key>
<string>id</string>
<key>o_mi_delete</key>
<string>id</string>
<key>o_mi_info</key>
<string>id</string>
<key>o_mi_play</key>
<string>id</string>
<key>o_mi_preparse</key>
<string>id</string>
<key>o_mi_recursive_expand</key>
<string>id</string>
<key>o_mi_save_playlist</key>
<string>id</string>
<key>o_mi_selectall</key>
<string>id</string>
<key>o_mi_services</key>
<string>id</string>
<key>o_mi_sort_author</key>
<string>id</string>
<key>o_mi_sort_name</key>
<string>id</string>
<key>o_mm_mi_services</key>
<string>id</string>
<key>o_mm_mu_services</key>
<string>id</string>
<key>o_mu_services</key>
<string>id</string>
<key>o_outline_view</key>
<string>id</string>
<key>o_playlist_view</key>
<string>id</string>
<key>o_random_ckb</key>
<string>id</string>
<key>o_save_accessory_popup</key>
<string>id</string>
<key>o_save_accessory_text</key>
<string>id</string>
<key>o_save_accessory_view</key>
<string>id</string>
<key>o_search_field</key>
<string>id</string>
<key>o_status_field</key>
<string>id</string>
<key>o_tc_author</key>
<string>id</string>
<key>o_tc_duration</key>
<string>id</string>
<key>o_tc_name</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key>
<string>572 94 478 430 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<string>788 586 109 149 0 0 1440 878 </string>
<key>2197</key>
<string>422 532 596 143 0 0 1440 878 </string>
<key>2709</key>
<string>305 626 508 82 0 0 1024 746 </string>
<key>2730</key>
<string>396 512 130 249 0 0 1440 878 </string>
<key>29</key>
<string>130 802 438 44 0 0 1440 878 </string>
<key>915</key>
<string>777 479 187 249 0 0 1440 878 </string>
</dict>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>446.1</string> <string>629</string>
<key>IBLockedObjects</key> <key>IBOldestOS</key>
<array/> <integer>5</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>29</integer>
<integer>2809</integer>
<integer>2416</integer> <integer>2416</integer>
<integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>8L127</string> <string>9B18</string>
<key>IBUsesTextArchiving</key> <key>targetFramework</key>
<true/> <string>IBCocoaFramework</string>
</dict> </dict>
</plist> </plist>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
o_vout_view = [o_embedded_vout_list getViewForWindow: o_window]; o_vout_view = [o_embedded_vout_list getViewForWindow: o_window];
} }
/* We have a detached vout */ /* We have a detached vout */
else if( [[o_window className] isEqualToString: @"VLCWindow"] ) else if( [[o_window className] isEqualToString: @"VLCVoutWindow"] )
{ {
msg_Dbg( VLCIntf, "detached vout controls.m call getVoutView" ); msg_Dbg( VLCIntf, "detached vout controls.m call getVoutView" );
o_vout_view = [o_window getVoutView]; o_vout_view = [o_window getVoutView];
...@@ -899,7 +899,7 @@ ...@@ -899,7 +899,7 @@
while( (o_window = [o_enumerator nextObject])) while( (o_window = [o_enumerator nextObject]))
{ {
if( [[o_window className] isEqualToString: @"VLCWindow"] || if( [[o_window className] isEqualToString: @"VLCVoutWindow"] ||
[[[VLCMain sharedInstance] getEmbeddedList] [[[VLCMain sharedInstance] getEmbeddedList]
windowContainsEmbedded: o_window]) windowContainsEmbedded: o_window])
{ {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* VLCEmbeddedWindow interface * VLCEmbeddedWindow interface
*****************************************************************************/ *****************************************************************************/
#import "misc.h"
@interface VLCEmbeddedWindow : NSWindow @interface VLCEmbeddedWindow : NSWindow
{ {
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
IBOutlet id o_btn_play; IBOutlet id o_btn_play;
IBOutlet id o_slider; IBOutlet id o_slider;
IBOutlet id o_time; IBOutlet id o_time;
IBOutlet id o_view;
NSImage * o_img_play; NSImage * o_img_play;
NSImage * o_img_play_pressed; NSImage * o_img_play_pressed;
...@@ -41,6 +43,15 @@ ...@@ -41,6 +43,15 @@
NSImage * o_img_pause_pressed; NSImage * o_img_pause_pressed;
NSRect o_saved_frame; NSRect o_saved_frame;
VLCWindow * o_fullscreen_window;
NSViewAnimation * o_fullscreen_anim1;
NSViewAnimation * o_fullscreen_anim2;
NSView * o_temp_view;
/* set to yes if we are fullscreen and all animations are over */
BOOL b_fullscreen;
BOOL b_animation_lock_alreadylocked;
NSRecursiveLock * o_animation_lock;
} }
- (void)setTime:(NSString *)o_arg_ime position:(float)f_position; - (void)setTime:(NSString *)o_arg_ime position:(float)f_position;
...@@ -48,5 +59,20 @@ ...@@ -48,5 +59,20 @@
- (void)setSeekable:(BOOL)b_seekable; - (void)setSeekable:(BOOL)b_seekable;
- (void)setFullscreen:(BOOL)b_fullscreen; - (void)setFullscreen:(BOOL)b_fullscreen;
- (BOOL)isFullscreen;
- (void)lockFullscreenAnimation;
- (void)unlockFullscreenAnimation;
- (void)enterFullscreen;
- (void)leaveFullscreen;
/* Allows to leave fullscreen by simply fading out the display */
- (void)leaveFullscreenAndFadeOut: (BOOL)fadeout;
/* private */
- (void)hasEndedFullscreen;
- (void)hasBecomeFullscreen;
- (void)setFrameOnMainThread:(NSData*)packedargs;
@end @end
...@@ -25,9 +25,13 @@ ...@@ -25,9 +25,13 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
/* DisableScreenUpdates, SetSystemUIMode, ... */
#import <QuickTime/QuickTime.h>
#include "intf.h" #include "intf.h"
#include "vout.h" #include "vout.h"
#include "embeddedwindow.h" #include "embeddedwindow.h"
#import "fspanel.h"
/***************************************************************************** /*****************************************************************************
* VLCEmbeddedWindow Implementation * VLCEmbeddedWindow Implementation
...@@ -51,6 +55,22 @@ ...@@ -51,6 +55,22 @@
o_img_pause_pressed = [NSImage imageNamed: @"pause_embedded_blue"]; o_img_pause_pressed = [NSImage imageNamed: @"pause_embedded_blue"];
o_saved_frame = NSMakeRect( 0.0f, 0.0f, 0.0f, 0.0f ); o_saved_frame = NSMakeRect( 0.0f, 0.0f, 0.0f, 0.0f );
/* Useful to save o_view frame in fullscreen mode */
o_temp_view = [[NSView alloc] init];
[o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
o_fullscreen_window = nil;
o_fullscreen_anim1 = o_fullscreen_anim2 = nil;
/* Not fullscreen when we wake up */
[o_btn_fullscreen setState: NO];
b_fullscreen = NO;
/* Use a recursive lock to be able to trigger enter/leavefullscreen
* in middle of an animation, providing that the enter/leave functions
* are called from the same thread */
o_animation_lock = [[NSRecursiveLock alloc] init];
b_animation_lock_alreadylocked = NO;
} }
- (void)setTime:(NSString *)o_arg_time position:(float)f_position - (void)setTime:(NSString *)o_arg_time position:(float)f_position
...@@ -121,4 +141,212 @@ ...@@ -121,4 +141,212 @@
return YES; return YES;
} }
/*****************************************************************************
* Fullscreen support
*/
- (BOOL)isFullscreen
{
return b_fullscreen;
}
- (void)lockFullscreenAnimation
{
[o_animation_lock lock];
}
- (void)unlockFullscreenAnimation
{
[o_animation_lock unlock];
}
- (void)enterFullscreen
{
NSMutableDictionary *dict1, *dict2;
NSScreen *screen;
NSRect screen_rect;
NSRect rect;
vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
BOOL blackout_other_displays = var_GetBool( p_vout, "macosx-black" );
screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_GetInteger( p_vout, "video-device" )];
vlc_object_release( p_vout );
[self lockFullscreenAnimation];
if (!screen)
screen = [self screen];
screen_rect = [screen frame];
[o_btn_fullscreen setState: YES];
[NSCursor setHiddenUntilMouseMoves: YES];
/* Only create the o_fullscreen_window if we are not in the middle of the zooming animation */
if (!o_fullscreen_window)
{
/* We can't change the styleMask of an already created NSWindow, so we create an other window, and do eye catching stuff */
rect = [[o_view superview] convertRect: [o_view frame] toView: nil]; /* Convert to Window base coord */
rect.origin.x += [self frame].origin.x;
rect.origin.y += [self frame].origin.y;
o_fullscreen_window = [[VLCWindow alloc] initWithContentRect:rect styleMask: NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
[o_fullscreen_window setBackgroundColor: [NSColor blackColor]];
[o_fullscreen_window setCanBecomeKeyWindow: YES];
CGDisplayFadeReservationToken token;
[o_fullscreen_window setFrame:screen_rect display:NO];
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
if ([screen isMainScreen])
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */
[o_view retain];
[[self contentView] replaceSubview:o_view with:o_temp_view];
[o_temp_view setFrame:[o_view frame]];
[o_fullscreen_window setContentView:o_view];
[o_view release];
[o_fullscreen_window makeKeyAndOrderFront:self];
CGDisplayFade( token, 0.5, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, NO );
CGReleaseDisplayFadeReservation( token);
/* Will release the lock */
[self hasBecomeFullscreen];
return;
}
if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
}
- (void)hasBecomeFullscreen
{
[o_fullscreen_window makeFirstResponder: [[[VLCMain sharedInstance] getControls] getVoutView]];
[o_fullscreen_window makeKeyWindow];
[o_fullscreen_window setAcceptsMouseMovedEvents: TRUE];
/* tell the fspanel to move itself to front next time it's triggered */
[[[[VLCMain sharedInstance] getControls] getFSPanel] setVoutWasUpdated: (int)[[o_fullscreen_window screen] displayID]];
[super orderOut: self];
[[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
b_fullscreen = YES;
[self unlockFullscreenAnimation];
}
- (void)leaveFullscreen
{
[self leaveFullscreenAndFadeOut: NO];
}
- (void)leaveFullscreenAndFadeOut: (BOOL)fadeout
{
NSMutableDictionary *dict1, *dict2;
NSRect frame;
[self lockFullscreenAnimation];
b_fullscreen = NO;
[o_btn_fullscreen setState: NO];
/* Don't do anything if o_fullscreen_window is already closed */
if (!o_fullscreen_window)
{
/* We always try to do so */
[NSScreen unblackoutScreens];
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
return;
}
/* simply fade the display */
CGDisplayFadeReservationToken token;
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
CGDisplayFade( token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, YES );
[[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
/* We always try to do so */
[NSScreen unblackoutScreens];
if (!fadeout)
[self orderFront: self];
/* Will release the lock */
[self hasEndedFullscreen];
CGDisplayFade( token, 0.5, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, NO );
CGReleaseDisplayFadeReservation( token);
}
- (void)hasEndedFullscreen
{
/* This function is private and should be only triggered at the end of the fullscreen change animation */
/* Make sure we don't see the o_view disappearing of the screen during this operation */
DisableScreenUpdates();
[o_view retain];
[o_view removeFromSuperviewWithoutNeedingDisplay];
[[self contentView] replaceSubview:o_temp_view with:o_view];
[o_view release];
[o_view setFrame:[o_temp_view frame]];
[self makeFirstResponder: o_view];
if ([self isVisible])
[self makeKeyAndOrderFront:self];
[o_fullscreen_window orderOut: self];
EnableScreenUpdates();
[o_fullscreen_window release];
o_fullscreen_window = nil;
b_animation_lock_alreadylocked = NO;
[self unlockFullscreenAnimation];
}
- (void)orderOut: (id)sender
{
[super orderOut: sender];
/* Make sure we leave fullscreen */
[self leaveFullscreenAndFadeOut: YES];
}
/* Make sure setFrame gets executed on main thread especially if we are animating.
* (Thus we won't block the video output thread) */
- (void)setFrame:(NSRect)frame display:(BOOL)display animate:(BOOL)animate
{
struct { NSRect frame; BOOL display; BOOL animate;} args;
NSData *packedargs;
args.frame = frame;
args.display = display;
args.animate = animate;
packedargs = [NSData dataWithBytes:&args length:sizeof(args)];
[self performSelectorOnMainThread:@selector(setFrameOnMainThread:)
withObject: packedargs waitUntilDone: YES];
}
- (void)setFrameOnMainThread:(NSData*)packedargs
{
struct args { NSRect frame; BOOL display; BOOL animate; } * args = (struct args*)[packedargs bytes];
[super setFrame: args->frame display: args->display animate:args->animate];
}
@end @end
...@@ -366,7 +366,7 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -366,7 +366,7 @@ static VLCExtended *_o_sharedInstance = nil;
while ((o_window = [o_enumerator nextObject])) while ((o_window = [o_enumerator nextObject]))
{ {
if( [[o_window className] isEqualToString: @"VLCWindow"] || if( [[o_window className] isEqualToString: @"VLCVoutWindow"] ||
[[[VLCMain sharedInstance] getEmbeddedList] [[[VLCMain sharedInstance] getEmbeddedList]
windowContainsEmbedded: o_window]) windowContainsEmbedded: o_window])
{ {
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
while( ( o_window = [o_enum nextObject] ) ) while( ( o_window = [o_enum nextObject] ) )
{ {
if( [[o_window className] isEqualToString: @"VLCWindow"] ) if( [[o_window className] isEqualToString: @"VLCVoutWindow"] )
{ {
vlc_object_release( (vlc_object_t *)p_vout ); vlc_object_release( (vlc_object_t *)p_vout );
break; break;
......
...@@ -475,8 +475,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -475,8 +475,6 @@ static VLCMain *_o_sharedMainInstance = nil;
var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self); var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self);
var_AddCallback( p_playlist, "intf-show", ShowController, self); var_AddCallback( p_playlist, "intf-show", ShowController, self);
[o_embedded_window setFullscreen: var_GetBool( p_playlist,
"fullscreen" )];
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
......
...@@ -21,6 +21,37 @@ ...@@ -21,6 +21,37 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
/*****************************************************************************
* NSScreen (VLCAdditions)
*
* Missing extension to NSScreen
*****************************************************************************/
@interface NSScreen (VLCAdditions)
+ (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
- (BOOL)isMainScreen;
- (BOOL)isScreen: (NSScreen*)screen;
- (CGDirectDisplayID)displayID;
- (void)blackoutOtherScreens;
+ (void)unblackoutScreens;
@end
/*****************************************************************************
* VLCWindow
*
* Missing extension to NSWindow
*****************************************************************************/
@interface VLCWindow : NSWindow
{
BOOL b_canBecomeKeyWindow;
BOOL b_isset_canBecomeKeyWindow;
}
- (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey;
@end
/***************************************************************************** /*****************************************************************************
* VLCControllerWindow * VLCControllerWindow
*****************************************************************************/ *****************************************************************************/
......
...@@ -28,6 +28,130 @@ ...@@ -28,6 +28,130 @@
#include "playlist.h" #include "playlist.h"
#include "controls.h" #include "controls.h"
/*****************************************************************************
* NSScreen (VLCAdditions)
*
* Missing extension to NSScreen
*****************************************************************************/
@implementation NSScreen (VLCAdditions)
static NSMutableArray *blackoutWindows = NULL;
+ (void)load
{
/* init our fake object attribute */
blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1];
}
+ (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID
{
int i;
for( i = 0; i < [[NSScreen screens] count]; i++ )
{
NSScreen *screen = [[NSScreen screens] objectAtIndex: i];
if([screen displayID] == displayID)
return screen;
}
return nil;
}
- (BOOL)isMainScreen
{
return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
}
- (BOOL)isScreen: (NSScreen*)screen
{
return ([self displayID] == [screen displayID]);
}
- (CGDirectDisplayID)displayID
{
return (CGDirectDisplayID)_screenNumber;
}
- (void)blackoutOtherScreens
{
unsigned int i;
/* Free our previous blackout window (follow blackoutWindow alloc strategy) */
[blackoutWindows makeObjectsPerformSelector:@selector(close)];
[blackoutWindows removeAllObjects];
for(i = 0; i < [[NSScreen screens] count]; i++)
{
NSScreen *screen = [[NSScreen screens] objectAtIndex: i];
VLCWindow *blackoutWindow;
NSRect screen_rect;
if([self isScreen: screen])
continue;
screen_rect = [screen frame];
screen_rect.origin.x = screen_rect.origin.y = 0.0f;
/* blackoutWindow alloc strategy
- The NSMutableArray blackoutWindows has the blackoutWindow references
- blackoutOtherDisplays is responsible for alloc/releasing its Windows
*/
blackoutWindow = [[VLCWindow alloc] initWithContentRect: screen_rect styleMask: NSBorderlessWindowMask
backing: NSBackingStoreBuffered defer: NO screen: screen];
[blackoutWindow setBackgroundColor:[NSColor blackColor]];
[blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */
[blackoutWindow orderFront: self];
[blackoutWindows addObject: blackoutWindow];
[blackoutWindow release];
}
}
+ (void)unblackoutScreens
{
unsigned int i;
for(i = 0; i < [blackoutWindows count]; i++)
{
VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i];
[blackoutWindow close];
}
}
@end
/*****************************************************************************
* VLCWindow
*
* Missing extension to NSWindow
*****************************************************************************/
@implementation VLCWindow
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask
backing:(NSBackingStoreType)backingType defer:(BOOL)flag
{
self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag];
if( self )
b_isset_canBecomeKeyWindow = NO;
return self;
}
- (void)setCanBecomeKeyWindow: (BOOL)canBecomeKey
{
b_isset_canBecomeKeyWindow = YES;
b_canBecomeKeyWindow = canBecomeKey;
}
- (BOOL)canBecomeKeyWindow
{
if(b_isset_canBecomeKeyWindow)
return b_canBecomeKeyWindow;
return [super canBecomeKeyWindow];
}
@end
/***************************************************************************** /*****************************************************************************
* VLCControllerWindow * VLCControllerWindow
*****************************************************************************/ *****************************************************************************/
......
...@@ -44,12 +44,16 @@ ...@@ -44,12 +44,16 @@
/***************************************************************************** /*****************************************************************************
* VLCVoutView interface * VLCVoutView interface
*****************************************************************************/ *****************************************************************************/
@protocol VLCVoutViewResetting
+ (void)resetVout: (vout_thread_t *)p_vout;
@end
@interface VLCVoutView : NSView @interface VLCVoutView : NSView
{ {
vout_thread_t * p_vout; vout_thread_t * p_vout;
NSView * o_view;
NSRect * s_frame; NSRect * s_frame;
NSView <VLCVoutViewResetting> * o_view;
vout_thread_t * p_real_vout; vout_thread_t * p_real_vout;
id o_window; id o_window;
} }
...@@ -70,6 +74,8 @@ ...@@ -70,6 +74,8 @@
frame: (NSRect *) s_frame; frame: (NSRect *) s_frame;
+ (vout_thread_t *)getRealVout: (vout_thread_t *)p_vout; + (vout_thread_t *)getRealVout: (vout_thread_t *)p_vout;
- (void)enterFullscreen;
- (void)leaveFullscreen;
@end @end
/***************************************************************************** /*****************************************************************************
...@@ -105,14 +111,15 @@ ...@@ -105,14 +111,15 @@
@interface VLCDetachedEmbeddedVoutView : VLCEmbeddedVoutView @interface VLCDetachedEmbeddedVoutView : VLCEmbeddedVoutView
{ {
id o_embeddedwindow;
} }
@end @end
/***************************************************************************** /*****************************************************************************
* VLCWindow interface * VLCVoutWindow interface
*****************************************************************************/ *****************************************************************************/
@interface VLCWindow : NSWindow @interface VLCVoutWindow : NSWindow
{ {
vout_thread_t * p_vout; vout_thread_t * p_vout;
VLCVoutView * o_view; VLCVoutView * o_view;
......
...@@ -112,9 +112,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -112,9 +112,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (BOOL)windowContainsEmbedded: (id)o_window - (BOOL)windowContainsEmbedded: (id)o_window
{ {
/* if( ![[o_window className] isEqualToString: @"VLCWindow"] ) /* if( ![[o_window className] isEqualToString: @"VLCVoutWindow"] )
{ {
NSLog( @"We were not given a VLCWindow" ); NSLog( @"We were not given a VLCVoutWindow" );
}*/ }*/
return ([self getViewForWindow: o_window] == nil ? NO : YES ); return ([self getViewForWindow: o_window] == nil ? NO : YES );
} }
...@@ -373,11 +373,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -373,11 +373,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
var_Get( p_real_vout, "fullscreen", &val ); var_Get( p_real_vout, "fullscreen", &val );
val.b_bool = !val.b_bool; val.b_bool = !val.b_bool;
var_Set( p_real_vout, "fullscreen", val ); var_Set( p_real_vout, "fullscreen", val );
if( [self isFullscreen] )
[[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
else
[[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
} }
- (BOOL)isFullscreen - (BOOL)isFullscreen
...@@ -713,6 +708,18 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -713,6 +708,18 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
return o_return; return o_return;
} }
- (void)enterFullscreen
{
[[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES];
[[[[VLCMain sharedInstance] getControls] getFSPanel] setActive: nil];
}
- (void)leaveFullscreen
{
[[o_view class] performSelectorOnMainThread:@selector(resetVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES];
[[[[VLCMain sharedInstance] getControls] getFSPanel] setNonActive: nil];
}
@end @end
/***************************************************************************** /*****************************************************************************
...@@ -732,7 +739,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -732,7 +739,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
{ {
BOOL b_return = [super setVout: p_arg_vout subView: view frame:s_arg_frame]; BOOL b_return = [super setVout: p_arg_vout subView: view frame:s_arg_frame];
i_time_mouse_last_moved = mdate(); i_time_mouse_last_moved = mdate();
o_window = [[VLCWindow alloc] initWithVout: p_arg_vout view: self o_window = [[VLCVoutWindow alloc] initWithVout: p_arg_vout view: self
frame: s_arg_frame]; frame: s_arg_frame];
[self updateTitle]; [self updateTitle];
[view setFrame: [self frame]]; [view setFrame: [self frame]];
...@@ -861,6 +868,10 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -861,6 +868,10 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
@end @end
@implementation VLCDetachedEmbeddedVoutView @implementation VLCDetachedEmbeddedVoutView
- (void)awakeFromNib
{
o_embeddedwindow = [self window];
}
- (BOOL)setVout: (vout_thread_t *) p_arg_vout subView: (NSView *) view - (BOOL)setVout: (vout_thread_t *) p_arg_vout subView: (NSView *) view
frame: (NSRect *) s_arg_frame frame: (NSRect *) s_arg_frame
...@@ -883,12 +894,23 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -883,12 +894,23 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[super closeVout]; [super closeVout];
} }
- (void)enterFullscreen
{
/* We are in a VLCEmbeddedWindow */
[o_embeddedwindow performSelectorOnMainThread: @selector(enterFullscreen) withObject: NULL waitUntilDone: YES];
}
- (void)leaveFullscreen
{
/* We are in a VLCEmbeddedWindow */
[o_embeddedwindow performSelectorOnMainThread: @selector(leaveFullscreen) withObject: NULL waitUntilDone: YES];
}
@end @end
/***************************************************************************** /*****************************************************************************
* VLCWindow implementation * VLCVoutWindow implementation
*****************************************************************************/ *****************************************************************************/
@implementation VLCWindow @implementation VLCVoutWindow
- (id) initWithVout: (vout_thread_t *) vout view: (VLCVoutView *) view - (id) initWithVout: (vout_thread_t *) vout view: (VLCVoutView *) view
frame: (NSRect *) frame frame: (NSRect *) frame
......
...@@ -46,11 +46,12 @@ ...@@ -46,11 +46,12 @@
/***************************************************************************** /*****************************************************************************
* VLCView interface * VLCView interface
*****************************************************************************/ *****************************************************************************/
@interface VLCGLView : NSOpenGLView @interface VLCGLView : NSOpenGLView <VLCVoutViewResetting>
{ {
vout_thread_t * p_vout; vout_thread_t * p_vout;
} }
+ (void)resetVout: (vout_thread_t *)p_vout;
- (id) initWithVout: (vout_thread_t *) p_vout; - (id) initWithVout: (vout_thread_t *) p_vout;
@end @end
...@@ -243,22 +244,12 @@ static int Manage( vout_thread_t * p_vout ) ...@@ -243,22 +244,12 @@ static int Manage( vout_thread_t * p_vout )
{ {
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
if( !p_vout->b_fullscreen )
{
/* Save window size and position */
p_vout->p_sys->s_frame.size =
[p_vout->p_sys->o_vout_view frame].size;
p_vout->p_sys->s_frame.origin =
[[p_vout->p_sys->o_vout_view getWindow ]frame].origin;
p_vout->p_sys->b_saved_frame = VLC_TRUE;
}
[p_vout->p_sys->o_vout_view performSelectorOnMainThread:@selector(closeVout) withObject:NULL waitUntilDone:YES];
p_vout->b_fullscreen = !p_vout->b_fullscreen; p_vout->b_fullscreen = !p_vout->b_fullscreen;
[VLCGLView performSelectorOnMainThread:@selector(initVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES]; if( p_vout->b_fullscreen )
[p_vout->p_sys->o_vout_view enterFullscreen];
[[p_vout->p_sys->o_glview openGLContext] makeCurrentContext]; else
[p_vout->p_sys->o_vout_view leaveFullscreen];
[o_pool release]; [o_pool release];
...@@ -338,6 +329,42 @@ static void Unlock( vout_thread_t * p_vout ) ...@@ -338,6 +329,42 @@ static void Unlock( vout_thread_t * p_vout )
frame: frame]; frame: frame];
} }
/* This function will reset the o_vout_view. It's useful to go fullscreen. */
+ (void)resetVout:(NSData *)arg
{
vout_thread_t * p_vout = [arg pointerValue];
if( p_vout->b_fullscreen )
{
/* Save window size and position */
p_vout->p_sys->s_frame.size =
[p_vout->p_sys->o_vout_view frame].size;
p_vout->p_sys->s_frame.origin =
[[p_vout->p_sys->o_vout_view getWindow ]frame].origin;
p_vout->p_sys->b_saved_frame = VLC_TRUE;
}
[p_vout->p_sys->o_vout_view closeVout];
#define o_glview p_vout->p_sys->o_glview
o_glview = [[VLCGLView alloc] initWithVout: p_vout];
[o_glview autorelease];
if( p_vout->p_sys->b_saved_frame )
{
p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout
subView: o_glview
frame: &p_vout->p_sys->s_frame];
}
else
{
p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout
subView: o_glview frame: nil];
}
#undef o_glview
}
- (id) initWithVout: (vout_thread_t *) vout - (id) initWithVout: (vout_thread_t *) vout
{ {
p_vout = vout; p_vout = vout;
......
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