VirtualBox

Ignore:
Timestamp:
Jan 23, 2010 12:51:04 AM (15 years ago)
Author:
vboxsync
Message:

pdmifs.h: the final batch of refactored interface ID code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r25971 r25985  
    5858    PPDMIDISPLAYPORT            pUpPort;
    5959    /** Our display connector interface. */
    60     PDMIDISPLAYCONNECTOR        Connector;
     60    PDMIDISPLAYCONNECTOR        IConnector;
    6161#if defined(VBOX_WITH_VIDEOHWACCEL)
    6262    /** VBVA callbacks */
     
    6666
    6767/** Converts PDMIDISPLAYCONNECTOR pointer to a DRVMAINDISPLAY pointer. */
    68 #define PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface)  RT_FROM_MEMBER(pInterface, DRVMAINDISPLAY, Connector)
     68#define PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface)  RT_FROM_MEMBER(pInterface, DRVMAINDISPLAY, IConnector)
    6969
    7070#ifdef DEBUG_sunlover
     
    10011001#ifdef DEBUG_sunlover
    10021002    LogFlowFunc (("%d,%d %dx%d (%d,%d)\n",
    1003                   x, y, w, h, mpDrv->Connector.cx, mpDrv->Connector.cy));
     1003                  x, y, w, h, mpDrv->IConnector.cx, mpDrv->IConnector.cy));
    10041004#endif /* DEBUG_sunlover */
    10051005
     
    10191019
    10201020    if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN)
    1021         checkCoordBounds (&x, &y, &w, &h, mpDrv->Connector.cx, mpDrv->Connector.cy);
     1021        checkCoordBounds (&x, &y, &w, &h, mpDrv->IConnector.cx, mpDrv->IConnector.cy);
    10221022    else
    10231023        checkCoordBounds (&x, &y, &w, &h, maFramebuffers[uScreenId].w,
     
    19471947    CHECK_CONSOLE_DRV (mpDrv);
    19481948
    1949     *width = mpDrv->Connector.cx;
     1949    *width = mpDrv->IConnector.cx;
    19501950
    19511951    return S_OK;
     
    19691969    CHECK_CONSOLE_DRV (mpDrv);
    19701970
    1971     *height = mpDrv->Connector.cy;
     1971    *height = mpDrv->IConnector.cy;
    19721972
    19731973    return S_OK;
     
    20832083    ULONG width  = aWidth;
    20842084    if (!width)
    2085         width    = mpDrv->Connector.cx;
     2085        width    = mpDrv->IConnector.cx;
    20862086    ULONG height = aHeight;
    20872087    if (!height)
    2088         height   = mpDrv->Connector.cy;
     2088        height   = mpDrv->IConnector.cy;
    20892089    ULONG bpp    = aBitsPerPixel;
    20902090    if (!bpp)
     
    26132613        }
    26142614
    2615         mpDrv->Connector.pu8Data = (uint8_t *) address;
    2616         mpDrv->Connector.cbScanline = bytesPerLine;
    2617         mpDrv->Connector.cBits = bitsPerPixel;
    2618         mpDrv->Connector.cx = width;
    2619         mpDrv->Connector.cy = height;
     2615        mpDrv->IConnector.pu8Data = (uint8_t *) address;
     2616        mpDrv->IConnector.cbScanline = bytesPerLine;
     2617        mpDrv->IConnector.cBits = bitsPerPixel;
     2618        mpDrv->IConnector.cx = width;
     2619        mpDrv->IConnector.cy = height;
    26202620    }
    26212621    else
    26222622    {
    26232623        /* black hole */
    2624         mpDrv->Connector.pu8Data = NULL;
    2625         mpDrv->Connector.cbScanline = 0;
    2626         mpDrv->Connector.cBits = 0;
    2627         mpDrv->Connector.cx = 0;
    2628         mpDrv->Connector.cy = 0;
     2624        mpDrv->IConnector.pu8Data = NULL;
     2625        mpDrv->IConnector.cbScanline = 0;
     2626        mpDrv->IConnector.cBits = 0;
     2627        mpDrv->IConnector.cx = 0;
     2628        mpDrv->IConnector.cy = 0;
    26292629    }
    26302630}
     
    27802780                if (!pFBInfo->pFramebuffer.isNull() && pFBInfo->u32ResizeStatus == ResizeStatus_Void)
    27812781                {
    2782                     Assert(pDrv->Connector.pu8Data);
     2782                    Assert(pDrv->IConnector.pu8Data);
    27832783                    pDisplay->vbvaLock();
    27842784                    pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort);
     
    28412841                if (!pFBInfo->pFramebuffer.isNull())
    28422842                {
    2843                     Assert(pDrv->Connector.pu8Data);
     2843                    Assert(pDrv->IConnector.pu8Data);
    28442844                    Assert(pFBInfo->u32ResizeStatus == ResizeStatus_Void);
    28452845                    pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort);
     
    33693369    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    33703370    PDRVMAINDISPLAY pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY);
    3371     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    3372         return &pDrvIns->IBase;
    3373     if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYCONNECTOR_IID) == 0)
    3374         return &pDrv->Connector;
     3371    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
     3372    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIDISPLAYCONNECTOR, &pDrv->IConnector);
    33753373    return NULL;
    33763374}
     
    34233421     * Init Interfaces.
    34243422     */
    3425     pDrvIns->IBase.pfnQueryInterface       = Display::drvQueryInterface;
    3426 
    3427     pData->Connector.pfnResize             = Display::displayResizeCallback;
    3428     pData->Connector.pfnUpdateRect         = Display::displayUpdateCallback;
    3429     pData->Connector.pfnRefresh            = Display::displayRefreshCallback;
    3430     pData->Connector.pfnReset              = Display::displayResetCallback;
    3431     pData->Connector.pfnLFBModeChange      = Display::displayLFBModeChangeCallback;
    3432     pData->Connector.pfnProcessAdapterData = Display::displayProcessAdapterDataCallback;
    3433     pData->Connector.pfnProcessDisplayData = Display::displayProcessDisplayDataCallback;
     3423    pDrvIns->IBase.pfnQueryInterface        = Display::drvQueryInterface;
     3424
     3425    pData->IConnector.pfnResize             = Display::displayResizeCallback;
     3426    pData->IConnector.pfnUpdateRect         = Display::displayUpdateCallback;
     3427    pData->IConnector.pfnRefresh            = Display::displayRefreshCallback;
     3428    pData->IConnector.pfnReset              = Display::displayResetCallback;
     3429    pData->IConnector.pfnLFBModeChange      = Display::displayLFBModeChangeCallback;
     3430    pData->IConnector.pfnProcessAdapterData = Display::displayProcessAdapterDataCallback;
     3431    pData->IConnector.pfnProcessDisplayData = Display::displayProcessDisplayDataCallback;
    34343432#ifdef VBOX_WITH_VIDEOHWACCEL
    3435     pData->Connector.pfnVHWACommandProcess = Display::displayVHWACommandProcess;
     3433    pData->IConnector.pfnVHWACommandProcess = Display::displayVHWACommandProcess;
    34363434#endif
    34373435#ifdef VBOX_WITH_HGSMI
    3438     pData->Connector.pfnVBVAEnable         = Display::displayVBVAEnable;
    3439     pData->Connector.pfnVBVADisable        = Display::displayVBVADisable;
    3440     pData->Connector.pfnVBVAUpdateBegin    = Display::displayVBVAUpdateBegin;
    3441     pData->Connector.pfnVBVAUpdateProcess  = Display::displayVBVAUpdateProcess;
    3442     pData->Connector.pfnVBVAUpdateEnd      = Display::displayVBVAUpdateEnd;
    3443     pData->Connector.pfnVBVAResize         = Display::displayVBVAResize;
    3444     pData->Connector.pfnVBVAMousePointerShape = Display::displayVBVAMousePointerShape;
     3436    pData->IConnector.pfnVBVAEnable         = Display::displayVBVAEnable;
     3437    pData->IConnector.pfnVBVADisable        = Display::displayVBVADisable;
     3438    pData->IConnector.pfnVBVAUpdateBegin    = Display::displayVBVAUpdateBegin;
     3439    pData->IConnector.pfnVBVAUpdateProcess  = Display::displayVBVAUpdateProcess;
     3440    pData->IConnector.pfnVBVAUpdateEnd      = Display::displayVBVAUpdateEnd;
     3441    pData->IConnector.pfnVBVAResize         = Display::displayVBVAResize;
     3442    pData->IConnector.pfnVBVAMousePointerShape = Display::displayVBVAMousePointerShape;
    34453443#endif
    34463444
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