summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/awt/XTopWindow3.idl23
-rw-r--r--toolkit/inc/awt/vclxtopwindow.hxx8
-rw-r--r--toolkit/source/awt/vclxtopwindow.cxx14
4 files changed, 44 insertions, 2 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 9613a54eb27a..959f805d3894 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1901,6 +1901,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/awt,\
XToolkitRobot \
XTopWindow \
XTopWindow2 \
+ XTopWindow3 \
XTopWindowListener \
XUnitConversion \
XUnoControlContainer \
diff --git a/offapi/com/sun/star/awt/XTopWindow3.idl b/offapi/com/sun/star/awt/XTopWindow3.idl
new file mode 100644
index 000000000000..d64076423132
--- /dev/null
+++ b/offapi/com/sun/star/awt/XTopWindow3.idl
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+module com { module sun { module star { module awt {
+
+/** extends XTopWindow with additional functionality
+
+ @since LibreOffice 25.2
+*/
+interface XTopWindow3: XTopWindow2 {
+ /** controls whether the window is currently shown full screen */
+ [attribute] boolean FullScreen;
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/toolkit/inc/awt/vclxtopwindow.hxx b/toolkit/inc/awt/vclxtopwindow.hxx
index 1913c4594f6d..9e77edcef43b 100644
--- a/toolkit/inc/awt/vclxtopwindow.hxx
+++ b/toolkit/inc/awt/vclxtopwindow.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
-#include <com/sun/star/awt/XTopWindow2.hpp>
+#include <com/sun/star/awt/XTopWindow3.hpp>
#include <cppuhelper/implbase.hxx>
@@ -31,7 +31,7 @@ namespace com::sun::star::awt { class XMenuBar; }
class VCLXTopWindow: public cppu::ImplInheritanceHelper<
- VCLXContainer, css::awt::XTopWindow2, css::awt::XSystemDependentWindowPeer >
+ VCLXContainer, css::awt::XTopWindow3, css::awt::XSystemDependentWindowPeer >
{
public:
VCLXTopWindow();
@@ -55,6 +55,10 @@ public:
virtual ::sal_Int32 SAL_CALL getDisplay() override;
virtual void SAL_CALL setDisplay( ::sal_Int32 _display ) override;
+ // XTopWindow3
+ virtual sal_Bool SAL_CALL getFullScreen() override;
+ virtual void SAL_CALL setFullScreen(sal_Bool value) override;
+
static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
};
diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx
index c0ce4d891d94..55dbb8070b91 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -209,6 +209,20 @@ void SAL_CALL VCLXTopWindow::setDisplay( ::sal_Int32 _display )
pWindow->SetScreenNumber( _display );
}
+sal_Bool VCLXTopWindow::getFullScreen() {
+ SolarMutexGuard g;
+ if (auto const win = VCLXContainer::GetAsDynamic<WorkWindow>()) {
+ return win->IsFullScreenMode();
+ }
+ return false;
+}
+
+void VCLXTopWindow::setFullScreen(sal_Bool value) {
+ SolarMutexGuard g;
+ if (auto const win = VCLXContainer::GetAsDynamic<WorkWindow>()) {
+ return win->ShowFullScreenMode(value);
+ }
+}