VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxConsole.cpp@ 95966

Last change on this file since 95966 was 95966, checked in by vboxsync, 22 months ago

Additions/VBoxTray: More cleanup: Moved the capabilities and console API into own modules, also the desktop tracking stuff. All lacks documentation, hard to find out what this all does, and why.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1/* $Id: VBoxConsole.cpp 95966 2022-08-01 15:40:29Z vboxsync $ */
2/** @file
3 * VBoxConsole.cpp - Console APIs.
4 */
5
6/*
7 * Copyright (C) 2013-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#include "VBoxTray.h"
19#include "VBoxTrayInternal.h"
20
21
22/** @todo r=andy Lacks documentation / Doxygen headers. What does this, and why? */
23
24BOOL VBoxConsoleIsAllowed()
25{
26 return vboxDtIsInputDesktop() && vboxStIsActiveConsole();
27}
28
29void VBoxConsoleEnable(BOOL fEnable)
30{
31 if (fEnable)
32 VBoxCapsAcquireAllSupported();
33 else
34 VBoxCapsReleaseAll();
35}
36
37void VBoxConsoleCapSetSupported(uint32_t iCap, BOOL fSupported)
38{
39 if (fSupported)
40 {
41 VBoxCapsEntryFuncStateSet(iCap, VBOXCAPS_ENTRY_FUNCSTATE_SUPPORTED);
42
43 if (VBoxConsoleIsAllowed())
44 VBoxCapsEntryAcquire(iCap);
45 }
46 else
47 {
48 VBoxCapsEntryFuncStateSet(iCap, VBOXCAPS_ENTRY_FUNCSTATE_UNSUPPORTED);
49
50 VBoxCapsEntryRelease(iCap);
51 }
52}
53
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use