VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxBFE/Keyboard.h@ 105487

Last change on this file since 105487 was 99890, checked in by vboxsync, 19 months ago

FE/VBoxBFE: Some crude keyboard implementation for some input support inside the guest for now, bugref:10397

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: Keyboard.h 99890 2023-05-22 10:40:30Z vboxsync $ */
2/** @file
3 * VBox frontends: Basic Frontend (BFE):
4 * Declaration of Keyboard class
5 */
6
7/*
8 * Copyright (C) 2023 Oracle and/or its affiliates.
9 *
10 * This file is part of VirtualBox base platform packages, as
11 * available from https://www.virtualbox.org.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation, in version 3 of the
16 * License.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see <https://www.gnu.org/licenses>.
25 *
26 * SPDX-License-Identifier: GPL-3.0-only
27 */
28
29#ifndef VBOX_INCLUDED_SRC_VBoxBFE_Keyboard_h
30#define VBOX_INCLUDED_SRC_VBoxBFE_Keyboard_h
31#ifndef RT_WITHOUT_PRAGMA_ONCE
32# pragma once
33#endif
34
35#include <iprt/semaphore.h>
36#include <VBox/vmm/pdm.h>
37
38#include <VBox/com/defs.h>
39
40class Keyboard
41{
42
43public:
44
45 Keyboard();
46 ~Keyboard();
47
48 // public methods only for internal purposes
49 static const PDMDRVREG DrvReg;
50
51 int PutScancode(long aScancode);
52 int PutScancodes(const long *paScancodes,
53 uint32_t cScancodes,
54 unsigned long *aCodesStored);
55 int PutUsageCode(long aUsageCode, long aUsagePage, bool fKeyRelease);
56
57private:
58
59 int releaseKeys();
60
61 static DECLCALLBACK(void) i_keyboardLedStatusChange(PPDMIKEYBOARDCONNECTOR pInterface, PDMKEYBLEDS enmLeds);
62 static DECLCALLBACK(void) i_keyboardSetActive(PPDMIKEYBOARDCONNECTOR pInterface, bool fActive);
63
64 static DECLCALLBACK(void*) i_drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
65 static DECLCALLBACK(int) i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
66 static DECLCALLBACK(void) i_drvDestruct(PPDMDRVINS pDrvIns);
67
68 /** Pointer to the associated display driver. */
69 struct DRVMAINKEYBOARD *mpDrv;
70
71 bool mfMachineRunning;
72};
73
74#define KEYBOARD_OID "d0cfbc0f-67ae-49db-ac4b-e8dc314f5a5c"
75
76#endif /* !VBOX_INCLUDED_SRC_VBoxBFE_Keyboard_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