VirtualBox

Changeset 91065 in vbox


Ignore:
Timestamp:
Sep 1, 2021 3:41:42 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: A bit of cleanup for r146706, some of stuff doesn't need to be public, that reduces includes as well.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp

    r91057 r91065  
    2929
    3030/* Other VBox includes: */
    31 #include <iprt/cdefs.h>
    3231#include <VBox/log.h>
    3332
     33/* Other includes: */
     34#include <X11/Xatom.h>
     35#include <X11/Xutil.h>
     36#include <X11/extensions/dpms.h>
     37
     38/// @todo is it required still?
    3439// WORKAROUND:
    3540// rhel3 build hack
    36 RT_C_DECLS_BEGIN
    37 #include <X11/Xatom.h>
    38 #include <X11/Xlib.h>
    39 #undef BOOL /* VBox/com/defs.h conflict */
    40 #include <X11/extensions/dpms.h>
    41 RT_C_DECLS_END
    42 
    43 
    44 static int  gX11ScreenSaverTimeout;
    45 static BOOL gX11ScreenSaverDpmsAvailable;
    46 static BOOL gX11DpmsState;
     41//RT_C_DECLS_BEGIN
     42//#include <X11/Xlib.h>
     43//#undef BOOL /* VBox/com/defs.h conflict */
     44//RT_C_DECLS_END
     45
    4746
    4847bool NativeWindowSubsystem::X11IsCompositingManagerRunning()
     
    110109}
    111110
     111#if 0 // unused for now?
     112static int  gX11ScreenSaverTimeout;
     113static BOOL gX11ScreenSaverDpmsAvailable;
     114static BOOL gX11DpmsState;
     115
    112116void NativeWindowSubsystem::X11ScreenSaverSettingsInit()
    113117{
     
    148152        DPMSEnable(pDisplay);
    149153}
     154#endif // unused for now?
    150155
    151156bool NativeWindowSubsystem::X11CheckExtension(const char *pExtensionName)
     
    159164}
    160165
    161 bool NativeWindowSubsystem::X11CheckDBusConnection(const QDBusConnection &connection)
     166bool X11CheckDBusConnection(const QDBusConnection &connection)
    162167{
    163168    if (!connection.isConnected())
     
    177182}
    178183
    179 QStringList NativeWindowSubsystem::X11FindDBusScreenSaverServices(const QDBusConnection &connection)
     184QStringList X11FindDBusScreenSaverServices(const QDBusConnection &connection)
    180185{
    181186    QStringList serviceNames;
     
    226231}
    227232
    228 void NativeWindowSubsystem::X11IntrospectInterfaceNode(const QDomElement &interface,
    229                                                        const QString &strServiceName,
    230                                                        QVector<X11ScreenSaverInhibitMethod*> &methods)
     233void X11IntrospectInterfaceNode(const QDomElement &interface,
     234                                const QString &strServiceName,
     235                                QVector<X11ScreenSaverInhibitMethod*> &methods)
    231236{
    232237    QDomElement child = interface.firstChildElement();
     
    248253}
    249254
    250 void NativeWindowSubsystem::X11IntrospectServices(const QDBusConnection &connection,
    251                                                   const QString &strService,
    252                                                   const QString &strPath,
    253                                                   QVector<X11ScreenSaverInhibitMethod*> &methods)
     255void X11IntrospectServices(const QDBusConnection &connection,
     256                           const QString &strService,
     257                           const QString &strPath,
     258                           QVector<X11ScreenSaverInhibitMethod*> &methods)
    254259{
    255260    QDBusMessage call = QDBusMessage::createMethodCall(strService, strPath.isEmpty() ? QLatin1String("/") : strPath,
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h

    r91057 r91065  
    2929#include "UILibraryDefs.h"
    3030
    31 /* Forward declarations: */
    32 class QDBusConnection;
    33 class QDomElement;
    34 
    3531/** X11: Known Window Manager types. */
    3632enum X11WMType
     
    5854{
    5955    /** X11: Determines and returns whether the compositing manager is running. */
    60     SHARED_LIBRARY_STUFF bool X11IsCompositingManagerRunning();
     56    bool X11IsCompositingManagerRunning();
     57    /** X11: Determines and returns current Window Manager type. */
     58    X11WMType X11WindowManagerType();
    6159
    62     /** X11: Determines and returns current Window Manager type. */
    63     SHARED_LIBRARY_STUFF X11WMType X11WindowManagerType();
    64 
     60#if 0 // unused for now?
    6561    /** X11: Inits the screen saver save/restore mechanism. */
    6662    SHARED_LIBRARY_STUFF void X11ScreenSaverSettingsInit();
     
    6965    /** X11: Restores previously saved screen saver settings. */
    7066    SHARED_LIBRARY_STUFF void X11ScreenSaverSettingsRestore();
     67#endif // unused for now?
     68
    7169    /** X11: Returns true if XLib extension with name @p extensionName is avaible, false otherwise. */
    72     SHARED_LIBRARY_STUFF bool X11CheckExtension(const char *extensionName);
     70    bool X11CheckExtension(const char *extensionName);
    7371
    74     /** X11: Returns whether DBus @a connection is alive. */
    75     bool X11CheckDBusConnection(const QDBusConnection &connection);
    76     /** X11: Finds a list of DBus @a connection screen-saver services. */
    77     QStringList X11FindDBusScreenSaverServices(const QDBusConnection &connection);
    7872    /** X11: Returns whether there are any DBus services whose name contains the substring 'screensaver'. */
    7973    bool X11CheckDBusScreenSaverServices();
    80     /** X11: Does something known only to original creator... */
    81     void X11IntrospectInterfaceNode(const QDomElement &interface,
    82                                     const QString &strServiceName,
    83                                     QVector<X11ScreenSaverInhibitMethod*> &methods);
    84     /** X11: Does something known only to original creator... */
    85     void X11IntrospectServices(const QDBusConnection &connection,
    86                                const QString &strService,
    87                                const QString &strPath,
    88                                QVector<X11ScreenSaverInhibitMethod*> &methods);
    89 
    9074    /** X11: Returns the list of Inhibit methods found by introspecting DBus services. */
    9175    SHARED_LIBRARY_STUFF QVector<X11ScreenSaverInhibitMethod*> X11FindDBusScrenSaverInhibitMethods();
    92 
    9376    /** X11: Disables/enables Screen Saver through QDBus. */
    9477    SHARED_LIBRARY_STUFF void X11InhibitUninhibitScrenSaver(bool fInhibit, QVector<X11ScreenSaverInhibitMethod*> &inOutIhibitMethods);
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