VirtualBox

Changeset 3153 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jun 19, 2007 9:40:23 AM (18 years ago)
Author:
vboxsync
Message:

Multimonitor support.

Location:
trunk/src/VBox/Main/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r2981 r3153  
    7979     * Forwarders to VRDP server library.
    8080     */
    81     void SendUpdate (void *pvUpdate, uint32_t cbUpdate) const;
     81    void SendUpdate (unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate) const;
    8282    void SendResize (void) const;
    83     void SendUpdateBitmap (uint32_t x, uint32_t y, uint32_t w, uint32_t h) const;
     83    void SendUpdateBitmap (unsigned uScreenId, uint32_t x, uint32_t y, uint32_t w, uint32_t h) const;
    8484    void SetFramebuffer (IFramebuffer *framebuffer, uint32_t fFlags) const;
    8585
     
    113113    static void (VBOXCALL *mpfnVRDPSetCallback)     (HVRDPSERVER hServer, VRDPSERVERCALLBACK *pcallback, void *pvUser);
    114114    static void (VBOXCALL *mpfnVRDPShutdownServer)  (HVRDPSERVER hServer);
    115     static void (VBOXCALL *mpfnVRDPSendUpdateBitmap)(HVRDPSERVER hServer, unsigned x, unsigned y, unsigned w, unsigned h);
     115    static void (VBOXCALL *mpfnVRDPSendUpdateBitmap)(HVRDPSERVER hServer, unsigned uScreenId, unsigned x, unsigned y, unsigned w, unsigned h);
    116116    static void (VBOXCALL *mpfnVRDPSendResize)      (HVRDPSERVER hServer);
    117117    static void (VBOXCALL *mpfnVRDPSendAudioSamples)(HVRDPSERVER hserver, void *pvSamples, uint32_t cSamples, VRDPAUDIOFORMAT format);
     
    122122    static void (VBOXCALL *mpfnVRDPSendUSBRequest)  (HVRDPSERVER hserver, void *pvParms, uint32_t cbParms);
    123123#endif /* VRDP_MC */
    124     static void (VBOXCALL *mpfnVRDPSendUpdate)      (HVRDPSERVER hServer, void *pvUpdate, uint32_t cbUpdate);
     124    static void (VBOXCALL *mpfnVRDPSendUpdate)      (HVRDPSERVER hServer, unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate);
    125125    static void (VBOXCALL *mpfnVRDPQueryInfo)       (HVRDPSERVER hserver, uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut);
    126126    static void (VBOXCALL *mpfnVRDPClipboard)       (HVRDPSERVER hserver, uint32_t u32Function, uint32_t u32Format, const void *pvData, uint32_t cbData, uint32_t *pcbActualRead);
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r3110 r3153  
    2424
    2525#include "VirtualBoxBase.h"
     26#include "SchemaDefs.h"
    2627#include <iprt/semaphore.h>
    2728#include <VBox/pdm.h>
    2829#include <VBox/VBoxGuest.h>
     30#include <VBox/VBoxVideo.h>
    2931
    3032class Console;
     33
     34enum {
     35    ResizeStatus_Void,
     36    ResizeStatus_InProgress,
     37    ResizeStatus_UpdateDisplayData
     38};
     39
     40typedef struct _DISPLAYFBINFO
     41{
     42    uint32_t u32Offset;
     43    uint32_t u32MaxFramebufferSize;
     44    uint32_t u32InformationSize;
     45
     46    ComPtr<IFramebuffer> pFramebuffer;
     47
     48    LONG xOrigin;
     49    LONG yOrigin;
     50
     51    ULONG w;
     52    ULONG h;
     53
     54    VBOXVIDEOINFOHOSTEVENTS *pHostEvents;
     55
     56    volatile uint32_t u32ResizeStatus;
     57   
     58    /* The Framebuffer has default format and must be updates immediately. */
     59    bool fDefaultFormat;
     60   
     61    struct {
     62        /* The rectangle that includes all dirty rectangles. */
     63        int32_t xLeft;
     64        int32_t xRight;
     65        int32_t yTop;
     66        int32_t yBottom;
     67    } dirtyRect;
     68
     69} DISPLAYFBINFO;
    3170
    3271class ATL_NO_VTABLE Display :
     
    5998
    6099    // public methods only for internal purposes
    61     int handleDisplayResize (uint32_t bpp, void *pvVRAM, uint32_t cbLine, int w, int h);
     100    int handleDisplayResize (unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine, int w, int h);
    62101    void handleDisplayUpdate (int x, int y, int cx, int cy);
    63102    IFramebuffer *getFramebuffer()
    64103    {
    65         return mFramebuffer;
     104        return maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN].pFramebuffer;
    66105    }
    67106
     
    138177    STDMETHOD(UnlockFramebuffer)();
    139178    STDMETHOD(RegisterExternalFramebuffer)(IFramebuffer *frameBuf);
     179    STDMETHOD(SetFramebuffer)(ULONG aScreenId, IFramebuffer * aFramebuffer);
     180    STDMETHOD(QueryFramebuffer)(ULONG aScreenId, IFramebuffer * * aFramebuffer, LONG * aXOrigin, LONG * aYOrigin);
    140181    STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG colorDepth, ULONG display);
    141182    STDMETHOD(TakeScreenShot)(BYTE *address, ULONG width, ULONG height);
    142183    STDMETHOD(DrawToScreen)(BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height);
    143184    STDMETHOD(InvalidateAndUpdate)();
    144     STDMETHOD(ResizeCompleted)();
     185    STDMETHOD(ResizeCompleted)(ULONG aScreenId);
    145186    STDMETHOD(UpdateCompleted)();
    146187
     
    155196
    156197    static DECLCALLBACK(int) changeFramebuffer (Display *that, IFramebuffer *aFB,
    157                                                 bool aInternal);
     198                                                bool aInternal, unsigned uScreenId);
    158199
    159200    static DECLCALLBACK(void*) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);
     
    166207    static DECLCALLBACK(void)  displayResetCallback(PPDMIDISPLAYCONNECTOR pInterface);
    167208    static DECLCALLBACK(void)  displayLFBModeChangeCallback(PPDMIDISPLAYCONNECTOR pInterface, bool fEnabled);
     209    static DECLCALLBACK(void)  displayProcessAdapterDataCallback(PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, uint32_t u32VRAMSize);
     210    static DECLCALLBACK(void)  displayProcessDisplayDataCallback(PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, unsigned uScreenId);
    168211
    169212    ComObjPtr <Console, ComWeakRef> mParent;
     
    175218    bool                    mfVMMDevInited;
    176219    bool mInternalFramebuffer;
    177     ComPtr<IFramebuffer> mFramebuffer;
     220//    ComPtr<IFramebuffer> mFramebuffer;
     221
     222    unsigned mcMonitors;
     223    DISPLAYFBINFO maFramebuffers[SchemaDefs::MaxGuestMonitors];
     224
    178225    bool mFramebufferOpened;
    179226    /** bitmask of acceleration operations supported by current framebuffer */
     
    206253
    207254    void handleResizeCompletedEMT (void);
    208     volatile uint32_t mu32ResizeStatus;
    209    
    210     enum {
    211         ResizeStatus_Void,
    212         ResizeStatus_InProgress,
    213         ResizeStatus_UpdateDisplayData
    214     };
     255//    volatile uint32_t mu32ResizeStatus;
    215256};
    216257
  • trunk/src/VBox/Main/include/FramebufferImpl.h

    r2981 r3153  
    6363                            ULONG w, ULONG h,
    6464                            BOOL *finished);
    65     STDMETHOD(RequestResize)(FramebufferPixelFormat_T pixelFormat, BYTE *vram,
     65    STDMETHOD(RequestResize)(ULONG uScreenId, FramebufferPixelFormat_T pixelFormat, BYTE *vram,
    6666                             ULONG lineSize, ULONG w, ULONG h,
    6767                             BOOL *finished);
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