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
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = ITSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; },
{CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; },
{CLASS = VLBrushedMetalImageView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
{CLASS = VLCApplication; LANGUAGE = ObjC; SUPERCLASS = NSApplication; },
{CLASS = VLCControllerView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = VLCControllerWindow; LANGUAGE = ObjC; SUPERCLASS = NSWindow; },
{
ACTIONS = {
backward = id;
faster = id;
forward = id;
goToSpecificTime = id;
loop = id;
mute = id;
next = id;
pause = id;
play = id;
position = id;
prev = id;
random = id;
repeat = id;
repeatButtonAction = id;
slower = id;
stop = id;
toggleVar = id;
volumeDown = id;
volumeSliderUpdated = id;
volumeUp = id;
windowAction = id;
};
CLASS = VLCControls;
LANGUAGE = ObjC;
OUTLETS = {
"o_btn_addNode" = id;
"o_btn_repeat" = id;
"o_btn_shuffle" = id;
"o_fs_panel" = id;
"o_main" = id;
"o_specificTime_cancel_btn" = id;
"o_specificTime_enter_fld" = id;
"o_specificTime_goTo_lbl" = id;
"o_specificTime_mi" = id;
"o_specificTime_ok_btn" = id;
"o_specificTime_sec_lbl" = id;
"o_specificTime_stepper" = id;
"o_specificTime_win" = id;
"o_volumeslider" = id;
};
SUPERCLASS = NSObject;
},
{
CLASS = VLCDetachedEmbeddedVoutView;
LANGUAGE = ObjC;
SUPERCLASS = VLCEmbeddedVoutView;
},
{CLASS = VLCEmbeddedVoutView; LANGUAGE = ObjC; SUPERCLASS = VLCVoutView; },
{
CLASS = VLCEmbeddedWindow;
LANGUAGE = ObjC;
OUTLETS = {
"o_btn_backward" = id;
"o_btn_forward" = id;
"o_btn_fullscreen" = id;
"o_btn_play" = id;
"o_slider" = id;
"o_time" = id;
};
SUPERCLASS = NSWindow;
},
{
ACTIONS = {
bandSliderUpdated = id;
changePreset = id;
enable = id;
preampSliderUpdated = id;
toggleWindow = id;
twopass = id;
};
CLASS = VLCEqualizer;
LANGUAGE = ObjC;
OUTLETS = {
"o_btn_equalizer" = id;
"o_ckb_2pass" = id;
"o_ckb_enable" = id;
"o_fld_preamp" = id;
"o_popup_presets" = id;
"o_slider_band1" = id;
"o_slider_band10" = id;
"o_slider_band2" = id;
"o_slider_band3" = id;
"o_slider_band4" = id;
"o_slider_band5" = id;
"o_slider_band6" = id;
"o_slider_band7" = id;
"o_slider_band8" = id;
"o_slider_band9" = id;
"o_slider_preamp" = id;
"o_window" = id;
};
SUPERCLASS = NSObject;
},
{CLASS = VLCFSPanel; LANGUAGE = ObjC; SUPERCLASS = NSWindow; },
{
ACTIONS = {faster = id; next = id; play = id; prev = id; slower = id; };
CLASS = VLCFSPanelView;
LANGUAGE = ObjC;
SUPERCLASS = NSView;
},
{CLASS = VLCFSTimeSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; },
{
ACTIONS = {
createOutlineGroup = id;
deleteOutlineGroup = id;
infoCancel = id;
infoOk = id;
toggleInfoPanel = id;
togglePlaylistInfoPanel = id;
};
CLASS = VLCInfo;
LANGUAGE = ObjC;
OUTLETS = {
"o_audio_box" = id;
"o_audio_decoded_lbl" = id;
"o_audio_decoded_txt" = id;
"o_author_lbl" = id;
"o_author_txt" = id;
"o_btn_cancel" = id;
"o_btn_ok" = id;
"o_collection_lbl" = id;
"o_collection_txt" = id;
"o_copyright_lbl" = id;
"o_copyright_txt" = id;
"o_date_lbl" = id;
"o_date_txt" = id;
"o_demux_bitrate_lbl" = id;
"o_demux_bitrate_txt" = id;
"o_demux_bytes_lbl" = id;
"o_demux_bytes_txt" = id;
"o_description_lbl" = id;
"o_description_txt" = id;
"o_displayed_lbl" = id;
"o_displayed_txt" = id;
"o_genre_lbl" = id;
"o_genre_txt" = id;
"o_info_window" = id;
"o_input_bitrate_lbl" = id;
"o_input_bitrate_txt" = id;
"o_input_box" = id;
"o_language_lbl" = id;
"o_language_txt" = id;
"o_lost_abuffers_lbl" = id;
"o_lost_abuffers_txt" = id;
"o_lost_frames_lbl" = id;
"o_lost_frames_txt" = id;
"o_nowPlaying_lbl" = id;
"o_nowPlaying_txt" = id;
"o_outline_view" = id;
"o_played_abuffers_lbl" = id;
"o_played_abuffers_txt" = id;
"o_publisher_lbl" = id;
"o_publisher_txt" = id;
"o_rating_lbl" = id;
"o_rating_txt" = id;
"o_read_bytes_lbl" = id;
"o_read_bytes_txt" = id;
"o_sent_bitrate_lbl" = id;
"o_sent_bitrate_txt" = id;
"o_sent_bytes_lbl" = id;
"o_sent_bytes_txt" = id;
"o_sent_packets_lbl" = id;
"o_sent_packets_txt" = id;
"o_seqNum_lbl" = id;
"o_seqNum_txt" = id;
"o_sout_box" = id;
"o_tab_view" = id;
"o_title_lbl" = id;
"o_title_txt" = id;
"o_uri_lbl" = id;
"o_uri_txt" = id;
"o_video_box" = id;
"o_video_decoded_lbl" = id;
"o_video_decoded_txt" = id;
};
SUPERCLASS = NSObject;
},
{
ACTIONS = {
checkForUpdate = id;
clearRecentItems = id;
closeError = id;
intfOpenDisc = id;
intfOpenFile = id;
intfOpenFileGeneric = id;
intfOpenNet = id;
openCrashLog = id;
openDocumentation = id;
openDonate = id;
openForum = id;
openLicense = id;
openReadMe = id;
openRecentItem = id;
openWebsite = id;
reportABug = id;
showBookmarks = id;
showExtended = id;
showWizard = id;
timesliderUpdate = id;
togglePlaylist = id;
viewAbout = id;
viewPreferences = id;
};
CLASS = VLCMain;
LANGUAGE = ObjC;
OUTLETS = {
"o_btn_ff" = id;
"o_btn_next" = id;
"o_btn_play" = id;
"o_btn_playlist" = id;
"o_btn_prev" = id;
"o_btn_rewind" = id;
"o_btn_stop" = id;
"o_controls" = id;
"o_dmi_mute" = id;
"o_dmi_next" = id;
"o_dmi_play" = id;
"o_dmi_previous" = id;
"o_dmi_stop" = id;
"o_embedded_window" = id;
"o_err_btn_dismiss" = id;
"o_err_btn_msgs" = id;
"o_err_bug_lbl" = id;
"o_err_ckbk_surpress" = id;
"o_err_lbl" = id;
"o_err_msg" = id;
"o_error" = id;
"o_info" = id;
"o_main_pgbar" = id;
"o_messages" = id;
"o_mi_about" = id;
"o_mi_add_intf" = id;
"o_mi_aspect_ratio" = id;
"o_mi_audiotrack" = id;
"o_mi_bookmarks" = id;
"o_mi_bring_atf" = id;
"o_mi_bwd" = id;
"o_mi_channels" = id;
"o_mi_chapter" = id;
"o_mi_checkForUpdate" = id;
"o_mi_clear" = id;
"o_mi_close_window" = id;
"o_mi_controller" = id;
"o_mi_copy" = id;
"o_mi_crop" = id;
"o_mi_cut" = id;
"o_mi_deinterlace" = id;
"o_mi_device" = id;
"o_mi_documentation" = id;
"o_mi_donation" = id;
"o_mi_double_window" = id;
"o_mi_equalizer" = id;
"o_mi_extended" = id;
"o_mi_faster" = id;
"o_mi_ffmpeg_pp" = id;
"o_mi_fittoscreen" = id;
"o_mi_floatontop" = id;
"o_mi_forum" = id;
"o_mi_fullscreen" = id;
"o_mi_fwd" = id;
"o_mi_half_window" = id;
"o_mi_hide" = id;
"o_mi_hide_others" = id;
"o_mi_info" = id;
"o_mi_license" = id;
"o_mi_loop" = id;
"o_mi_messages" = id;
"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;
"o_mi_open_net" = id;
"o_mi_open_recent" = id;
"o_mi_open_recent_cm" = id;
"o_mi_paste" = id;
"o_mi_play" = id;
"o_mi_playlist" = id;
"o_mi_prefs" = id;
"o_mi_previous" = id;
"o_mi_program" = id;
"o_mi_quit" = id;
"o_mi_random" = id;
"o_mi_readme" = id;
"o_mi_repeat" = id;
"o_mi_reportabug" = id;
"o_mi_screen" = id;
"o_mi_select_all" = id;
"o_mi_services" = id;
"o_mi_show_all" = id;
"o_mi_slower" = id;
"o_mi_snapshot" = id;
"o_mi_stop" = id;
"o_mi_subtitle" = id;
"o_mi_title" = id;
"o_mi_videotrack" = id;
"o_mi_visual" = id;
"o_mi_vol_down" = id;
"o_mi_vol_up" = id;
"o_mi_website" = id;
"o_msgs_btn_crashlog" = id;
"o_msgs_panel" = id;
"o_mu_add_intf" = id;
"o_mu_aspect_ratio" = id;
"o_mu_audio" = id;
"o_mu_audiotrack" = id;
"o_mu_channels" = id;
"o_mu_chapter" = id;
"o_mu_controls" = id;
"o_mu_crop" = id;
"o_mu_deinterlace" = id;
"o_mu_device" = id;
"o_mu_edit" = id;
"o_mu_ffmpeg_pp" = id;
"o_mu_file" = id;
"o_mu_help" = id;
"o_mu_program" = id;
"o_mu_screen" = id;
"o_mu_subtitle" = id;
"o_mu_title" = id;
"o_mu_video" = id;
"o_mu_videotrack" = id;
"o_mu_visual" = id;
"o_mu_window" = id;
"o_playlist" = id;
"o_playlist_view" = id;
"o_scrollfield" = id;
"o_timefield" = id;
"o_timeslider" = id;
"o_vmi_fullscreen" = id;
"o_vmi_mute" = id;
"o_vmi_next" = id;
"o_vmi_play" = id;
"o_vmi_prev" = id;
"o_vmi_snapshot" = id;
"o_vmi_stop" = id;
"o_vmi_voldown" = id;
"o_vmi_volup" = id;
"o_volumeslider" = id;
"o_vout_menu" = id;
"o_window" = id;
};
SUPERCLASS = NSObject;
},
{
ACTIONS = {
addNode = id;
deleteItem = id;
playItem = id;
preparseItem = id;
recursiveExpandNode = id;
savePlaylist = id;
searchItem = id;
selectAll = id;
sortNodeByAuthor = id;
sortNodeByName = id;
};
CLASS = VLCPlaylist;
LANGUAGE = ObjC;
OUTLETS = {
"o_btn_addNode" = id;
"o_controller" = id;
"o_ctx_menu" = id;
"o_mi_addNode" = id;
"o_mi_delete" = id;
"o_mi_info" = id;
"o_mi_play" = id;
"o_mi_preparse" = id;
"o_mi_recursive_expand" = id;
"o_mi_save_playlist" = id;
"o_mi_selectall" = id;
"o_mi_services" = id;
"o_mi_sort_author" = id;
"o_mi_sort_name" = id;
"o_mm_mi_services" = id;
"o_mm_mu_services" = id;
"o_mu_services" = id;
"o_outline_view" = id;
"o_playlist_view" = id;
"o_random_ckb" = id;
"o_save_accessory_popup" = id;
"o_save_accessory_text" = id;
"o_save_accessory_view" = id;
"o_search_field" = id;
"o_status_field" = id;
"o_tc_author" = id;
"o_tc_duration" = id;
"o_tc_name" = id;
};
SUPERCLASS = NSObject;
},
{CLASS = VLCPlaylistView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
{CLASS = VLCTimeField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
{CLASS = VLCVoutView; LANGUAGE = ObjC; SUPERCLASS = NSView; }
);
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>VLCTimeField</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSTextField</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCControllerView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCEmbeddedWindow</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_backward</key>
<string>id</string>
<key>o_btn_forward</key>
<string>id</string>
<key>o_btn_fullscreen</key>
<string>id</string>
<key>o_btn_play</key>
<string>id</string>
<key>o_slider</key>
<string>id</string>
<key>o_time</key>
<string>id</string>
<key>o_view</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSWindow</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>checkForUpdate</key>
<string>id</string>
<key>clearRecentItems</key>
<string>id</string>
<key>closeError</key>
<string>id</string>
<key>intfOpenDisc</key>
<string>id</string>
<key>intfOpenFile</key>
<string>id</string>
<key>intfOpenFileGeneric</key>
<string>id</string>
<key>intfOpenNet</key>
<string>id</string>
<key>openCrashLog</key>
<string>id</string>
<key>openDocumentation</key>
<string>id</string>
<key>openDonate</key>
<string>id</string>
<key>openForum</key>
<string>id</string>
<key>openLicense</key>
<string>id</string>
<key>openReadMe</key>
<string>id</string>
<key>openRecentItem</key>
<string>id</string>
<key>openWebsite</key>
<string>id</string>
<key>reportABug</key>
<string>id</string>
<key>showBookmarks</key>
<string>id</string>
<key>showExtended</key>
<string>id</string>
<key>showWizard</key>
<string>id</string>
<key>timesliderUpdate</key>
<string>id</string>
<key>togglePlaylist</key>
<string>id</string>
<key>viewAbout</key>
<string>id</string>
<key>viewPreferences</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCMain</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_btn_ff</key>
<string>id</string>
<key>o_btn_next</key>
<string>id</string>
<key>o_btn_play</key>
<string>id</string>
<key>o_btn_playlist</key>
<string>id</string>
<key>o_btn_prev</key>
<string>id</string>
<key>o_btn_rewind</key>
<string>id</string>
<key>o_btn_stop</key>
<string>id</string>
<key>o_controls</key>
<string>id</string>
<key>o_dmi_mute</key>
<string>id</string>
<key>o_dmi_next</key>
<string>id</string>
<key>o_dmi_play</key>
<string>id</string>
<key>o_dmi_previous</key>
<string>id</string>
<key>o_dmi_stop</key>
<string>id</string>
<key>o_embedded_window</key>
<string>id</string>
<key>o_err_btn_dismiss</key>
<string>id</string>
<key>o_err_btn_msgs</key>
<string>id</string>
<key>o_err_bug_lbl</key>
<string>id</string>
<key>o_err_ckbk_surpress</key>
<string>id</string>
<key>o_err_lbl</key>
<string>id</string>
<key>o_err_msg</key>
<string>id</string>
<key>o_error</key>
<string>id</string>
<key>o_info</key>
<string>id</string>
<key>o_main_pgbar</key>
<string>id</string>
<key>o_messages</key>
<string>id</string>
<key>o_mi_about</key>
<string>id</string>
<key>o_mi_add_intf</key>
<string>id</string>
<key>o_mi_aspect_ratio</key>
<string>id</string>
<key>o_mi_audiotrack</key>
<string>id</string>
<key>o_mi_bookmarks</key>
<string>id</string>
<key>o_mi_bring_atf</key>
<string>id</string>
<key>o_mi_bwd</key>
<string>id</string>
<key>o_mi_channels</key>
<string>id</string>
<key>o_mi_chapter</key>
<string>id</string>
<key>o_mi_checkForUpdate</key>
<string>id</string>
<key>o_mi_clear</key>
<string>id</string>
<key>o_mi_close_window</key>
<string>id</string>
<key>o_mi_controller</key>
<string>id</string>
<key>o_mi_copy</key>
<string>id</string>
<key>o_mi_crop</key>
<string>id</string>
<key>o_mi_cut</key>
<string>id</string>
<key>o_mi_deinterlace</key>
<string>id</string>
<key>o_mi_device</key>
<string>id</string>
<key>o_mi_documentation</key>
<string>id</string>
<key>o_mi_donation</key>
<string>id</string>
<key>o_mi_double_window</key>
<string>id</string>
<key>o_mi_equalizer</key>
<string>id</string>
<key>o_mi_extended</key>
<string>id</string>
<key>o_mi_faster</key>
<string>id</string>
<key>o_mi_ffmpeg_pp</key>
<string>id</string>
<key>o_mi_fittoscreen</key>
<string>id</string>
<key>o_mi_floatontop</key>
<string>id</string>
<key>o_mi_forum</key>
<string>id</string>
<key>o_mi_fullscreen</key>
<string>id</string>
<key>o_mi_fwd</key>
<string>id</string>
<key>o_mi_half_window</key>
<string>id</string>
<key>o_mi_hide</key>
<string>id</string>
<key>o_mi_hide_others</key>
<string>id</string>
<key>o_mi_info</key>
<string>id</string>
<key>o_mi_license</key>
<string>id</string>
<key>o_mi_loop</key>
<string>id</string>
<key>o_mi_messages</key>
<string>id</string>
<key>o_mi_minimize</key>
<string>id</string>
<key>o_mi_mute</key>
<string>id</string>
<key>o_mi_next</key>
<string>id</string>
<key>o_mi_normal_window</key>
<string>id</string>
<key>o_mi_open_disc</key>
<string>id</string>
<key>o_mi_open_file</key>
<string>id</string>
<key>o_mi_open_generic</key>
<string>id</string>
<key>o_mi_open_net</key>
<string>id</string>
<key>o_mi_open_recent</key>
<string>id</string>
<key>o_mi_open_recent_cm</key>
<string>id</string>
<key>o_mi_paste</key>
<string>id</string>
<key>o_mi_play</key>
<string>id</string>
<key>o_mi_playlist</key>
<string>id</string>
<key>o_mi_prefs</key>
<string>id</string>
<key>o_mi_previous</key>
<string>id</string>
<key>o_mi_program</key>
<string>id</string>
<key>o_mi_quit</key>
<string>id</string>
<key>o_mi_random</key>
<string>id</string>
<key>o_mi_readme</key>
<string>id</string>
<key>o_mi_repeat</key>
<string>id</string>
<key>o_mi_reportabug</key>
<string>id</string>
<key>o_mi_screen</key>
<string>id</string>
<key>o_mi_select_all</key>
<string>id</string>
<key>o_mi_services</key>
<string>id</string>
<key>o_mi_show_all</key>
<string>id</string>
<key>o_mi_slower</key>
<string>id</string>
<key>o_mi_snapshot</key>
<string>id</string>
<key>o_mi_stop</key>
<string>id</string>
<key>o_mi_subtitle</key>
<string>id</string>
<key>o_mi_title</key>
<string>id</string>
<key>o_mi_videotrack</key>
<string>id</string>
<key>o_mi_visual</key>
<string>id</string>
<key>o_mi_vol_down</key>
<string>id</string>
<key>o_mi_vol_up</key>
<string>id</string>
<key>o_mi_website</key>
<string>id</string>
<key>o_msgs_btn_crashlog</key>
<string>id</string>
<key>o_msgs_panel</key>
<string>id</string>
<key>o_mu_add_intf</key>
<string>id</string>
<key>o_mu_aspect_ratio</key>
<string>id</string>
<key>o_mu_audio</key>
<string>id</string>
<key>o_mu_audiotrack</key>
<string>id</string>
<key>o_mu_channels</key>
<string>id</string>
<key>o_mu_chapter</key>
<string>id</string>
<key>o_mu_controls</key>
<string>id</string>
<key>o_mu_crop</key>
<string>id</string>
<key>o_mu_deinterlace</key>
<string>id</string>
<key>o_mu_device</key>
<string>id</string>
<key>o_mu_edit</key>
<string>id</string>
<key>o_mu_ffmpeg_pp</key>
<string>id</string>
<key>o_mu_file</key>
<string>id</string>
<key>o_mu_help</key>
<string>id</string>
<key>o_mu_program</key>
<string>id</string>
<key>o_mu_screen</key>
<string>id</string>
<key>o_mu_subtitle</key>
<string>id</string>
<key>o_mu_title</key>
<string>id</string>
<key>o_mu_video</key>
<string>id</string>
<key>o_mu_videotrack</key>
<string>id</string>
<key>o_mu_visual</key>
<string>id</string>
<key>o_mu_window</key>
<string>id</string>
<key>o_playlist</key>
<string>id</string>
<key>o_playlist_view</key>
<string>id</string>
<key>o_scrollfield</key>
<string>id</string>
<key>o_timefield</key>
<string>id</string>
<key>o_timeslider</key>
<string>id</string>
<key>o_vmi_fullscreen</key>
<string>id</string>
<key>o_vmi_mute</key>
<string>id</string>
<key>o_vmi_next</key>
<string>id</string>
<key>o_vmi_play</key>
<string>id</string>
<key>o_vmi_prev</key>
<string>id</string>
<key>o_vmi_snapshot</key>
<string>id</string>
<key>o_vmi_stop</key>
<string>id</string>
<key>o_vmi_voldown</key>
<string>id</string>
<key>o_vmi_volup</key>
<string>id</string>
<key>o_volumeslider</key>
<string>id</string>
<key>o_vout_menu</key>
<string>id</string>
<key>o_window</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>ITSlider</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>createOutlineGroup</key>
<string>id</string>
<key>deleteOutlineGroup</key>
<string>id</string>
<key>infoCancel</key>
<string>id</string>
<key>infoOk</key>
<string>id</string>
<key>toggleInfoPanel</key>
<string>id</string>
<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"?>
<!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">
<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>
<string>446.1</string>
<key>IBLockedObjects</key>
<array/>
<string>629</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>2809</integer>
<integer>2416</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>8L127</string>
<key>IBUsesTextArchiving</key>
<true/>
<string>9B18</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
......@@ -103,7 +103,7 @@
o_vout_view = [o_embedded_vout_list getViewForWindow: o_window];
}
/* 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" );
o_vout_view = [o_window getVoutView];
......@@ -899,7 +899,7 @@
while( (o_window = [o_enumerator nextObject]))
{
if( [[o_window className] isEqualToString: @"VLCWindow"] ||
if( [[o_window className] isEqualToString: @"VLCVoutWindow"] ||
[[[VLCMain sharedInstance] getEmbeddedList]
windowContainsEmbedded: o_window])
{
......
......@@ -25,6 +25,7 @@
* VLCEmbeddedWindow interface
*****************************************************************************/
#import "misc.h"
@interface VLCEmbeddedWindow : NSWindow
{
......@@ -34,6 +35,7 @@
IBOutlet id o_btn_play;
IBOutlet id o_slider;
IBOutlet id o_time;
IBOutlet id o_view;
NSImage * o_img_play;
NSImage * o_img_play_pressed;
......@@ -41,6 +43,15 @@
NSImage * o_img_pause_pressed;
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;
......@@ -48,5 +59,20 @@
- (void)setSeekable:(BOOL)b_seekable;
- (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
......@@ -25,9 +25,13 @@
* Preamble
*****************************************************************************/
/* DisableScreenUpdates, SetSystemUIMode, ... */
#import <QuickTime/QuickTime.h>
#include "intf.h"
#include "vout.h"
#include "embeddedwindow.h"
#import "fspanel.h"
/*****************************************************************************
* VLCEmbeddedWindow Implementation
......@@ -51,6 +55,22 @@
o_img_pause_pressed = [NSImage imageNamed: @"pause_embedded_blue"];
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
......@@ -121,4 +141,212 @@
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
......@@ -366,7 +366,7 @@ static VLCExtended *_o_sharedInstance = nil;
while ((o_window = [o_enumerator nextObject]))
{
if( [[o_window className] isEqualToString: @"VLCWindow"] ||
if( [[o_window className] isEqualToString: @"VLCVoutWindow"] ||
[[[VLCMain sharedInstance] getEmbeddedList]
windowContainsEmbedded: o_window])
{
......
......@@ -132,7 +132,7 @@
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 );
break;
......
......@@ -475,8 +475,6 @@ static VLCMain *_o_sharedMainInstance = nil;
var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self);
var_AddCallback( p_playlist, "intf-show", ShowController, self);
[o_embedded_window setFullscreen: var_GetBool( p_playlist,
"fullscreen" )];
vlc_object_release( p_playlist );
}
......
......@@ -21,6 +21,37 @@
* 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
*****************************************************************************/
......
......@@ -28,6 +28,130 @@
#include "playlist.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
*****************************************************************************/
......
......@@ -44,12 +44,16 @@
/*****************************************************************************
* VLCVoutView interface
*****************************************************************************/
@protocol VLCVoutViewResetting
+ (void)resetVout: (vout_thread_t *)p_vout;
@end
@interface VLCVoutView : NSView
{
vout_thread_t * p_vout;
NSView * o_view;
NSRect * s_frame;
NSView <VLCVoutViewResetting> * o_view;
vout_thread_t * p_real_vout;
id o_window;
}
......@@ -70,6 +74,8 @@
frame: (NSRect *) s_frame;
+ (vout_thread_t *)getRealVout: (vout_thread_t *)p_vout;
- (void)enterFullscreen;
- (void)leaveFullscreen;
@end
/*****************************************************************************
......@@ -105,14 +111,15 @@
@interface VLCDetachedEmbeddedVoutView : VLCEmbeddedVoutView
{
id o_embeddedwindow;
}
@end
/*****************************************************************************
* VLCWindow interface
* VLCVoutWindow interface
*****************************************************************************/
@interface VLCWindow : NSWindow
@interface VLCVoutWindow : NSWindow
{
vout_thread_t * p_vout;
VLCVoutView * o_view;
......
......@@ -112,9 +112,9 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (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 );
}
......@@ -373,11 +373,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
var_Get( p_real_vout, "fullscreen", &val );
val.b_bool = !val.b_bool;
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
......@@ -713,6 +708,18 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
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
/*****************************************************************************
......@@ -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];
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];
[self updateTitle];
[view setFrame: [self frame]];
......@@ -861,6 +868,10 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
@end
@implementation VLCDetachedEmbeddedVoutView
- (void)awakeFromNib
{
o_embeddedwindow = [self window];
}
- (BOOL)setVout: (vout_thread_t *) p_arg_vout subView: (NSView *) view
frame: (NSRect *) s_arg_frame
......@@ -883,12 +894,23 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[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
/*****************************************************************************
* VLCWindow implementation
* VLCVoutWindow implementation
*****************************************************************************/
@implementation VLCWindow
@implementation VLCVoutWindow
- (id) initWithVout: (vout_thread_t *) vout view: (VLCVoutView *) view
frame: (NSRect *) frame
......
......@@ -46,11 +46,12 @@
/*****************************************************************************
* VLCView interface
*****************************************************************************/
@interface VLCGLView : NSOpenGLView
@interface VLCGLView : NSOpenGLView <VLCVoutViewResetting>
{
vout_thread_t * p_vout;
}
+ (void)resetVout: (vout_thread_t *)p_vout;
- (id) initWithVout: (vout_thread_t *) p_vout;
@end
......@@ -243,22 +244,12 @@ static int Manage( vout_thread_t * p_vout )
{
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;
[VLCGLView performSelectorOnMainThread:@selector(initVout:) withObject:[NSValue valueWithPointer:p_vout] waitUntilDone:YES];
[[p_vout->p_sys->o_glview openGLContext] makeCurrentContext];
if( p_vout->b_fullscreen )
[p_vout->p_sys->o_vout_view enterFullscreen];
else
[p_vout->p_sys->o_vout_view leaveFullscreen];
[o_pool release];
......@@ -338,6 +329,42 @@ static void Unlock( vout_thread_t * p_vout )
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
{
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