Changeset 41216 in vbox for trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
- Timestamp:
- May 8, 2012 6:05:41 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77855
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
r41215 r41216 6 6 7 7 /* 8 * Copyright (C) 2006-20 12Oracle Corporation8 * Copyright (C) 2006-2007 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 43 43 44 44 class VBoxSDLFB : 45 public CComObjectRootEx<CComMultiThreadModelNoCS>,46 45 VBOX_SCRIPTABLE_IMPL(IFramebuffer) 47 46 { 48 47 public: 49 DECLARE_NOT_AGGREGATABLE(VBoxSDLFB) 50 51 DECLARE_PROTECT_FINAL_CONSTRUCT() 52 53 VBoxSDLFB() { /* empty */ } 54 ~VBoxSDLFB() { /* empty */ } 55 56 HRESULT FinalConstruct(); 57 void FinalRelease(); 58 59 HRESULT init(uint32_t uScreenId, 60 bool fFullscreen = false, bool fResizable = true, bool fShowSDLConfig = false, 61 bool fKeepHostRes = false, uint32_t u32FixedWidth = ~(uint32_t)0, 62 uint32_t u32FixedHeight = ~(uint32_t)0, uint32_t u32FixedBPP = ~(uint32_t)0); 63 void uninit(); 64 65 static bool initSDL(bool fShowSDLConfig); 66 static void uninitSDL(); 67 68 BEGIN_COM_MAP(VBoxSDLFB) 69 VBOX_MINIMAL_INTERFACE_ENTRIES(IFramebuffer) 70 END_COM_MAP() 48 VBoxSDLFB(uint32_t uScreenId, 49 bool fFullscreen = false, bool fResizable = true, bool fShowSDLConfig = false, 50 bool fKeepHostRes = false, uint32_t u32FixedWidth = ~(uint32_t)0, 51 uint32_t u32FixedHeight = ~(uint32_t)0, uint32_t u32FixedBPP = ~(uint32_t)0); 52 virtual ~VBoxSDLFB(); 53 54 static bool init(bool fShowSDLConfig); 55 static void uninit(); 56 57 #ifdef RT_OS_WINDOWS 58 STDMETHOD_(ULONG, AddRef)() 59 { 60 return ::InterlockedIncrement (&refcnt); 61 } 62 STDMETHOD_(ULONG, Release)() 63 { 64 long cnt = ::InterlockedDecrement (&refcnt); 65 if (cnt == 0) 66 delete this; 67 return cnt; 68 } 69 #endif 70 VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer) 71 72 NS_DECL_ISUPPORTS 71 73 72 74 STDMETHOD(COMGETTER(Width))(ULONG *width); … … 185 187 /** secure label offset from the top of the secure label */ 186 188 uint32_t mLabelOffs; 187 #endif 188 189 190 #endif 191 #ifdef RT_OS_WINDOWS 192 long refcnt; 193 #endif 189 194 SDL_Surface *mSurfVRAM; 190 195 … … 198 203 199 204 class VBoxSDLFBOverlay : 200 public CComObjectRootEx<CComMultiThreadModelNoCS>, 201 VBOX_SCRIPTABLE_IMPL(IFramebufferOverlay) 205 public IFramebufferOverlay 202 206 { 203 207 public: 204 DECLARE_NOT_AGGREGATABLE(VBoxSDLFBOverlay)205 206 208 VBoxSDLFBOverlay(ULONG x, ULONG y, ULONG width, ULONG height, BOOL visible, 207 209 VBoxSDLFB *aParent); 208 210 virtual ~VBoxSDLFBOverlay(); 209 211 210 BEGIN_COM_MAP(VBoxSDLFBOverlay) 211 VBOX_MINIMAL_INTERFACE_ENTRIES(IFramebufferOverlay) 212 END_COM_MAP() 212 #ifdef RT_OS_WINDOWS 213 STDMETHOD_(ULONG, AddRef)() 214 { 215 return ::InterlockedIncrement (&refcnt); 216 } 217 STDMETHOD_(ULONG, Release)() 218 { 219 long cnt = ::InterlockedDecrement (&refcnt); 220 if (cnt == 0) 221 delete this; 222 return cnt; 223 } 224 #endif 225 VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer) 226 227 NS_DECL_ISUPPORTS 213 228 214 229 STDMETHOD(COMGETTER(X))(ULONG *x); … … 260 275 /** Additional SDL surface used for combining the framebuffer and the overlay */ 261 276 SDL_Surface *mBlendedBits; 277 #ifdef RT_OS_WINDOWS 278 long refcnt; 279 #endif 262 280 }; 263 281
Note:
See TracChangeset
for help on using the changeset viewer.