VirtualBox

Ignore:
Timestamp:
Apr 9, 2018 3:56:21 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: VBoxGlobal library fixes for Windows.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r71679 r71784  
    400400# This one is global shared GUI library:
    401401ifdef VBOX_GUI_WITH_SHARED_LIBRARY
    402  VirtualBox_LIBS += $(PATH_STAGE_DLL)/VBoxGlobal$(VBOX_SUFF_DLL)
     402 ifeq ($(KBUILD_TARGET),win)
     403  VirtualBox_LIBS += $(PATH_STAGE_LIB)/VBoxGlobal$(VBOX_SUFF_LIB)
     404 else
     405  VirtualBox_LIBS += $(PATH_STAGE_DLL)/VBoxGlobal$(VBOX_SUFF_DLL)
     406 endif
    403407endif
    404408
     
    413417VBoxGlobal_LIBS.solaris += Xinerama
    414418VBoxGlobal_LIBS.freebsd += Xinerama
     419
     420# Various Windows hosts libraries:
     421VBoxGlobal_LIBS.win = \
     422        $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Htmlhelp.Lib
    415423
    416424# VBox keyboard shared library for X11 hosts:
     
    11021110VirtualBox_SOURCES.win += \
    11031111        src/platform/win/VirtualBox.rc \
    1104         src/platform/win/UIDesktopServices_win.cpp \
    1105         src/platform/win/WinKeyboard.cpp
     1112        src/platform/win/UIDesktopServices_win.cpp
    11061113
    11071114VirtualBox_SOURCES.darwin += \
     
    12151222
    12161223 VirtualBox_SOURCES.win += \
    1217         src/platform/win/VBoxUtils-win.cpp
     1224        src/platform/win/VBoxUtils-win.cpp \
     1225        src/platform/win/WinKeyboard.cpp
    12181226
    12191227 VirtualBox_SOURCES.darwin += \
     
    13131321
    13141322VBoxGlobal_SOURCES.win += \
    1315         src/platform/win/VBoxUtils-win.cpp
     1323        src/platform/win/VBoxUtils-win.cpp \
     1324        src/platform/win/WinKeyboard.cpp
    13161325
    13171326VBoxGlobal_SOURCES.darwin += \
     
    14541463        $(QUIET)$(RM) -f -- "$@" "$(PATH_TARGET)/VirtualBoxComWrapperFiles.dep"
    14551464        $(QUIET)$(VBOX_XSLTPROC) -o $@ \
    1456                 $(VBOX_VIRTUALBOX_SRC)/src/globals/COMWrappers.xsl $<
     1465                $(VBOX_VIRTUALBOX_SRC)/src/globals/COMWrappers.xsl $<
    14571466        $(QUIET)$(VBOX_FILESPLIT) $@ $(VirtualBox_0_OUTDIR)/include \
    14581467                $(PATH_TARGET)/VirtualBoxComWrapperFiles.dep VirtualBox_VBOX_COMWRAPPERS
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/QIWithRetranslateUI.h

    r71354 r71784  
    2525#include <QObject>
    2626#include <QWidget>
     27
     28/* GUI includes: */
     29#include "UILibraryDefs.h"
    2730
    2831
     
    6063    virtual void retranslateUi() = 0;
    6164};
     65
     66#ifdef VBOX_GUI_WITH_SHARED_LIBRARY
     67/** Explicit QIWithRetranslateUI instantiation for QWidget class.
     68  * @note  On Windows it's important that all template cases are instantiated just once across
     69  *        the linking space. In case we have particular template case instantiated from both
     70  *        library and executable sides, - we have multiple definition case and need to strictly
     71  *        ask compiler to do it just once and link such cases against library only.
     72  *        I would also note that it would be incorrect to just make whole the template exported
     73  *        to library because latter can have lack of required instantiations (current case). */
     74template class SHARED_LIBRARY_STUFF QIWithRetranslateUI<QWidget>;
     75#endif
    6276
    6377
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r71630 r71784  
    642642    UIThreadPool *m_pThreadPool;
    643643
     644#if defined(VBOX_WS_WIN) && defined(VBOX_GUI_WITH_SHARED_LIBRARY)
     645    /** Holds the ATL module instance (for use with VBoxGlobal shared library only).
     646      * @note  Required internally by ATL (constructor records instance in global variable). */
     647    ATL::CComModule _Module;
     648#endif
     649
    644650    /** Holds the singleton VBoxGlobal instance. */
    645651    static VBoxGlobal *s_pInstance;
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp

    r69500 r71784  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - Utility classes and functions for handling Win specific tasks.
     3 * VBox Qt GUI - Declarations of utility classes and functions for handling Windows specific tasks.
    44 */
    55
    66/*
    7  * Copyright (C) 2010-2017 Oracle Corporation
     7 * Copyright (C) 2010-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 /* Includes: */
     18/* GUI includes: */
    1919#include "VBoxUtils-win.h"
    2020
    21 /* Namespace for native window sub-system functions: */
     21
     22/** Namespace for native window sub-system functions. */
    2223namespace NativeWindowSubsystem
    2324{
    24     /* Enumerates visible always-on-top (top-most) windows: */
     25    /** Enumerates visible always-on-top (top-most) windows. */
    2526    BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam);
    26     /* Contain visible top-most-window rectangles: */
     27    /** Contains visible top-most-window rectangles. */
    2728    QList<QRect> topMostRects;
    2829}
    2930
    30 /* Enumerates visible always-on-top (top-most) windows: */
    31 BOOL CALLBACK NativeWindowSubsystem::EnumWindowsProc(HWND hWnd, LPARAM /* lParam */)
     31BOOL CALLBACK NativeWindowSubsystem::EnumWindowsProc(HWND hWnd, LPARAM)
    3232{
    3333    /* Ignore NULL HWNDs: */
     
    6060}
    6161
    62 /* Returns area covered by visible always-on-top (top-most) windows: */
    6362const QRegion NativeWindowSubsystem::areaCoveredByTopMostWindows()
    6463{
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h

    r69500 r71784  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - Declarations of utility classes and functions for handling Win specific tasks.
     3 * VBox Qt GUI - Declarations of utility classes and functions for handling Windows specific tasks.
    44 */
    55
    66/*
    7  * Copyright (C) 2011-2017 Oracle Corporation
     7 * Copyright (C) 2011-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #ifndef ___VBoxUtils_WIN_h___
    19 #define ___VBoxUtils_WIN_h___
     18#ifndef ___VBoxUtils_win_h___
     19#define ___VBoxUtils_win_h___
    2020
    2121/* Qt includes: */
    2222#include <QRegion>
    2323
    24 /* Platform includes: */
     24/* GUI includes: */
     25#include "UILibraryDefs.h"
     26
     27/* External includes: */
    2528#include <iprt/win/windows.h>
    2629
     
    2932{
    3033    /* Returns area covered by visible always-on-top (top-most) windows: */
    31     const QRegion areaCoveredByTopMostWindows();
     34    SHARED_LIBRARY_STUFF const QRegion areaCoveredByTopMostWindows();
    3235}
    3336
    34 #endif
    35 
     37#endif /* !___VBoxUtils_win_h___ */
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.cpp

    r71027 r71784  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - Windows keyboard handling..
     3 * VBox Qt GUI - Declarations of utility functions for handling Windows Keyboard specific tasks.
    44 */
    55
    66/*
    7  * Copyright (C) 2014-2017 Oracle Corporation
     7 * Copyright (C) 2014-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
     18/* Defines: */
    1819#define LOG_GROUP LOG_GROUP_GUI
    1920
     21/* GUI includes: */
    2022#include "WinKeyboard.h"
     23
     24/* Other VBox includes: */
    2125#include <iprt/assert.h>
    2226#include <VBox/log.h>
    2327
     28/* External includes: */
    2429#include <stdio.h>
    2530
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/win/WinKeyboard.h

    r71027 r71784  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - Windows keyboard handling..
     3 * VBox Qt GUI - Declarations of utility functions for handling Windows Keyboard specific tasks.
    44 */
    55
    66/*
    7  * Copyright (C) 2014-2017 Oracle Corporation
     7 * Copyright (C) 2014-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1919#define ___WinKeyboard_h___
    2020
    21 /* Platform includes: */
     21/* GUI includes: */
     22#include "UILibraryDefs.h"
     23
     24/* Other VBox includes: */
    2225#include <iprt/win/windows.h>
    2326
    24 void * WinHidDevicesKeepLedsState(void);
    25 void   WinHidDevicesApplyAndReleaseLedsState(void *pData);
    26 void   WinHidDevicesBroadcastLeds(bool fNumLockOn, bool fCapsLockOn, bool fScrollLockOn);
     27SHARED_LIBRARY_STUFF void * WinHidDevicesKeepLedsState(void);
     28SHARED_LIBRARY_STUFF void   WinHidDevicesApplyAndReleaseLedsState(void *pData);
     29SHARED_LIBRARY_STUFF void   WinHidDevicesBroadcastLeds(bool fNumLockOn, bool fCapsLockOn, bool fScrollLockOn);
    2730
    28 bool winHidLedsInSync(bool fNumLockOn, bool fCapsLockOn, bool fScrollLockOn);
     31SHARED_LIBRARY_STUFF bool winHidLedsInSync(bool fNumLockOn, bool fCapsLockOn, bool fScrollLockOn);
    2932
    3033/** Helper class to deal with Windows AltGr handling.
     
    3942  * unwanted event at source, it should still make guest system keyboard handling
    4043  * work correctly. */
    41 class WinAltGrMonitor
     44class SHARED_LIBRARY_STUFF WinAltGrMonitor
    4245{
    4346public:
Note: See TracChangeset for help on using the changeset viewer.

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