Framebuffer.h revision ab06f8d7650d6b6784b7489b4e6db9f693753fd8
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VBox frontends: VBoxSDL (simple frontend based on SDL):
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Declaration of VBoxSDLFB (SDL framebuffer) class
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright (C) 2006-2012 Oracle Corporation
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * available from http://www.virtualbox.org. This file is free software;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * you can redistribute it and/or modify it under the terms of the GNU
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * General Public License (GPL) as published by the Free Software
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/* function pointers */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncextern DECLSPEC TTF_Font* (SDLCALL *pTTF_OpenFont)(const char *file, int ptsize);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncextern DECLSPEC SDL_Surface* (SDLCALL *pTTF_RenderUTF8_Solid)(TTF_Font *font, const char *text, SDL_Color fg);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncextern DECLSPEC SDL_Surface* (SDLCALL *pTTF_RenderUTF8_Shaded)(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncextern DECLSPEC SDL_Surface* (SDLCALL *pTTF_RenderUTF8_Blended)(TTF_Font *font, const char *text, SDL_Color fg);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncextern DECLSPEC void (SDLCALL *pTTF_CloseFont)(TTF_Font *font);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif /* VBOX_SECURELABEL && !VBOX_WITH_SDL13 */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync bool fFullscreen = false, bool fResizable = true, bool fShowSDLConfig = false,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync bool fKeepHostRes = false, uint32_t u32FixedWidth = ~(uint32_t)0,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync uint32_t u32FixedHeight = ~(uint32_t)0, uint32_t u32FixedBPP = ~(uint32_t)0);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync static void uninit();
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(BitsPerPixel))(ULONG *bitsPerPixel);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(BytesPerLine))(ULONG *bytesPerLine);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(PixelFormat)) (ULONG *pixelFormat);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(NotifyUpdate)(ULONG x, ULONG y, ULONG w, ULONG h);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(VideoModeSupported)(ULONG width, ULONG height, ULONG bpp, BOOL *supported);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(SetVisibleRegion)(BYTE *aRectangles, ULONG aCount);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync STDMETHOD(Notify3DEvent)(ULONG uType, BYTE *pReserved);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync // internal public methods
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync void update(int x, int y, int w, int h, bool fGuestRelative);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync void getFullscreenGeometry(uint32_t *width, uint32_t *height);
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync bool hasWindow(SDL_WindowID id) { return mScreen && mWindow == id; }
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int initSecureLabel(uint32_t height, char *font, uint32_t pointsize, uint32_t labeloffs);
#ifdef VBOX_WITH_SDL13
bool mfInitialized;
bool mfFullscreen;
bool mfKeepHostRes;
bool mfResizable;
bool mfShowSDLConfig;
#ifdef VBOX_SECURELABEL
#ifdef RT_OS_WINDOWS
long refcnt;
bool mfUpdates;
#ifdef RT_OS_WINDOWS
if (cnt == 0)
return cnt;
#ifdef RT_OS_WINDOWS
long refcnt;