VirtualBox

Changeset 3669 in vbox for trunk/src/VBox/Frontends/VBoxSDL


Ignore:
Timestamp:
Jul 17, 2007 9:12:18 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
22945
Message:

replace underscore symbols in VBoxBFE/ and VBoxSDL/

Location:
trunk/src/VBox/Frontends/VBoxSDL
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r3614 r3669  
    3030#include <iprt/stream.h>
    3131
    32 #ifdef __OS2__
     32#ifdef RT_OS_OS2
    3333# undef RT_MAX
    3434// from <iprt/cdefs.h>
     
    8787    LogFlow(("VBoxSDLFB::VBoxSDLFB\n"));
    8888
    89 #if defined (__WIN__)
     89#if defined (RT_OS_WINDOWS)
    9090    refcnt = 0;
    9191#endif
     
    122122    AssertMsg(rc == VINF_SUCCESS, ("Error from RTCritSectInit!\n"));
    123123
    124 #ifdef __WIN__
     124#ifdef RT_OS_WINDOWS
    125125    /* default to DirectX if nothing else set */
    126126    if (!getenv("SDL_VIDEODRIVER"))
     
    130130    }
    131131#endif
    132 #ifdef __LINUX__
     132#ifdef RT_OS_LINUX
    133133    /* On some X servers the mouse is stuck inside the bottom right corner.
    134134     * See http://wiki.clug.org.za/wiki/QEMU_mouse_not_working */
     
    142142    }
    143143
    144 #ifdef __LINUX__
     144#ifdef RT_OS_LINUX
    145145    /* NOTE: we still want Ctrl-C to work, so we undo the SDL redirections */
    146146    signal(SIGINT, SIG_DFL);
     
    392392             x, y, w, h));
    393393
    394 #ifdef __LINUX__
     394#ifdef RT_OS_LINUX
    395395    /*
    396396     * SDL does not allow us to make this call from any other thread than
     
    406406    event.user.data2 = (void*)(w << 16 | h);
    407407    PushNotifyUpdateEvent(&event);
    408 #else /* !__LINUX__ */
     408#else /* !RT_OS_LINUX */
    409409    update(x, y, w, h, true /* fGuestRelative */);
    410 #endif /* !__LINUX__ */
     410#endif /* !RT_OS_LINUX */
    411411
    412412    /*
     
    796796void VBoxSDLFB::update(int x, int y, int w, int h, bool fGuestRelative)
    797797{
    798 #ifdef __LINUX__
     798#ifdef RT_OS_LINUX
    799799    AssertMsg(mSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n"));
    800800#endif
     
    995995void VBoxSDLFB::paintSecureLabel(int x, int y, int w, int h, bool fForce)
    996996{
    997 #ifdef __LINUX__
     997#ifdef RT_OS_LINUX
    998998    AssertMsg(mSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n"));
    999999#endif
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h

    r3578 r3669  
    5252    virtual ~VBoxSDLFB();
    5353
    54 #ifdef __WIN__
     54#ifdef RT_OS_WINDOWS
    5555    STDMETHOD_(ULONG, AddRef)()
    5656    {
     
    179179    uint32_t mLabelHeight;
    180180#endif
    181 #ifdef __WIN__
     181#ifdef RT_OS_WINDOWS
    182182    long refcnt;
    183183#endif
     
    200200    virtual ~VBoxSDLFBOverlay();
    201201
    202 #ifdef __WIN__
     202#ifdef RT_OS_WINDOWS
    203203    STDMETHOD_(ULONG, AddRef)()
    204204    {
     
    285285    /** Additional SDL surface used for combining the framebuffer and the overlay */
    286286    SDL_Surface *mBlendedBits;
    287 #ifdef __WIN__
     287#ifdef RT_OS_WINDOWS
    288288    long refcnt;
    289289#endif
  • trunk/src/VBox/Frontends/VBoxSDL/Helper.h

    r3289 r3669  
    2424#define __H_HELPER
    2525
    26 #if defined(VBOX_WITH_XPCOM) && !defined(__DARWIN__) && !defined(__OS2__)
     26#if defined(VBOX_WITH_XPCOM) && !defined(RT_OS_DARWIN) && !defined(RT_OS_OS2)
    2727
    2828/** Indicates that the XPCOM queue thread is needed for this platform. */
     
    5252void terminateXPCOMQueueThread(void);
    5353
    54 #endif /* defined(VBOX_WITH_XPCOM) && !defined(__DARWIN__) && !defined(__OS2__) */
     54#endif /* defined(VBOX_WITH_XPCOM) && !defined(RT_OS_DARWIN) && !defined(RT_OS_OS2) */
    5555
    5656#endif // __H_HELPER
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r3667 r3669  
    3434using namespace com;
    3535
    36 #if defined (__LINUX__)
     36#if defined (RT_OS_LINUX)
    3737#include <X11/Xlib.h>
    3838#include <X11/cursorfont.h>      /* for XC_left_ptr */
     
    185185static VBoxSDLFB  *gpFrameBuffer = NULL;
    186186static SDL_Cursor *gpDefaultCursor = NULL;
    187 #ifdef __LINUX__
     187#ifdef RT_OS_LINUX
    188188static Cursor      gpDefaultOrigX11Cursor;
    189189#endif
     
    193193static SDL_TimerID gSdlResizeTimer = NULL;
    194194
    195 #ifdef __LINUX__
     195#ifdef RT_OS_LINUX
    196196static SDL_SysWMinfo gSdlInfo;
    197197#endif
    198198
    199199#ifdef VBOX_SECURELABEL
    200 #ifdef __WIN__
     200#ifdef RT_OS_WINDOWS
    201201#define LIBSDL_TTF_NAME "SDL_ttf"
    202202#else
     
    218218    VBoxSDLCallback()
    219219    {
    220 #if defined (__WIN__)
     220#if defined (RT_OS_WINDOWS)
    221221        refcnt = 0;
    222222#endif
     
    227227    }
    228228
    229 #ifdef __WIN__
     229#ifdef RT_OS_WINDOWS
    230230    STDMETHOD_(ULONG, AddRef)()
    231231    {
     
    346346
    347347private:
    348 #ifdef __WIN__
     348#ifdef RT_OS_WINDOWS
    349349    long refcnt;
    350350#endif
     
    361361    VBoxSDLConsoleCallback() : m_fIgnorePowerOffEvents(false)
    362362    {
    363 #if defined (__WIN__)
     363#if defined (RT_OS_WINDOWS)
    364364        refcnt = 0;
    365365#endif
     
    370370    }
    371371
    372 #ifdef __WIN__
     372#ifdef RT_OS_WINDOWS
    373373    STDMETHOD_(ULONG, AddRef)()
    374374    {
     
    570570
    571571private:
    572 #ifdef __WIN__
     572#ifdef RT_OS_WINDOWS
    573573    long refcnt;
    574574#endif
     
    601601             "  -detecthostkey           Get the hostkey identifier and modifier state\n"
    602602             "  -hostkey <key> {<key2>} <mod> Set the host key to the values obtained using -detecthostkey\n"
    603 #if defined(__LINUX__) || defined(__DARWIN__) /** @todo UNIXISH_TAP stuff out of main and up to Config.kmk! */
     603#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) /** @todo UNIXISH_TAP stuff out of main and up to Config.kmk! */
    604604             "  -tapdev<1-N> <dev>       Use existing persistent TAP device with the given name\n"
    605605             "  -tapfd<1-N> <fd>         Use existing TAP device, don't allocate\n"
     
    652652}
    653653
    654 #ifdef __LINUX__
     654#ifdef RT_OS_LINUX
    655655/**
    656656 * Custom signal handler. Currently it is only used to release modifier
     
    669669    }
    670670}
    671 #endif /* __LINUX__ */
     671#endif /* RT_OS_LINUX */
    672672
    673673/** entry point */
     
    684684    }
    685685
    686 #ifdef __LINUX__
     686#ifdef RT_OS_LINUX
    687687    /*
    688688     * Lock keys on SDL behave different from normal keys: A KeyPress event is generated
     
    927927    sysInfo->COMGETTER (NetworkAdapterCount) (&NetworkAdapterCount);
    928928
    929 #if defined(__LINUX__) || defined(__DARWIN__)
     929#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
    930930    std::vector <Bstr> tapdev (NetworkAdapterCount);
    931931    std::vector <int> tapfd (NetworkAdapterCount, 0);
     
    10971097            }
    10981098        }
    1099 #if defined(__LINUX__) || defined(__DARWIN__)
     1099#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
    11001100        else if (strncmp(argv[curArg], "-tapdev", 7) == 0)
    11011101        {
     
    11241124            curArg++;
    11251125        }
    1126 #endif /* __LINUX__ || __DARWIN__ */
     1126#endif /* RT_OS_LINUX || RT_OS_DARWIN */
    11271127#ifdef VBOX_VRDP
    11281128        else if (strcmp(argv[curArg], "-vrdp") == 0)
     
    16541654    consoleCallback->ignorePowerOffEvents(true);
    16551655
    1656 #if defined(__LINUX__) || defined(__DARWIN__)
     1656#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
    16571657    /*
    16581658     * Do we have a TAP device name or file descriptor? If so, communicate
     
    16911691        }
    16921692    }
    1693 #endif /* __LINUX__ || __DARWIN__ */
     1693#endif /* RT_OS_LINUX || RT_OS_DARWIN */
    16941694
    16951695#ifdef VBOX_VRDP
     
    17801780    gpDefaultCursor = SDL_GetCursor();
    17811781
    1782 #ifdef __LINUX__
     1782#ifdef RT_OS_LINUX
    17831783    /* Get Window Manager info. We only need the X11 display. */
    17841784    SDL_VERSION(&gSdlInfo.version);
     
    17941794    *(Cursor*)gpDefaultCursor->wm_cursor = XCreateFontCursor(gSdlInfo.info.x11.display, XC_left_ptr);
    17951795    SDL_SetCursor(gpDefaultCursor);
    1796 #endif /* __LINUX__ */
     1796#endif /* RT_OS_LINUX */
    17971797
    17981798    /* create a fake empty cursor */
     
    18071807     * Register our user signal handler.
    18081808     */
    1809 #ifdef __LINUX__
     1809#ifdef RT_OS_LINUX
    18101810    struct sigaction sa;
    18111811    sa.sa_sigaction = signal_handler;
     
    18131813    sa.sa_flags = SA_RESTART | SA_SIGINFO;
    18141814    sigaction (SIGUSR1, &sa, NULL);
    1815 #endif /* __LINUX__ */
     1815#endif /* RT_OS_LINUX */
    18161816
    18171817    /*
     
    23942394leave:
    23952395    LogFlow(("leaving...\n"));
    2396 #if defined(VBOX_WITH_XPCOM) && !defined(__DARWIN__) && !defined(__OS2__)
     2396#if defined(VBOX_WITH_XPCOM) && !defined(RT_OS_DARWIN) && !defined(RT_OS_OS2)
    23972397    /* make sure the XPCOM event queue thread doesn't do anything harmful */
    23982398    terminateXPCOMQueueThread();
     
    24532453    if (gpDefaultCursor)
    24542454    {
    2455 #ifdef __LINUX__
     2455#ifdef RT_OS_LINUX
    24562456        Cursor pDefaultTempX11Cursor = *(Cursor*)gpDefaultCursor->wm_cursor;
    24572457        *(Cursor*)gpDefaultCursor->wm_cursor = gpDefaultOrigX11Cursor;
    2458 #endif /* __LNUX__ */
     2458#endif /* RT_OS_LINUX */
    24592459        SDL_SetCursor(gpDefaultCursor);
    2460 #ifdef __LINUX__
     2460#ifdef RT_OS_LINUX
    24612461        XFreeCursor(gSdlInfo.info.x11.display, pDefaultTempX11Cursor);
    2462 #endif /* __LINUX__ */
     2462#endif /* RT_OS_LINUX */
    24632463    }
    24642464
     
    24702470        if (pCustomTempWMCursor)
    24712471        {
    2472 #if defined (__WIN__)
     2472#if defined (RT_OS_WINDOWS)
    24732473            ::DestroyCursor(*(HCURSOR *) pCustomTempWMCursor);
    2474 #elif defined (__LINUX__)
     2474#elif defined (RT_OS_LINUX)
    24752475            XFreeCursor(gSdlInfo.info.x11.display, *(Cursor *) pCustomTempWMCursor);
    24762476#endif
     
    25372537}
    25382538
    2539 #if defined(__DARWIN__)
     2539#if defined(RT_OS_DARWIN)
    25402540/**
    25412541 * Fallback keycode conversion using SDL symbols.
     
    26972697    }
    26982698}
    2699 #endif /* __DARWIN__ */
     2699#endif /* RT_OS_DARWIN */
    27002700
    27012701/**
     
    27102710    int keycode = ev->keysym.scancode;
    27112711
    2712 #ifdef __LINUX__
     2712#ifdef RT_OS_LINUX
    27132713    // workaround for SDL keyboard translation issues on Linux
    27142714    // keycodes > 0x100 are sent as 0xe0 keycode
     
    28072807    }
    28082808
    2809 #elif defined(__DARWIN__)
     2809#elif defined(RT_OS_DARWIN)
    28102810    /* This is derived partially from SDL_QuartzKeys.h and partially from testing. */
    28112811    static const uint16_t s_aMacToSet1[] =
     
    29802980#endif
    29812981
    2982 #endif /* __DARWIN__ */
     2982#endif /* RT_OS_DARWIN */
    29832983    return keycode;
    29842984}
     
    32053205}
    32063206
    3207 #ifdef __DARWIN__
     3207#ifdef RT_OS_DARWIN
    32083208#include <Carbon/Carbon.h>
    32093209__BEGIN_DECLS
     
    32653265        g_fHotKeysDisabled = enmMode == kCGSGlobalHotKeyDisable;
    32663266}
    3267 #endif /* __DARWIN__ */
     3267#endif /* RT_OS_DARWIN */
    32683268
    32693269/**
     
    32723272static void InputGrabStart(void)
    32733273{
    3274 #ifdef __DARWIN__
     3274#ifdef RT_OS_DARWIN
    32753275    DisableGlobalHotKeys(true);
    32763276#endif
     
    32923292    if (!gfGuestNeedsHostCursor)
    32933293        SDL_ShowCursor(SDL_ENABLE);
    3294 #ifdef __DARWIN__
     3294#ifdef RT_OS_DARWIN
    32953295    DisableGlobalHotKeys(false);
    32963296#endif
     
    34883488     */
    34893489    LONG    cPercent = 0;
    3490 #ifndef __DARWIN__ /* don't break the other guys yet. */
     3490#ifndef RT_OS_DARWIN /* don't break the other guys yet. */
    34913491    for (;;)
    34923492    {
     
    35823582    sdlTimer = 0;
    35833583
    3584 #endif /* __DARWIN__ */
     3584#endif /* RT_OS_DARWIN */
    35853585
    35863586    /*
     
    38173817#endif
    38183818
    3819 #if defined (__WIN__)
     3819#if defined (RT_OS_WINDOWS)
    38203820
    38213821        BITMAPV5HEADER bi;
     
    39613961            ::DeleteObject (hBitmap);
    39623962
    3963 #elif defined (__LINUX__)
     3963#elif defined (RT_OS_LINUX)
    39643964
    39653965        XcursorImage *img = XcursorImageCreate (data->width, data->height);
     
    43394339}
    43404340
    4341 #ifdef __LINUX__
     4341#ifdef RT_OS_LINUX
    43424342/**
    43434343 * Special SDL_PushEvent function for NotifyUpdate events. These events may occur in bursts
     
    43644364        RTThreadYield();
    43654365}
    4366 #endif /* __LINUX__ */
     4366#endif /* RT_OS_LINUX */
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.h

    r3289 r3669  
    2424#define __H_VBOXSDL
    2525
    26 #ifdef __WIN__ /** @todo check why we need to do this on windows. */
     26#ifdef RT_OS_WINDOWS /** @todo check why we need to do this on windows. */
    2727/* convince SDL to not overload main() */
    2828#define _SDL_main_h
     
    7272#endif /* VBOX_WIN32_UI */
    7373
    74 #ifdef __LINUX__
     74#ifdef RT_OS_LINUX
    7575void PushNotifyUpdateEvent(SDL_Event *event);
    7676#endif
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDLTest.cpp

    r2981 r3669  
    2121 */
    2222
    23 #if defined(__WIN__) ///@todo someone please explain why we don't follow the book!
     23#if defined(RT_OS_WINDOWS) ///@todo someone please explain why we don't follow the book!
    2424# define _SDL_main_h
    2525#endif
     
    3838#endif
    3939
    40 #ifdef __WIN__
     40#ifdef RT_OS_WINDOWS
    4141#define ESC_NORM
    4242#define ESC_BOLD
     
    9292    }
    9393
    94 #ifdef __WIN__
     94#ifdef RT_OS_WINDOWS
    9595    /* Default to DirectX if nothing else set. "windib" would be possible.  */
    9696    if (!getenv("SDL_VIDEODRIVER"))
     
    100100#endif
    101101
    102 #ifdef __WIN__
     102#ifdef RT_OS_WINDOWS
    103103    _putenv("SDL_VIDEO_WINDOW_POS=0,0");
    104104#else
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette