VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h@ 100064

Last change on this file since 100064 was 100064, checked in by vboxsync, 16 months ago

FE/Qt: bugref:10421. Replacing VBOX_WS_X11 with VBOX_WS_NIX.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
RevLine 
[55401]1/* $Id: UIMachineWindowFullscreen.h 100064 2023-06-04 09:10:01Z vboxsync $ */
[382]2/** @file
[52727]3 * VBox Qt GUI - UIMachineWindowFullscreen class declaration.
[382]4 */
5
6/*
[98103]7 * Copyright (C) 2010-2023 Oracle and/or its affiliates.
[382]8 *
[96407]9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
[382]26 */
27
[76581]28#ifndef FEQT_INCLUDED_SRC_runtime_fullscreen_UIMachineWindowFullscreen_h
29#define FEQT_INCLUDED_SRC_runtime_fullscreen_UIMachineWindowFullscreen_h
[76532]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[382]33
[57027]34/* GUI includes: */
[26637]35#include "UIMachineWindow.h"
[382]36
[100064]37#if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX)
[41114]38/* Forward declarations: */
[57021]39class UIMiniToolBar;
[100064]40#endif /* VBOX_WS_WIN || VBOX_WS_NIX */
[27332]41
[98039]42/** UIMachineWindow subclass used as full-screen machine window implementation. */
[41107]43class UIMachineWindowFullscreen : public UIMachineWindow
[16319]44{
45 Q_OBJECT;
46
[50498]47#ifdef RT_OS_DARWIN
48signals:
[50681]49 /** Mac OS X: Notifies listener about native 'fullscreen' will be entered. */
50 void sigNotifyAboutNativeFullscreenWillEnter();
[50647]51 /** Mac OS X: Notifies listener about native 'fullscreen' entered. */
[50498]52 void sigNotifyAboutNativeFullscreenDidEnter();
[50681]53 /** Mac OS X: Notifies listener about native 'fullscreen' will be exited. */
54 void sigNotifyAboutNativeFullscreenWillExit();
[50647]55 /** Mac OS X: Notifies listener about native 'fullscreen' exited. */
[50498]56 void sigNotifyAboutNativeFullscreenDidExit();
[51248]57 /** Mac OS X: Notifies listener about native 'fullscreen' fail to enter. */
58 void sigNotifyAboutNativeFullscreenFailToEnter();
[50498]59#endif /* RT_OS_DARWIN */
60
[98039]61public:
[382]62
[57027]63 /** Constructor, passes @a pMachineLogic and @a uScreenId to the UIMachineWindow constructor. */
[26921]64 UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId);
[8946]65
[98039]66protected:
67
[60362]68#ifdef VBOX_WS_MAC
[50647]69 /** Mac OS X: Handles native notifications @a strNativeNotificationName for 'fullscreen' window. */
[50498]70 void handleNativeNotification(const QString &strNativeNotificationName);
[50647]71 /** Mac OS X: Returns whether window is in 'fullscreen' transition. */
72 bool isInFullscreenTransition() const { return m_fIsInFullscreenTransition; }
[60362]73#endif /* VBOX_WS_MAC */
[50498]74
[27008]75private slots:
76
[100064]77#if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX)
[57027]78 /** Handles machine state change event. */
[41114]79 void sltMachineStateChanged();
80
[57050]81 /** Revokes window activation. */
82 void sltRevokeWindowActivation();
[88635]83
84 /** Handles signal about mini-toolbar auto-hide toggled.
85 * @param fEnabled Brings whether auto-hide is enabled. */
86 void sltHandleMiniToolBarAutoHideToggled(bool fEnabled);
[100064]87#endif /* VBOX_WS_WIN || VBOX_WS_NIX */
[57019]88
[50634]89#ifdef RT_OS_DARWIN
[50679]90 /** Mac OS X: Commands @a pMachineWindow to enter native 'fullscreen' mode if possible. */
91 void sltEnterNativeFullscreen(UIMachineWindow *pMachineWindow);
92 /** Mac OS X: Commands @a pMachineWindow to exit native 'fullscreen' mode if possible. */
93 void sltExitNativeFullscreen(UIMachineWindow *pMachineWindow);
[50634]94#endif /* RT_OS_DARWIN */
95
[65800]96 /** Shows window in minimized state. */
97 void sltShowMinimized();
98
[23723]99private:
[4514]100
[90567]101 /** Prepare notification-center routine. */
102 void prepareNotificationCenter();
[57027]103 /** Prepare visual-state routine. */
[41114]104 void prepareVisualState();
[100064]105#if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX)
[57027]106 /** Prepare mini-toolbar routine. */
[41114]107 void prepareMiniToolbar();
[100064]108#endif /* VBOX_WS_WIN || VBOX_WS_NIX */
[382]109
[100064]110#if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX)
[57027]111 /** Cleanup mini-toolbar routine. */
[41114]112 void cleanupMiniToolbar();
[100064]113#endif /* VBOX_WS_WIN || VBOX_WS_NIX */
[57027]114 /** Cleanup visual-state routine. */
[41114]115 void cleanupVisualState();
[90567]116 /** Cleanup notification-center routine. */
117 void cleanupNotificationCenter();
[382]118
[57027]119 /** Updates geometry according to visual-state. */
[44859]120 void placeOnScreen();
[57027]121 /** Updates visibility according to visual-state. */
[41114]122 void showInNecessaryMode();
123
[100064]124#if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX)
[57027]125 /** Common update routine. */
[27332]126 void updateAppearanceOf(int iElement);
[100064]127#endif /* VBOX_WS_WIN || VBOX_WS_NIX */
[27332]128
[100064]129#ifdef VBOX_WS_NIX
[65520]130 /** X11: Handles @a pEvent about state change. */
[61974]131 void changeEvent(QEvent *pEvent);
[65520]132#endif
[61974]133
[60362]134#ifdef VBOX_WS_WIN
[59814]135 /** Win: Handles show @a pEvent. */
136 void showEvent(QShowEvent *pEvent);
[65520]137#endif
[59814]138
[100064]139#if defined(VBOX_WS_WIN) || defined(VBOX_WS_NIX)
[54463]140 /** Holds the mini-toolbar instance. */
[57021]141 UIMiniToolBar *m_pMiniToolBar;
[100064]142#endif /* VBOX_WS_WIN || VBOX_WS_NIX */
[27141]143
[60362]144#ifdef VBOX_WS_MAC
[50647]145 /** Mac OS X: Reflects whether window is in 'fullscreen' transition. */
146 bool m_fIsInFullscreenTransition;
147 /** Mac OS X: Allows 'fullscreen' API access: */
148 friend class UIMachineLogicFullscreen;
[60362]149#endif /* VBOX_WS_MAC */
[50647]150
[61659]151 /** Holds whether the window was minimized before became hidden.
152 * Used to restore minimized state when the window shown again. */
153 bool m_fWasMinimized;
[100064]154#ifdef VBOX_WS_NIX
[65800]155 /** X11: Holds whether the window minimization is currently requested.
156 * Used to prevent accidentally restoring to full-screen state. */
157 bool m_fIsMinimizationRequested;
[65520]158 /** X11: Holds whether the window is currently minimized.
[61974]159 * Used to restore full-screen state when the window restored again. */
160 bool m_fIsMinimized;
[65520]161#endif
[23723]162};
[382]163
[76581]164#endif /* !FEQT_INCLUDED_SRC_runtime_fullscreen_UIMachineWindowFullscreen_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette