VirtualBox

Changeset 41201 in vbox for trunk/src


Ignore:
Timestamp:
May 8, 2012 8:56:52 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77830
Message:

Main+Frontends: replace custom QueryInterface method to eliminate unnecessary code variation

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/Framebuffer.h

    r33591 r41201  
    55
    66/*
    7  * Copyright (C) 2010 Oracle Corporation
     7 * Copyright (C) 2007-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4242    }
    4343#endif
    44     VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    4544
    46     NS_DECL_ISUPPORTS
     45    BEGIN_COM_MAP(VRDPFramebuffer)
     46        VBOX_DEFAULT_INTERFACE_ENTRIES(IFramebuffer)
     47    END_COM_MAP()
    4748
    4849    STDMETHOD(COMGETTER(Width))(ULONG *width);
  • trunk/src/VBox/Frontends/VBoxHeadless/NullFramebuffer.h

    r32431 r41201  
    11/*
    2  * Copyright (C) 2010 Oracle Corporation
     2 * Copyright (C) 2007-2012 Oracle Corporation
    33 *
    44 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4646    }
    4747#endif
    48     VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    49 
    50     NS_DECL_ISUPPORTS
     48
     49    BEGIN_COM_MAP(NullFB)
     50        VBOX_DEFAULT_INTERFACE_ENTRIES(IFramebuffer)
     51    END_COM_MAP()
    5152
    5253    // public methods only for internal purposes
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h

    r33540 r41201  
    66
    77/*
    8  * Copyright (C) 2006-2007 Oracle Corporation
     8 * Copyright (C) 2006-2012 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    6868    }
    6969#endif
    70     VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    71 
    72     NS_DECL_ISUPPORTS
     70
     71    BEGIN_COM_MAP(VBoxSDLFB)
     72        VBOX_DEFAULT_INTERFACE_ENTRIES(IFramebuffer)
     73    END_COM_MAP()
    7374
    7475    STDMETHOD(COMGETTER(Width))(ULONG *width);
     
    223224    }
    224225#endif
    225     VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    226 
    227     NS_DECL_ISUPPORTS
     226
     227    BEGIN_COM_MAP(VBoxSDLFBOverlay)
     228        VBOX_DEFAULT_INTERFACE_ENTRIES(IFramebuffer)
     229    END_COM_MAP()
    228230
    229231    STDMETHOD(COMGETTER(X))(ULONG *x);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r39063 r41201  
    77
    88/*
    9  * Copyright (C) 2010 Oracle Corporation
     9 * Copyright (C) 2004-2012 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r39451 r41201  
    66
    77/*
    8  * Copyright (C) 2010-2011 Oracle Corporation
     8 * Copyright (C) 2004-2012 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    127127    void setDeleted(bool fIsDeleted) { m_fIsDeleted = fIsDeleted; }
    128128
    129     NS_DECL_ISUPPORTS
    130 
    131 #if defined (Q_OS_WIN32)
     129#if defined(Q_OS_WIN32)
    132130    STDMETHOD_(ULONG, AddRef)()
    133131    {
     
    144142#endif
    145143
    146     VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
     144    BEGIN_COM_MAP(UIFrameBuffer)
     145        VBOX_DEFAULT_INTERFACE_ENTRIES(IFramebuffer)
     146    END_COM_MAP()
    147147
    148148    /* IFramebuffer COM methods */
    149     STDMETHOD(COMGETTER(Address)) (BYTE **ppAddress);
    150     STDMETHOD(COMGETTER(Width)) (ULONG *puWidth);
    151     STDMETHOD(COMGETTER(Height)) (ULONG *puHeight);
    152     STDMETHOD(COMGETTER(BitsPerPixel)) (ULONG *puBitsPerPixel);
    153     STDMETHOD(COMGETTER(BytesPerLine)) (ULONG *puBytesPerLine);
    154     STDMETHOD(COMGETTER(PixelFormat)) (ULONG *puPixelFormat);
    155     STDMETHOD(COMGETTER(UsesGuestVRAM)) (BOOL *pbUsesGuestVRAM);
    156     STDMETHOD(COMGETTER(HeightReduction)) (ULONG *puHeightReduction);
    157     STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **ppOverlay);
    158     STDMETHOD(COMGETTER(WinId)) (LONG64 *pWinId);
     149    STDMETHOD(COMGETTER(Address))(BYTE **ppAddress);
     150    STDMETHOD(COMGETTER(Width))(ULONG *puWidth);
     151    STDMETHOD(COMGETTER(Height))(ULONG *puHeight);
     152    STDMETHOD(COMGETTER(BitsPerPixel))(ULONG *puBitsPerPixel);
     153    STDMETHOD(COMGETTER(BytesPerLine))(ULONG *puBytesPerLine);
     154    STDMETHOD(COMGETTER(PixelFormat))(ULONG *puPixelFormat);
     155    STDMETHOD(COMGETTER(UsesGuestVRAM))(BOOL *pbUsesGuestVRAM);
     156    STDMETHOD(COMGETTER(HeightReduction))(ULONG *puHeightReduction);
     157    STDMETHOD(COMGETTER(Overlay))(IFramebufferOverlay **ppOverlay);
     158    STDMETHOD(COMGETTER(WinId))(LONG64 *pWinId);
    159159
    160160    STDMETHOD(Lock)();
    161161    STDMETHOD(Unlock)();
    162162
    163     STDMETHOD(RequestResize) (ULONG uScreenId, ULONG uPixelFormat,
    164                               BYTE *pVRAM, ULONG uBitsPerPixel, ULONG uBytesPerLine,
    165                               ULONG uWidth, ULONG uHeight,
    166                               BOOL *pbFinished);
    167 
    168     STDMETHOD(VideoModeSupported) (ULONG uWidth, ULONG uHeight, ULONG uBPP,
    169                                    BOOL *pbSupported);
     163    STDMETHOD(RequestResize)(ULONG uScreenId, ULONG uPixelFormat,
     164                             BYTE *pVRAM, ULONG uBitsPerPixel, ULONG uBytesPerLine,
     165                             ULONG uWidth, ULONG uHeight,
     166                             BOOL *pbFinished);
     167
     168    STDMETHOD(VideoModeSupported)(ULONG uWidth, ULONG uHeight, ULONG uBPP,
     169                                  BOOL *pbSupported);
    170170
    171171    STDMETHOD(GetVisibleRegion)(BYTE *pRectangles, ULONG uCount, ULONG *puCountCopied);
     
    247247    bool m_fIsDeleted;
    248248
    249 #if defined (Q_OS_WIN32)
     249#if defined(Q_OS_WIN32)
    250250private:
    251251
  • trunk/src/VBox/Main/include/FramebufferImpl.h

    r41187 r41201  
    3232    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Framebuffer, IFramebuffer)
    3333
    34     DECLARE_NOT_AGGREGATABLE (Framebuffer)
     34    DECLARE_NOT_AGGREGATABLE(Framebuffer)
    3535
    3636    DECLARE_PROTECT_FINAL_CONSTRUCT()
    3737
    38     BEGIN_COM_MAP (Framebuffer)
    39         VBOX_DEFAULT_INTERFACE_ENTRIES (IFramebuffer)
     38    BEGIN_COM_MAP(Framebuffer)
     39        VBOX_DEFAULT_INTERFACE_ENTRIES(IFramebuffer)
    4040    END_COM_MAP()
    4141
    42     DECLARE_EMPTY_CTOR_DTOR (Framebuffer)
     42    DECLARE_EMPTY_CTOR_DTOR(Framebuffer)
    4343
    4444    /* IFramebuffer properties */
    45     STDMETHOD(COMGETTER(Address)) (BYTE **aAddress) = 0;
    46     STDMETHOD(COMGETTER(Width)) (ULONG *aWidth) = 0;
    47     STDMETHOD(COMGETTER(Height)) (ULONG *aHeight) = 0;
    48     STDMETHOD(COMGETTER(BitsPerPixel)) (ULONG *aBitsPerPixel) = 0;
    49     STDMETHOD(COMGETTER(BytesPerLine)) (ULONG *aBytesPerLine) = 0;
    50     STDMETHOD(COMGETTER(PixelFormat)) (ULONG *aPixelFormat) = 0;
    51     STDMETHOD(COMGETTER(UsesGuestVRAM)) (BOOL *aUsesGuestVRAM) = 0;
    52     STDMETHOD(COMGETTER(HeightReduction)) (ULONG *aHeightReduction) = 0;
    53     STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay) = 0;
    54     STDMETHOD(COMGETTER(WinId)) (ULONG64 *winId) = 0;
     45    STDMETHOD(COMGETTER(Address))(BYTE **aAddress) = 0;
     46    STDMETHOD(COMGETTER(Width))(ULONG *aWidth) = 0;
     47    STDMETHOD(COMGETTER(Height))(ULONG *aHeight) = 0;
     48    STDMETHOD(COMGETTER(BitsPerPixel))(ULONG *aBitsPerPixel) = 0;
     49    STDMETHOD(COMGETTER(BytesPerLine))(ULONG *aBytesPerLine) = 0;
     50    STDMETHOD(COMGETTER(PixelFormat))(ULONG *aPixelFormat) = 0;
     51    STDMETHOD(COMGETTER(UsesGuestVRAM))(BOOL *aUsesGuestVRAM) = 0;
     52    STDMETHOD(COMGETTER(HeightReduction))(ULONG *aHeightReduction) = 0;
     53    STDMETHOD(COMGETTER(Overlay))(IFramebufferOverlay **aOverlay) = 0;
     54    STDMETHOD(COMGETTER(WinId))(ULONG64 *winId) = 0;
    5555
    5656    /* IFramebuffer methods */
     
    5858    STDMETHOD(Unlock)() = 0;
    5959
    60     STDMETHOD(RequestResize) (ULONG aScreenId, ULONG aPixelFormat,
    61                               BYTE *aVRAM, ULONG aBitsPerPixel, ULONG aBytesPerLine,
    62                               ULONG aWidth, ULONG aHeight,
    63                               BOOL *aFinished) = 0;
     60    STDMETHOD(RequestResize)(ULONG aScreenId, ULONG aPixelFormat,
     61                             BYTE *aVRAM, ULONG aBitsPerPixel, ULONG aBytesPerLine,
     62                             ULONG aWidth, ULONG aHeight,
     63                             BOOL *aFinished) = 0;
    6464
    65     STDMETHOD(VideoModeSupported) (ULONG aWidth, ULONG aHeight, ULONG aBPP,
    66                                    BOOL *aSupported) = 0;
     65    STDMETHOD(VideoModeSupported)(ULONG aWidth, ULONG aHeight, ULONG aBPP,
     66                                  BOOL *aSupported) = 0;
    6767
    6868    STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount,
    69                                ULONG *aCountCopied) = 0;
     69                                ULONG *aCountCopied) = 0;
    7070    STDMETHOD(SetVisibleRegion)(BYTE *aRectangles, ULONG aCount) = 0;
    7171
Note: See TracChangeset for help on using the changeset viewer.

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