VirtualBox

Changeset 26982 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 3, 2010 10:28:21 AM (15 years ago)
Author:
vboxsync
Message:

FE/BFE: VBoxBFE now uses MouseImpl from Main

Location:
trunk/src/VBox
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/Makefile.kmk

    r26850 r26982  
    2323include $(KBUILD_PATH)/subheader.kmk
    2424if !defined(VBOX_WITH_HARDENING) || "$(KBUILD_TARGET)" != "darwin"  # No hardened VBoxBFE on darwin (.m).
     25
     26#
     27# Files from Main needed for building VBoxBFE
     28#
     29VBOXBFE_MAIN_CPP = MouseImpl.cpp
     30VBOXBFE_MAIN_H   = MouseImpl.h ConsoleEvents.h
    2531
    2632#
     
    7076        VMMDevInterface.cpp \
    7177        DisplayImpl.cpp \
    72         MouseImpl.cpp \
     78        $(PATH_VBoxBFE)/MouseImpl.cpp \
    7379        KeyboardImpl.cpp \
    7480        StatusImpl.cpp \
     
    117123VBoxBFE_INCS = \
    118124        $(PATH_VBoxBFE) \
    119         $(VBOX_PATH_SDK)/include
     125        $(VBOX_PATH_SDK)/include \
     126        $(PATH_ROOT)/src/VBox/Frontends/VBoxBFE
    120127ifneq ($(filter-out win os2 l4 darwin,$(KBUILD_TARGET)),) # X11
    121128VBoxBFE_INCS += \
     
    166173        $(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
    167174
     175VBoxBFE_DEPS += $(addprefix $(PATH_VBoxBFE)/,$(VBOXBFE_MAIN_CPP) $(VBOXBFE_MAIN_H))
     176
     177# Pattern rules for copying needed files from Main
     178$(addprefix $$(PATH_VBoxBFE)/,$(VBOXBFE_MAIN_CPP)): \
     179                $$(PATH_VBoxBFE)/% : $(PATH_ROOT)/src/VBox/Main/% | $$(dir $$@)
     180        $(call MSG_INST_FILE,$<,$@)
     181        $(QUIET)$(CP_EXT) $< $@
     182
     183$(addprefix $$(PATH_VBoxBFE)/,$(VBOXBFE_MAIN_H)): \
     184                $$(PATH_VBoxBFE)/% : $(PATH_ROOT)/src/VBox/Main/include/% | $$(dir $$@)
     185        $(call MSG_INST_FILE,$<,$@)
     186        $(QUIET)$(CP_EXT) $< $@
     187
     188
    168189
    169190endif # !VBOX_WITH_HARDENING || !darwin
  • trunk/src/VBox/Main/MouseImpl.cpp

    r26964 r26982  
    120120    mpDrv = NULL;
    121121
     122#ifdef VBOXBFE_WITHOUT_COM
     123    mParent = NULL;
     124#else
    122125    unconst(mParent).setNull();
     126#endif
    123127}
    124128
     
    428432    HRESULT rc = convertDisplayWidth(x, &mouseXAbs);
    429433    ComAssertComRCRet(rc, rc);
    430     /// TODO: Remove those strings?
    431     //if (mouseXAbs > 0xffff)
    432     //    mouseXAbs = mLastAbsX;
     434    /**
     435     * @todo multi-monitor Windows guests expect this to be unbounded.
     436     * Fix for the rest.
     437     */
     438    /* if (mouseXAbs > 0xffff)
     439        mouseXAbs = mLastAbsX; */
    433440
    434441    uint32_t mouseYAbs;
    435442    rc = convertDisplayHeight(y, &mouseYAbs);
    436443    ComAssertComRCRet(rc, rc);
    437     /// TODO: Remove those strings?
    438     //if (mouseYAbs > 0xffff)
    439     //    mouseYAbs = mLastAbsY;
     444    /* if (mouseYAbs > 0xffff)
     445        mouseYAbs = mLastAbsY; */
    440446
    441447    uint32_t fButtons = mouseButtonsToPDM(buttonState);
  • trunk/src/VBox/Main/include/MouseImpl.h

    r26935 r26982  
    5353
    5454class ATL_NO_VTABLE Mouse :
    55     public VirtualBoxBase,
     55    public VirtualBoxBase
     56#ifndef VBOXBFE_WITHOUT_COM
     57    ,
    5658    public VirtualBoxSupportErrorInfoImpl<Mouse, IMouse>,
    5759    public VirtualBoxSupportTranslation<Mouse>,
    5860    VBOX_SCRIPTABLE_IMPL(IMouse)
     61#endif
    5962{
    6063public:
     
    134137    void sendMouseCapsCallback(void);
    135138
     139#ifdef VBOXBFE_WITHOUT_COM
     140    Console *mParent;
     141#else
    136142    const ComObjPtr<Console, ComWeakRef> mParent;
     143#endif
    137144    /** Pointer to the associated mouse driver. */
    138145    struct DRVMAINMOUSE    *mpDrv;
     
    147154};
    148155
     156#ifdef VBOXBFE_WITHOUT_COM
     157/** @todo make this a member of Console */
     158extern Mouse *gMouse;
     159
     160/** @todo can we get these from the API somehow? */
     161enum
     162{
     163    MouseButtonState_LeftButton = 1,
     164    MouseButtonState_RightButton = 2,
     165    MouseButtonState_MiddleButton = 4,
     166    MouseButtonState_XButton1 = 8,
     167    MouseButtonState_XButton2 = 16,
     168};
     169#endif
     170
    149171#endif // !____H_MOUSEIMPL
    150172/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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