Changeset 44580 in vbox for trunk/src/VBox/Main
- Timestamp:
- Feb 7, 2013 11:35:37 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83655
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/MouseImpl.h
r44528 r44580 22 22 #include "ConsoleEvents.h" 23 23 #include "ConsoleImpl.h" 24 #ifndef VBOXBFE_WITHOUT_COM25 24 #include "EventImpl.h" 26 #endif27 25 #include <VBox/vmm/pdmdrv.h> 28 26 … … 34 32 class ATL_NO_VTABLE Mouse : 35 33 public VirtualBoxBase 36 #ifndef VBOXBFE_WITHOUT_COM37 34 , VBOX_SCRIPTABLE_IMPL(IMouse) 38 #endif39 35 { 40 36 public: … … 69 65 STDMETHOD(PutMouseEventAbsolute)(LONG x, LONG y, LONG dz, LONG dw, 70 66 LONG buttonState); 71 #ifndef VBOXBFE_WITHOUT_COM72 67 STDMETHOD(COMGETTER(EventSource)) (IEventSource ** aEventSource); 73 #endif74 68 75 69 static const PDMDRVREG DrvReg; … … 114 108 bool supportsRel(void); 115 109 116 #ifdef VBOXBFE_WITHOUT_COM117 Console *mParent;118 #else119 110 Console * const mParent; 120 #endif121 111 /** Pointer to the associated mouse driver. */ 122 112 struct DRVMAINMOUSE *mpDrv[MOUSE_MAX_DEVICES]; … … 127 117 uint32_t mfLastButtons; 128 118 129 #ifndef VBOXBFE_WITHOUT_COM130 119 const ComObjPtr<EventSource> mEventSource; 131 120 VBoxEventDesc mMouseEvent; 132 121 133 122 void fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw, LONG Buttons); 134 #else135 void fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw, LONG Buttons)136 {}137 #endif138 123 }; 139 140 #ifdef VBOXBFE_WITHOUT_COM141 /** @todo make this a member of Console */142 extern Mouse *gMouse;143 144 /** @todo can we get these from the API somehow? */145 enum146 {147 MouseButtonState_LeftButton = 1,148 MouseButtonState_RightButton = 2,149 MouseButtonState_MiddleButton = 4,150 MouseButtonState_XButton1 = 8,151 MouseButtonState_XButton2 = 16152 };153 #endif154 124 155 125 #endif // !____H_MOUSEIMPL -
trunk/src/VBox/Main/src-client/MouseImpl.cpp
r44528 r44580 110 110 unconst(mParent) = parent; 111 111 112 #ifndef VBOXBFE_WITHOUT_COM113 112 unconst(mEventSource).createObject(); 114 113 HRESULT rc = mEventSource->init(static_cast<IMouse*>(this)); … … 116 115 mMouseEvent.init(mEventSource, VBoxEventType_OnGuestMouse, 117 116 0, 0, 0, 0, 0); 118 #endif119 117 120 118 /* Confirm a successful initialization */ … … 144 142 } 145 143 146 #ifdef VBOXBFE_WITHOUT_COM147 mParent = NULL;148 #else149 144 mMouseEvent.uninit(); 150 145 unconst(mEventSource).setNull(); 151 146 unconst(mParent) = NULL; 152 #endif153 147 } 154 148 … … 256 250 } 257 251 258 #ifndef VBOXBFE_WITHOUT_COM259 252 STDMETHODIMP Mouse::COMGETTER(EventSource)(IEventSource ** aEventSource) 260 253 { … … 269 262 return S_OK; 270 263 } 271 #endif272 264 273 265 /** … … 413 405 } 414 406 415 #ifndef VBOXBFE_WITHOUT_COM416 407 void Mouse::fireMouseEvent(bool fAbsolute, LONG x, LONG y, LONG dz, LONG dw, LONG Buttons) 417 408 { … … 430 421 } 431 422 } 432 #endif433 423 434 424
Note:
See TracChangeset
for help on using the changeset viewer.