VirtualBox

source: vbox/trunk/src/VBox/Main/include/GraphicsAdapterImpl.h@ 105865

Last change on this file since 105865 was 105865, checked in by vboxsync, 3 months ago

Main: Added API for querying graphics features (2D Video / 3D Acceleration) of a specific graphics controller for a given platform and revamped the graphics controller attributes for 2D / 3D setters/getters to also use the new graphics features enumeration. Also, the system properties also now contain a dedicated API to query for graphics features (very basic for now, needs to be stuffed out). See SDK changelog for details. Added validation code when setting a specific graphics feature (which we never did before) [build fix]. bugref:10749

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/* $Id: GraphicsAdapterImpl.h 105865 2024-08-26 20:37:09Z vboxsync $ */
2/** @file
3 * Implementation of IGraphicsAdapter in VBoxSVC - Header.
4 */
5
6/*
7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
8 *
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
26 */
27
28#ifndef MAIN_INCLUDED_GraphicsAdapterImpl_h
29#define MAIN_INCLUDED_GraphicsAdapterImpl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "GraphicsAdapterWrap.h"
35
36
37namespace settings
38{
39 struct GraphicsAdapter;
40};
41
42
43class ATL_NO_VTABLE GraphicsAdapter :
44 public GraphicsAdapterWrap
45{
46public:
47
48 DECLARE_COMMON_CLASS_METHODS(GraphicsAdapter)
49
50 HRESULT FinalConstruct();
51 void FinalRelease();
52
53 // public initializer/uninitializer for internal purposes only
54 HRESULT init(Machine *aParent);
55 HRESULT init(Machine *aParent, GraphicsAdapter *aThat);
56 HRESULT initCopy(Machine *aParent, GraphicsAdapter *aThat);
57 void uninit();
58
59
60 // public methods only for internal purposes
61 HRESULT i_loadSettings(const settings::GraphicsAdapter &data);
62 HRESULT i_saveSettings(settings::GraphicsAdapter &data);
63
64 void i_rollback();
65 void i_commit();
66 void i_copyFrom(GraphicsAdapter *aThat);
67
68private:
69
70 // wrapped IGraphicsAdapter properties
71 HRESULT getGraphicsControllerType(GraphicsControllerType_T *aGraphicsControllerType);
72 HRESULT setGraphicsControllerType(GraphicsControllerType_T aGraphicsControllerType);
73 HRESULT getVRAMSize(ULONG *aVRAMSize);
74 HRESULT setVRAMSize(ULONG aVRAMSize);
75 HRESULT setFeature(GraphicsFeature_T aFeature, BOOL aEnabled);
76 HRESULT isFeatureEnabled(GraphicsFeature_T aFeature, BOOL *aEnabled);
77 HRESULT getMonitorCount(ULONG *aMonitorCount);
78 HRESULT setMonitorCount(ULONG aMonitorCount);
79
80 Machine * const mParent;
81 const ComObjPtr<GraphicsAdapter> mPeer;
82 Backupable<settings::GraphicsAdapter> mData;
83};
84
85#endif /* !MAIN_INCLUDED_GraphicsAdapterImpl_h */
86/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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