SDLFramebuffer.cpp revision d00167eae3bb1cbd4b7b5d0837eeffee1e7276aa
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * VBox frontends: Basic Frontend (BFE):
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Implementation of SDLFramebuffer class
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * available from http://www.virtualbox.org. This file is free software;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * you can redistribute it and/or modify it under the terms of the GNU
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * General Public License (GPL) as published by the Free Software
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * additional information or have any questions.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync// Constructor / destructor
int rc;
#if defined (RT_OS_WINDOWS)
refcnt = 0;
mfFullscreen = false;
mTopOffset = 0;
#ifdef VBOX_SECURELABEL
mLabelHeight = 0;
#ifdef RT_OS_LINUX
resize();
#ifdef VBOX_SECURELABEL
if (mLabelFont)
TTF_Quit();
if (!width)
return E_INVALIDARG;
return S_OK;
if (!height)
return E_INVALIDARG;
return S_OK;
return S_OK;
return S_OK;
if (!address)
return E_INVALIDARG;
#ifdef RT_OS_OS2 /* Play safe for now - this is vital when we get a larger surface than requested. */
return S_OK;
if (!bitsPerPixel)
return E_INVALIDARG;
return S_OK;
if (!lineSize)
return E_INVALIDARG;
return S_OK;
#ifdef VBOXBFE_WITH_X11
SDL_GetError()));
return S_OK;
if (!finished)
return E_FAIL;
mWidth = w;
mHeight = h;
*finished = false;
return S_OK;
if (!rects)
return E_POINTER;
return S_OK;
if (!rects)
return E_POINTER;
return S_OK;
return E_NOTIMPL;
if (mfFullscreen)
#ifdef RT_OS_WINDOWS
#ifdef VBOX_SECURELABEL
#ifdef VBOX_SECURELABEL
if (!mScreen)
mTopOffset = 0;
if (mScreen)
repaint();
#ifdef VBOXBFE_WITH_X11
#ifdef VBOX_SECURELABEL
#ifdef VBOX_SECURELABEL
paintSecureLabel(x, y, w, h, false);
return mfFullscreen;
resize();
return mTopOffset;
#ifdef VBOX_SECURELABEL
LogFlow(("SDLFramebuffer:initSecureLabel: new offset: %d pixels, new font: %s, new pointsize: %d\n",
TTF_Init();
if (!mLabelFont)
return VERR_OPEN_FAILED;
repaint();
return VINF_SUCCESS;
paintSecureLabel(0, 0, 0, 0, true);