Changeset 30510 in vbox
- Timestamp:
- Jun 29, 2010 4:05:38 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63210
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r30434 r30510 586 586 AssertReturn(mAudioSniffer, E_FAIL); 587 587 588 unconst(mEventSource).createObject(); 589 rc = mEventSource->init(static_cast<IConsole*>(this)); 590 AssertComRCReturnRC(rc); 591 588 592 #ifdef RT_OS_WINDOWS 589 593 if (SUCCEEDED(rc)) … … 703 707 unconst(mControl).setNull(); 704 708 unconst(mMachine).setNull(); 709 710 // we don't perform uninit() as it's possible that some pending event refers to this source 711 unconst(mEventSource).setNull(); 705 712 706 713 /* Release all callbacks. Do this after uninitializing the components, … … 1715 1722 SafeIfaceArray<ISharedFolder> sf(mSharedFolders); 1716 1723 sf.detachTo(ComSafeArrayOutArg(aSharedFolders)); 1724 1725 return S_OK; 1726 } 1727 1728 1729 STDMETHODIMP Console::COMGETTER(EventSource)(IEventSource ** aEventSource) 1730 { 1731 CheckComArgOutPointerValid(aEventSource); 1732 1733 AutoCaller autoCaller(this); 1734 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1735 1736 // no need to lock - lifetime constant 1737 mEventSource.queryInterfaceTo(aEventSource); 1717 1738 1718 1739 return S_OK; -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r30381 r30510 4688 4688 #endif 4689 4689 4690 #if 04690 #if 1 4691 4691 // We disable generic events firing for now to not harm performance, but it is already functional 4692 4692 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r30476 r30510 6864 6864 </attribute> 6865 6865 6866 <attribute name="eventSource" type="IEventSource" readonly="yes"> 6867 <desc> 6868 Event source for console events. 6869 </desc> 6870 </attribute> 6871 6866 6872 <method name="powerUp"> 6867 6873 <desc> … … 14565 14571 <enum 14566 14572 name="VBoxEventType" 14567 uuid=" dc336827-bc9b-4acc-8880-691f6943bb8b">14573 uuid="25bf47c8-9972-4274-86ea-e6c479796c4a"> 14568 14574 14569 14575 <desc> … … 14598 14604 </const> 14599 14605 14606 <const name="InputEvent" value="4"> 14607 <desc> 14608 Wildcard for all input device (keyboard, mouse) events. 14609 Events of this type are never delivered, and only used in 14610 registerListener() call to simplify registration. 14611 </desc> 14612 </const> 14600 14613 14601 14614 <const name="LastWildcard" value="31"> … … 14620 14633 </desc> 14621 14634 </const> 14622 <const name="OnMediumRegistered" value="35"> 14635 <const name="OnExtraDataCanChange" value="35"> 14636 <desc> 14637 <see>IVirtualBoxCallback::onExtraDataChange</see> 14638 </desc> 14639 </const> 14640 <const name="OnMediumRegistered" value="36"> 14623 14641 <desc> 14624 14642 <see>IVirtualBoxCallback::onMediumRegistered</see> 14625 14643 </desc> 14626 14644 </const> 14627 <const name="OnMachineRegistered" value="3 6">14645 <const name="OnMachineRegistered" value="37"> 14628 14646 <desc> 14629 14647 <see>IVirtualBoxCallback::onMachineRegistered</see> 14630 14648 </desc> 14631 14649 </const> 14632 <const name="OnSessionStateChange" value="3 7">14650 <const name="OnSessionStateChange" value="38"> 14633 14651 <desc> 14634 14652 <see>IVirtualBoxCallback::onSessionStateChange</see> 14635 14653 </desc> 14636 14654 </const> 14637 <const name="OnSnapshotTaken" value="3 8">14655 <const name="OnSnapshotTaken" value="39"> 14638 14656 <desc> 14639 14657 <see>IVirtualBoxCallback::onSnapshotTaken</see> 14640 14658 </desc> 14641 14659 </const> 14642 <const name="OnSnapshotDeleted" value=" 39">14660 <const name="OnSnapshotDeleted" value="40"> 14643 14661 <desc> 14644 14662 <see>IVirtualBoxCallback::onSnapshotDeleted</see> 14645 14663 </desc> 14646 14664 </const> 14647 <const name="OnSnapshotChange" value="4 0">14665 <const name="OnSnapshotChange" value="41"> 14648 14666 <desc> 14649 14667 <see>IVirtualBoxCallback::onSnapshotChange</see> … … 14655 14673 </desc> 14656 14674 </const> 14657 14658 <const name="Last" value="43"> 14659 <desc> 14660 Must be last event, used for iterations. 14675 <!-- Console events --> 14676 <const name="OnMousePointerShapeChange" value="43"> 14677 <desc> 14678 <see>IConsoleCallback::onMousePointerShapeChange</see> 14679 </desc> 14680 </const> 14681 <const name="OnMouseCapabilityChange" value="44"> 14682 <desc> 14683 <see>IConsoleCallback::onMouseCapabilityChange</see> 14684 </desc> 14685 </const> 14686 <const name="OnKeyboardLedsChange" value="45"> 14687 <desc> 14688 <see>IConsoleCallback::onKeyboardLedsChange</see> 14689 </desc> 14690 </const> 14691 <const name="OnStateChange" value="46"> 14692 <desc> 14693 <see>IConsoleCallback::onStateChange</see> 14694 </desc> 14695 </const> 14696 <const name="OnAdditionsStateChange" value="47"> 14697 <desc> 14698 <see>IConsoleCallback::onAdditionsStateChange</see> 14699 </desc> 14700 </const> 14701 <const name="OnNetworkAdapterChange" value="48"> 14702 <desc> 14703 <see>IConsoleCallback::onNetworkAdapterChange</see> 14704 </desc> 14705 </const> 14706 <const name="OnSerialPortChange" value="49"> 14707 <desc> 14708 <see>IConsoleCallback::onSerialPortChange</see> 14709 </desc> 14710 </const> 14711 <const name="OnParallelPortChange" value="50"> 14712 <desc> 14713 <see>IConsoleCallback::onParallelPortChange</see> 14714 </desc> 14715 </const> 14716 <const name="OnStorageControllerChange" value="51"> 14717 <desc> 14718 <see>IConsoleCallback::onStorageControllerChange</see> 14719 </desc> 14720 </const> 14721 <const name="OnMediumChange" value="52"> 14722 <desc> 14723 <see>IConsoleCallback::onMediumChange</see> 14724 </desc> 14725 </const> 14726 <const name="OnVRDPServerChange" value="53"> 14727 <desc> 14728 <see>IConsoleCallback::onVRDPServerChange</see> 14729 </desc> 14730 </const> 14731 <const name="OnUSBControllerChange" value="54"> 14732 <desc> 14733 <see>IConsoleCallback::onUSBControllerChange</see> 14734 </desc> 14735 </const> 14736 <const name="OnUSBDeviceStateChange" value="55"> 14737 <desc> 14738 <see>IConsoleCallback::onUSBDeviceStateChange</see> 14739 </desc> 14740 </const> 14741 <const name="OnSharedFolderChange" value="56"> 14742 <desc> 14743 <see>IConsoleCallback::onSharedFolderChange</see> 14744 </desc> 14745 </const> 14746 <const name="OnRuntimeError" value="57"> 14747 <desc> 14748 <see>IConsoleCallback::onRuntimeError</see> 14749 </desc> 14750 </const> 14751 <const name="OnCanShowWindow" value="58"> 14752 <desc> 14753 <see>IConsoleCallback::onCanShowWindow</see> 14754 </desc> 14755 </const> 14756 <const name="OnShowWindow" value="59"> 14757 <desc> 14758 <see>IConsoleCallback::onShowWindow</see> 14759 </desc> 14760 </const> 14761 <!-- Last event marker --> 14762 <const name="Last" value="60"> 14763 <desc> 14764 Must be last event, used for iterations and structures relying on numerical event values. 14661 14765 </desc> 14662 14766 </const> … … 14983 15087 </interface> 14984 15088 14985 15089 <interface 14986 15090 name="ISnapshotChangeEvent" extends="ISnapshotEvent" 14987 15091 uuid="07541941-8079-447a-a33e-47a69c7980db" … … 14992 15096 <see>ISnapshot</see> 14993 15097 </desc> 15098 </interface> 15099 15100 <interface 15101 name="IMousePointerShapeChangeEvent" extends="IEvent" 15102 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef" 15103 wsmap="managed" id="OnMousePointerShapeChange" 15104 > 15105 <desc> 15106 Notification when the guest mouse pointer shape has 15107 changed. The new shape data is given. 15108 </desc> 15109 15110 <attribute name="visible" type="boolean" readonly="yes"> 15111 <desc> 15112 Flag whether the pointer is visible. 15113 </desc> 15114 </attribute> 15115 <attribute name="alpha" type="boolean" readonly="yes"> 15116 <desc> 15117 Flag whether the pointer has an alpha channel. 15118 </desc> 15119 </attribute> 15120 <attribute name="xhot" type="unsigned long" readonly="yes"> 15121 <desc> 15122 The pointer hot spot X coordinate. 15123 </desc> 15124 </attribute> 15125 <attribute name="yhot" type="unsigned long" readonly="yes"> 15126 <desc> 15127 The pointer hot spot Y coordinate. 15128 </desc> 15129 </attribute> 15130 <attribute name="width" type="unsigned long" readonly="yes"> 15131 <desc> 15132 Width of the pointer shape in pixels. 15133 </desc> 15134 </attribute> 15135 <attribute name="height" type="unsigned long" readonly="yes"> 15136 <desc> 15137 Height of the pointer shape in pixels. 15138 </desc> 15139 </attribute> 15140 <attribute name="shape" type="octet" safearray="yes" readonly="yes"> 15141 <desc> 15142 Shape buffer arrays. 15143 15144 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask 15145 followed by a 32-bpp XOR (color) mask. 15146 15147 For pointers without alpha channel the XOR mask pixels are 32 15148 bit values: (lsb)BGR0(msb). For pointers with alpha channel 15149 the XOR mask consists of (lsb)BGRA(msb) 32 bit values. 15150 15151 An AND mask is used for pointers with alpha channel, so if the 15152 callback does not support alpha, the pointer could be 15153 displayed as a normal color pointer. 15154 15155 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The 15156 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 * 15157 height</tt>. The padding bits at the end of each scanline are 15158 undefined. 15159 15160 The XOR mask follows the AND mask on the next 4-byte aligned 15161 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) & ~3</tt>. 15162 Bytes in the gap between the AND and the XOR mask are undefined. 15163 The XOR mask scanlines have no gap between them and the size of 15164 the XOR mask is: <tt>cXor = width * 4 * height</tt>. 15165 15166 <note> 15167 If @a shape is 0, only the pointer visibility is changed. 15168 </note> 15169 </desc> 15170 </attribute> 15171 </interface> 15172 15173 <interface 15174 name="IMouseCapabilityChangeEvent" extends="IEvent" 15175 uuid="d633ad48-820c-4207-b46c-6bd3596640d5" 15176 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChange" 15177 > 15178 <desc> 15179 Notification when the mouse capabilities reported by the 15180 guest have changed. The new capabilities are passed. 15181 </desc> 15182 <attribute name="supportsAbsolute" type="boolean" readonly="yes"> 15183 <desc> 15184 Supports absolute coordinates. 15185 </desc> 15186 </attribute> 15187 <attribute name="supportsRelative" type="boolean" readonly="yes"> 15188 <desc> 15189 Supports relative coordinates. 15190 </desc> 15191 </attribute> 15192 <attribute name="needsHostCursor" type="boolean" readonly="yes"> 15193 <desc> 15194 If host cursor is needed. 15195 </desc> 15196 </attribute> 14994 15197 </interface> 14995 15198 … … 15021 15224 </interface> 15022 15225 15226 <interface 15227 name="IVetoEvent" extends="IEvent" 15228 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007" 15229 wsmap="managed" 15230 > 15231 <desc>Base abstract interface for veto events.</desc> 15232 15233 <method name="addVeto"> 15234 <desc> 15235 Adds a veto on this event. 15236 </desc> 15237 <param name="reason" type="wstring" dir="in"> 15238 <desc> 15239 Reason for veto. 15240 </desc> 15241 </param> 15242 </method> 15243 15244 <method name="isVetoed"> 15245 <desc> 15246 If this event was vetoed. 15247 </desc> 15248 <param name="result" type="boolean" dir="return"> 15249 <desc> 15250 Reason for veto. 15251 </desc> 15252 </param> 15253 </method> 15254 15255 <method name="getVetos"> 15256 <desc> 15257 Current veto list, if size is 0 - no veto. 15258 </desc> 15259 <param name="result" type="wstring" dir="return" safearray="yes"> 15260 <desc> 15261 Reason for veto. 15262 </desc> 15263 </param> 15264 </method> 15265 15266 </interface> 15267 15268 <interface 15269 name="ICanExtraDataChangeEvent" extends="IVetoEvent" 15270 uuid="245d88bd-800a-40f8-87a6-170d02249a55" 15271 wsmap="managed" id="OnExtraDataCanChange" 15272 waitable="true" 15273 > 15274 <desc> 15275 Notification when someone tries to change extra data for 15276 either the given machine or (if @c null) global extra data. 15277 This gives the chance to veto against changes. 15278 </desc> 15279 <attribute name="machineId" type="uuid" mod="string" readonly="yes"> 15280 <desc> 15281 ID of the machine this event relates to. 15282 Null for global extra data changes. 15283 </desc> 15284 </attribute> 15285 <attribute name="key" type="wstring" readonly="yes"> 15286 <desc> 15287 Extra data key that has changed. 15288 </desc> 15289 </attribute> 15290 <attribute name="value" type="wstring" readonly="yes"> 15291 <desc> 15292 Extra data value for the given key. 15293 </desc> 15294 </attribute> 15295 </interface> 15296 15297 <interface 15298 name="ICanShowWindowEvent" extends="IVetoEvent" 15299 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9" 15300 wsmap="managed" id="OnCanShowWindow" 15301 waitable="true" 15302 > 15303 <desc> 15304 Notification when a call to 15305 <link to="IMachine::canShowConsoleWindow"/> is made by a 15306 front-end to check if a subsequent call to 15307 <link to="IMachine::showConsoleWindow"/> can succeed. 15308 15309 The callee should give an answer appropriate to the current 15310 machine state using event veto. This answer must 15311 remain valid at least until the next 15312 <link to="IConsole::state">machine state</link> change. 15313 </desc> 15314 </interface> 15315 15023 15316 <module name="VBoxSVC" context="LocalServer"> 15024 15317 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F" -
trunk/src/VBox/Main/idl/comimpl.xsl
r30479 r30510 103 103 <xsl:when test="$type='boolean'"> 104 104 <xsl:value-of select="'BOOL'" /> 105 </xsl:when> 106 <xsl:when test="$type='unsigned long'"> 107 <xsl:value-of select="'ULONG'" /> 108 </xsl:when> 109 <xsl:when test="$type='long'"> 110 <xsl:value-of select="'LONG'" /> 105 111 </xsl:when> 106 112 <xsl:otherwise> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r30324 r30510 22 22 #include "SchemaDefs.h" 23 23 #include "VBox/com/array.h" 24 #include "EventImpl.h" 24 25 25 26 class Guest; … … 133 134 STDMETHOD(COMGETTER(RemoteDisplayInfo))(IRemoteDisplayInfo **aRemoteDisplayInfo); 134 135 STDMETHOD(COMGETTER(SharedFolders))(ComSafeArrayOut(ISharedFolder *, aSharedFolders)); 136 STDMETHOD(COMGETTER(EventSource)) (IEventSource ** aEventSource); 135 137 136 138 // IConsole methods … … 610 612 const ComObjPtr<MachineDebugger> mDebugger; 611 613 const ComObjPtr<RemoteDisplayInfo> mRemoteDisplayInfo; 614 const ComObjPtr<EventSource> mEventSource; 612 615 613 616 USBDeviceList mUSBDevices; … … 737 740 ComEventsHelper mComEvHelper; 738 741 #endif 739 742 740 743 friend struct VMTask; 741 744 };
Note:
See TracChangeset
for help on using the changeset viewer.