VirtualBox

Ignore:
Timestamp:
Jun 15, 2010 4:10:29 PM (14 years ago)
Author:
vboxsync
Message:

Main: fixed non-Windows burns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r30207 r30209  
    377377 */
    378378#define PREP_ARGS0()
    379 #define PREP_ARGS1(a1)                    evDesc.add(a1)
    380 #define PREP_ARGS2(a1,a2)                 evDesc.add(a1).add(a2)
    381 #define PREP_ARGS3(a1,a2,a3)              evDesc.add(a1).add(a2).add(a3)
    382 #define PREP_ARGS4(a1,a2,a3,a4)           evDesc.add(a1).add(a2).add(a3).add(a4)
    383 #define PREP_ARGS5(a1,a2,a3,a4,a5)        evDesc.add(a1).add(a2).add(a3).add(a4).add(a5)
    384 #define PREP_ARGS6(a1,a2,a3,a4,a5,a6)     evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6)
    385 #define PREP_ARGS7(a1,a2,a3,a4,a5,a6,a7)  evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6).add(a7)
     379#define PREP_ARGS1(a1)                      if (nConnections) evDesc.add(a1)
     380#define PREP_ARGS2(a1,a2)                   if (nConnections) evDesc.add(a1).add(a2)
     381#define PREP_ARGS3(a1,a2,a3)                if (nConnections) evDesc.add(a1).add(a2).add(a3)
     382#define PREP_ARGS4(a1,a2,a3,a4)             if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4)
     383#define PREP_ARGS5(a1,a2,a3,a4,a5)          if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5)
     384#define PREP_ARGS6(a1,a2,a3,a4,a5,a6)       if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6)
     385#define PREP_ARGS7(a1,a2,a3,a4,a5,a6,a7)    if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6).add(a7)
     386#define PREP_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8) if (nConnections) evDesc.add(a1).add(a2).add(a3).add(a4).add(a5).add(a6).add(a7).add(a8)
    386387
    387388#else
     
    390391 * No events for XPCOM targets now. In the future it looks natural to implmenet generic events mechanism
    391392 * for all platforms and get rid of callbacks.
    392  */ 
     393 */
    393394#define CONSOLE_EVENTS_START(name,count)
    394395#define CONSOLE_EVENTS_END()
     
    401402#define PREP_ARGS6(a1,a2,a3,a4,a5,a6)
    402403#define PREP_ARGS7(a1,a2,a3,a4,a5,a6,a7)
     404#define PREP_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8)
    403405
    404406#endif
     
    426428    { \
    427429        CONSOLE_EVENTS_START(CallbackMethod,Args);   \
    428         if (nConnections) { PrepEvent; } \
     430        PrepEvent; \
    429431        CONSOLE_EVENTS_END();  \
    430432        CallbackList::iterator it = this->mCallbacks.begin(); \
     
    445447    } while (0)
    446448
    447 /* Actual invocation macro for different        number of parameters */
     449/* Actual invocation macro for different number of parameters */
    448450#define CONSOLE_DO_CALLBACKS0(CallbackMethod)                           \
    449      CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(), PREP_ARGS0(), 0)
     451     CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb-> CallbackMethod (), PREP_ARGS0(), 0)
    450452#define CONSOLE_DO_CALLBACKS1(CallbackMethod,Arg1)                      \
    451     CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1), PREP_ARGS1(Arg1), 1)
     453    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb-> CallbackMethod (Arg1), PREP_ARGS1(Arg1), 1)
    452454#define CONSOLE_DO_CALLBACKS2(CallbackMethod,Arg1,Arg2)                 \
    453     CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2), PREP_ARGS2(Arg1,Arg2), 2)
     455    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb-> CallbackMethod (Arg1,Arg2), PREP_ARGS2(Arg1,Arg2), 2)
    454456#define CONSOLE_DO_CALLBACKS3(CallbackMethod,Arg1,Arg2,Arg3)            \
    455     CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2,Arg3), PREP_ARGS3(Arg1,Arg2,Arg3), 3)
     457    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb-> CallbackMethod (Arg1,Arg2,Arg3), PREP_ARGS3(Arg1,Arg2,Arg3), 3)
    456458#define CONSOLE_DO_CALLBACKS4(CallbackMethod,Arg1,Arg2,Arg3,Arg4)       \
    457     CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2,Args3,Arg4), PREP_ARGS4(Arg1,Arg2,Arg3,Arg4), 4)
     459    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb-> CallbackMethod (Arg1,Arg2,Args3,Arg4), PREP_ARGS4(Arg1,Arg2,Arg3,Arg4), 4)
    458460#define CONSOLE_DO_CALLBACKS7(CallbackMethod,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7) \
    459     CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb->##CallbackMethod##(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), PREP_ARGS7(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), 7)
     461    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb-> CallbackMethod (Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), PREP_ARGS7(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7), 7)
     462#define CONSOLE_DO_CALLBACKS8(CallbackMethod,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8) \
     463    CONSOLE_DO_CALLBACKS_GEN(CallbackMethod, it->ptrICb-> CallbackMethod (Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8), PREP_ARGS8(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8), 8)
    460464
    461465// constructor / destructor
     
    47704774    mCallbackData.mpsc.valid = true;
    47714775
    4772     CONSOLE_DO_CALLBACKS7(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, ComSafeArrayInArg(pShape));
     4776    /**
     4777     * Although looks stupid, this is result of fact that safearrays params in XPCOM
     4778     * passed as separate pointer and length arguments.
     4779     * @todo: better solution
     4780     */
     4781#ifdef RT_OS_WINDOWS
     4782    CONSOLE_DO_CALLBACKS7(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, pShape);
     4783#else
     4784    CONSOLE_DO_CALLBACKS8(OnMousePointerShapeChange, fVisible, fAlpha, xHot, yHot, width, height, pShapeSize, pShape);
     4785#endif
    47734786
    47744787#if 0
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