From a16d549ade1ccba9b9d59bc5aa9af739310e1aba Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 4 Mar 2012 15:24:14 +0100 Subject: [PATCH] Add scripting property for toggling fullscreen. --- src/apps/mediaplayer/MainWin.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/apps/mediaplayer/MainWin.cpp b/src/apps/mediaplayer/MainWin.cpp index 5de830e379..4aaf5d9ff9 100644 --- a/src/apps/mediaplayer/MainWin.cpp +++ b/src/apps/mediaplayer/MainWin.cpp @@ -156,6 +156,10 @@ static property_info sPropertyInfo[] = { B_TRANSLATE("Gets the URI of the currently playing item."), 0, { B_STRING_TYPE } }, + { B_TRANSLATE("ToggleFullscreen"), { B_EXECUTE_PROPERTY }, + { B_DIRECT_SPECIFIER, 0 }, + B_TRANSLATE("Toggle fullscreen."), 0 + }, { 0, { 0 }, { 0 }, 0, 0 } }; @@ -532,6 +536,10 @@ MainWin::MessageReceived(BMessage* msg) break; } + case 9: + PostMessage(M_TOGGLE_FULLSCREEN); + break; + default: return BWindow::MessageReceived(msg); } @@ -1243,6 +1251,7 @@ MainWin::ResolveSpecifier(BMessage* message, int32 index, BMessage* specifier, case 6: case 7: case 8: + case 9: return this; }