VirtualBox

Changeset 6458 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jan 23, 2008 6:23:24 AM (17 years ago)
Author:
vboxsync
Message:

Additions (VBoxGuestLib): Updated the seamless and fullscreen code in the R3 library

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk

    r6447 r6458  
    103103        VBoxGuestR3LibMouse.cpp \
    104104        VBoxGuestR3LibMisc.cpp \
     105        VBoxGuestR3LibSeamless.cpp \
    105106        VBoxGuestR3LibTime.cpp \
    106107
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp

    r6454 r6458  
    8181}
    8282
     83/**
     84 * Query the last display change request.
     85 *
     86 * @returns iprt status value
     87 * @retval xres     horizontal pixel resolution (0 = do not change)
     88 * @retval yres     vertical pixel resolution (0 = do not change)
     89 * @retval bpp      bits per pixel (0 = do not change)
     90 * @param  eventAck Flag that the request is an acknowlegement for the
     91 *                  VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST.
     92 *                  Values:
     93 *                      0                                   - just querying,
     94 *                      VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST - event acknowledged.
     95 * @param  display  0 for primary display, 1 for the first secondary, etc.
     96 */
     97VBGLR3DECL(int) VbglR3GetDisplayChangeRequest(uint32_t *px, uint32_t *py, uint32_t *pbpp,
     98                                              uint32_t eventAck, uint32_t display)
     99{
     100    VMMDevDisplayChangeRequest2 Req;
     101    vmmdevInitRequest(&Req.header, VMMDevReq_GetDisplayChangeRequest2);
     102    Req.xres = 0;
     103    Req.yres = 0;
     104    Req.bpp = 0;
     105    Req.eventAck = eventAck;
     106    Req.display = display;
     107    int rc = vbglR3GRPerform(&Req.header);
     108    if (RT_SUCCESS(rc))
     109    {
     110        *px = Req.xres;
     111        *py = Req.yres;
     112        *pbpp = Req.bpp;
     113    }
     114    return rc;
     115}
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp

    r6290 r6458  
    2727#include <VBox/log.h>
    2828
    29 
    30 /* Move this to a header { */
    31 
    32 extern int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData);
    33 
    34 /* } */
     29#include "VBGLR3Internal.h"
    3530
    3631/**
     
    5146    vmmdevInitRequest(&vmmreqGuestCaps.header, VMMDevReq_ReportGuestCapabilities);
    5247    vmmreqGuestCaps.caps = fState ? VMMDEV_GUEST_SUPPORTS_SEAMLESS : 0;
    53     rc = VbglR3GRPerform(&vmmreqGuestCaps.header);
     48    rc = vbglR3GRPerform(&vmmreqGuestCaps.header);
    5449#ifdef DEBUG
    5550    if (RT_SUCCESS(rc))
     
    8782            vmmdevInitRequest(&seamlessChangeRequest.header, VMMDevReq_GetSeamlessChangeRequest);
    8883            seamlessChangeRequest.eventAck = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
    89             rc = VbglR3GRPerform(&seamlessChangeRequest.header);
     84            rc = vbglR3GRPerform(&seamlessChangeRequest.header);
    9085            if (RT_SUCCESS(rc))
    9186            {
     
    107102 * @param   pRects list of visible rectangles on the guest display
    108103 *
    109  * @todo A scatter-gather version of VbglR3GRPerform would be nice, so that we don't have
     104 * @todo A scatter-gather version of vbglR3GRPerform would be nice, so that we don't have
    110105 *       to copy our rectangle and header data into a single structure and perform an
    111106 *       additional allocation.
     
    118113    if (0 == cRects)
    119114        return VINF_SUCCESS;
    120     rc = VbglR3GRAlloc((VMMDevRequestHeader **)&req,
     115    rc = vbglR3GRAlloc((VMMDevRequestHeader **)&req,
    121116                       sizeof(VMMDevVideoSetVisibleRegion) + (cRects - 1) * sizeof(RTRECT),
    122117                       VMMDevReq_VideoSetVisibleRegion);
     
    125120        req->cRect = cRects;
    126121        memcpy(&req->Rect, pRects, cRects * sizeof(RTRECT));
    127         rc = VbglR3GRPerform(&req->header);
    128         VbglR3GRFree(&req->header);
     122        rc = vbglR3GRPerform(&req->header);
     123        vbglR3GRFree(&req->header);
    129124        if (RT_SUCCESS(rc))
    130125        {
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