1 | /* $Id: VBoxFB.h 98176 2023-01-21 22:09:36Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox frontends - Framebuffer (FB, DirectFB), Main header file.
|
---|
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 VBOX_INCLUDED_SRC_VBoxFB_VBoxFB_h
|
---|
29 | #define VBOX_INCLUDED_SRC_VBoxFB_VBoxFB_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #include <stdlib.h>
|
---|
35 | #include <stdio.h>
|
---|
36 | #include <unistd.h>
|
---|
37 |
|
---|
38 | // XPCOM headers
|
---|
39 | #include <nsIServiceManager.h>
|
---|
40 | #include <nsIComponentRegistrar.h>
|
---|
41 | #include <nsXPCOMGlue.h>
|
---|
42 | #include <nsMemory.h>
|
---|
43 | #include <nsIProgrammingLanguage.h>
|
---|
44 | #include <nsIFile.h>
|
---|
45 | #include <nsILocalFile.h>
|
---|
46 | #include <nsString.h>
|
---|
47 | #include <nsReadableUtils.h>
|
---|
48 | #include <VirtualBox_XPCOM.h>
|
---|
49 | #include <ipcIService.h>
|
---|
50 | #include <nsEventQueueUtils.h>
|
---|
51 | #include <ipcCID.h>
|
---|
52 | #include <ipcIDConnectService.h>
|
---|
53 | #define IPC_DCONNECTSERVICE_CONTRACTID \
|
---|
54 | "@mozilla.org/ipc/dconnect-service;1"
|
---|
55 |
|
---|
56 | #include <VBox/types.h>
|
---|
57 | #include <VBox/err.h>
|
---|
58 | #include <VBox/log.h>
|
---|
59 | #ifndef VBOX_WITH_XPCOM
|
---|
60 | # define VBOX_WITH_XPCOM
|
---|
61 | #endif
|
---|
62 | #include <VBox/com/com.h>
|
---|
63 | #include <iprt/assert.h>
|
---|
64 | #include <iprt/uuid.h>
|
---|
65 |
|
---|
66 | // DirectFB header
|
---|
67 | #include <directfb/directfb.h>
|
---|
68 |
|
---|
69 | /**
|
---|
70 | * Executes the passed in expression and verifies the return code.
|
---|
71 | *
|
---|
72 | * On failure a debug message is printed to stderr and the application will
|
---|
73 | * abort with an fatal error.
|
---|
74 | */
|
---|
75 | #define DFBCHECK(x...) \
|
---|
76 | do { \
|
---|
77 | DFBResult err = x; \
|
---|
78 | if (err != DFB_OK) \
|
---|
79 | { \
|
---|
80 | fprintf(stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
|
---|
81 | DirectFBErrorFatal(#x, err); \
|
---|
82 | } \
|
---|
83 | } while (0)
|
---|
84 |
|
---|
85 | #include "Helper.h"
|
---|
86 |
|
---|
87 | /**
|
---|
88 | * Globals
|
---|
89 | */
|
---|
90 | extern uint32_t g_useFixedVideoMode;
|
---|
91 | extern videoMode g_fixedVideoMode;
|
---|
92 | extern int g_scaleGuest;
|
---|
93 |
|
---|
94 | #endif /* !VBOX_INCLUDED_SRC_VBoxFB_VBoxFB_h */
|
---|